How do I jump to a keyframe time on the dope sheet? In After Effects, I could easily select a keyframe, right click it, and click "Go to keyframe time" so I could easily line up other keyframes to it and do other useful things, but how do i do this in Blender?

In the Dope Sheet Editor or the Graph Editor you can select the keyframe and press CtrlG.

Or use the menu Key->Jump to keyframes.


Is this is double-sided plane? I have a hair object, and I wonder how it was done.

Is this hair composed by planes?
And if yes, are they double-sided? To me it looks double-sided because it is also visible from the other side.

I have also uploaded the project here if somebody needs to take a closer look.

Thank you very much!

No they are not double sided. You can check this by going to the N menu and checking Backface Culling under Shading options.


Requesting help for answer to 'Model a simple plane into steps' This is exactly what I want to do but I don't understand the answer:
Model a simple plane into steps
I'm in version 2.92 and don't understand which field to enter .0000001.  I also get lost in step 3 and 4.  If I switch to face selection my selected areas a gone.  I also didn't understand how to get into pivot point.  I'll go through the steps again.

Blender can do this in one, using the AltV Rip Fill operator, with (in this case,) Z to constrain the direction of the extruded fill. (3DS can do this too, so some of the steps in the reference video to the other Q. are not strictly necessary)
There are a couple of gotchas.

Rip Fill works only on edges between faces.
The side of the edge-selection the mouse is on, before execution, matters. The new fill-face is extruded on the far side of the edge, with respect to the mouse.

With Snap set to 'Vertex' and 'Active', and working in an orthogonal view to ensure the mouse is on the right side of the loop selection:


How to model wavy pattern on the surface? G'day to all B3D community!

I started working on the project to model fitness bracelet and have no any idea how to model wavy pattern on the surface! Maybe you, guys, know some ways of doing that?

I've attached an image of what I'm talking about!

Thanx a lot in advance!!!

Sketch curve, convert to mesh and then refine.

Sketch pattern main feature:

I would start from the sketching the main lines of the pattern using a bezier curve. First thing to place are the start and end point. Grab them around upon a reference image. Then adjust the handles orientation to match the reference curve's tangency (vertical) like the image below is showing:

.

Create main geometry

Now that we have the curve, set a bevel object (the black arrow in the picture is pointing mine) to place some faces to work with. At this point you can temporarily add modifiers to the object to get an idea of the final apparence of the pattern:

Convert to mesh and edit the object

As for the final model I plan to use the subdivision surface modifier, I kept the curve's resolution low before converting the curve to mesh. After this, run the symmetrize command to mirror and duplicate the mesh around the origin. Then clean up a bit the model by deleting unecessary faces:

You'll have to repeat the operation to take care of the border in order to achieve a fully tileable mesh. Fill the voids with the faces paying attention to not work outside the imaginary boundaries of the figure. You should come up with something similar to the image below:

Final retouches and modifiers

Now that the basic shape is ready you can tweak each vertex position manually, with proportional edit enabled, or even with the sculpting tools, or using the smooth vertex command... in order to achieve the right shape. You can also alter the topology with the knife tool, edge collapsing, deleting and creating faces... till you reach a satifying result.


How to make an ocean with depth I Tried The Ocean Modifier to make an ocean with depth like the one on the image:

but I Get A Flat Ocean. Please I Need Help

If you don't care about the bottom of it being deformed like the top, you can simple add a solidify modifier (with offset of -1) to achieve this effect. Otherwise, this answer is suitable.


Camera to behave as the viewport? One of the things I haven't learned about using Blender is how look from a camera and use the exact same commands to pan, rotate and zoom with the camera as I do with the viewport. I'm used to doing this with either C4D, Maya, Modo, Max, etc... but in Blender It feels like a different workflow for those who are coming from other 3D applications. Is there anything that can be done about this either in the settings or through an addon?

Enable "Lock camera to view". Then all navigation in the viewport will be done through the camera using the same commands as navigating on any other view in the viewport.

In 2.8+, you can access the checkbox in the right side panel in the 3D viewport with N :


How can I skew an object? I have a complex mesh that I would like to change the proportions to. Using this mesh as a simplified example, how to I make this:

Into this?

Again, the mesh I'm working with is complex, so simplifying it into a 6-sided square, shrinking one face, then subdividing it would not be a viable option.

You can do this non-destructively using a Simple Deform Modifier.

Select the desired mesh
In the modifiers tab add a Simple Deform Modifier
Set the type to Taper
Adjust Factor to increase/decrease the amount of deformation.


Why is the aspect ratio for this UV-unwrap wrong? I have been at this for days now, but I can't figure it out.
Why is the point / pinacle in the uv-unwrap not centered like it is in the object?

blender object and the uv

Like i said i'm still a novice.

The devil was in the details, as a result of the beveling on the top there were still some minor issues (overlapping face, 2 vertices to be joined) at the outer right side of the object. After I took care of those issues the unwrap already looked much better.
Because the front face still showed some stretching, I divided (1 time horizontal and vertical) the front face. Then the unwrap worked like a charm with almost no stretching / deformation.

Took me many days, but i learned a lot !!


How to save blender project without the original files [Unable to pack file Warning] I'm really new to blender here, and I was looking for an environment for import so I can render a picture of a room from a very specific POV to use in an After Effects project.

So I downloaded a free room environment from this website: https://free3d.com/3d-model/chambre--24937.html

And it only provides one .blend file, now the problem is that I made some changes to the scene and I need to save this .blend file, and upon saving I receive this error:

  Unable to pack file source path: /path/

Well, I understand what it means, it can't find the original images used in the project to pack the new .blend file, so how do I use the already packed images in the original .blend file to save the new .blend file?

Why doesn't blender automatically extract the images from the opened .blend file and save them to a location and then use them to pack a new .blend file?

I tried manually extracting some of the images, and saved them to where the original .blend file is saved and opened, and I went to File -> External Data -> Find Missing Files but it doesn't work.

The .blend in your link comes with a file missing (Fields_wallpapers_488.jpg).
It was not packed properly by the creator of the file.

Packed files do not need to be unpacked for them to work in Blender. If files are unpacked they are usually used from the location they are unpacked to and automatic packing is turned off. If it's enabled again then the files are packed from the location they were unpacked. As you can see asset packing and unpacking functionality is quite complete in Blender and it usually works as intended. In this specific case the file comes with a missing asset - that's why it's not possible to find. The creator of the file must have received the same warning and chose to ignore it.


Problems with weird edges after Subdviding/Smoothing surface I am modelling my first blender character ever. I modeled one side, then symmetrized it and merged the two symmetrical sides together.
When adding the subdivishion Surface modifier and/or adding the smoothing Surface, I cannot get this edge to be smooth as the others. It forms into a sharp line all along my mesh.
I tried deleting doubles using Merge by distance and I tried smoothing it in sculpt mode. I tried deleting the edge by combining the two faces into one, but that just made two weird lines instead of one.
My blender file. I have no idea how to fix it.

Ur Problem is the face orientation. If u Turn on "Face Orientation" on and check, u can clearly see half of ur face is its back facing outside (Red is the back of the face, Blue is the front of the face. Generally, u shoud have all faces blue)

select all ur faces and type F3, search for "recalculate outside" to correct ur wrong facing direction. then it should smooth properly


In Python rotate a polygon to face something I want to rotate a single polygon so that it faces a point in space, ie the 3Dcursor or vert.co. So that the normal of the polygon faces the point.

Reading other Questions; to_track_quat(track, up) should give me the Quaternion rotation I need if I first multiply it by the faces normal "it might not be facing up".

The problem is how do I rotate a polygon by a value, so that its normal faces something?

import bpy
from mathutils import Matrix

def turn_face_to_point(obj, face, target):
    #init
    mat_world = obj.matrix_world

    #transform the face to world space
    #to take non-uniform scaling into account
    #which may change the angle of face.normal
    for index in face.vertices:
        vert = obj.data.vertices[index]
        vert.co = mat_world @ vert.co

    #get the rotation difference
    track  = empty.location - face.center
    q = face.normal.rotation_difference(track)

    #compose the matrix
    #rotation around face.center in world space
    mat = Matrix.Translation( face.center) @ \
          q.to_matrix().to_4x4() @ \
          Matrix.Translation(-face.center)
    #transform the face back to object space afterwards
    mat_obj = mat_world.inverted() @ mat

    #apply the matrix to the vertices of the face
    for index in face.vertices:
        vert = obj.data.vertices[index]
        vert.co = mat_obj @ vert.co

#test
obj   = bpy.data.objects['Plane']
empty = bpy.data.objects['Empty']
face  = obj.data.polygons[0]

turn_face_to_point(obj, face, empty.location)


How can you render out just the audio from a video in VSE? Basically all I need to do is render out the track (the top most bar that appears when you drop a video in VSE). I am pretty new to Blender's VSE and I haven't been able to find anything about what I am looking for on the forum, so I thought I would ask for help here.

I really appreciate all ideas and info!

Thanks!

Blender isn't a good choice if you are only outputting audio, blender will still render an image for each frame. You can delete all objects in the scene and choose blender render or set samples to one with cycles and use a small image size (50x50) to cut the render time.

If you are only extracting the audio from a file, you would be better off not using blender, using ffmpeg in a terminal it is much quicker to copy the audio track from a video without any conversion.

ffmpeg -i vid.mp4 -acodec copy audioonly.mp3

You may also want to use audactity to open the video file and save out the audio.

If you do want to use blender, in the output settings, select ffmpeg video. For container select one that supports multiple codecs, such as mpeg-4 and then for video codec choose No Video (2.7x this shows as None).


Blender Terminal opens with Script? is it possible to open Blender Console (Terminal) by running script ?
instead of Windows->Toggle System Console
Thanks

Like this?
import bpy
bpy.ops.wm.console_toggle()

There should be a python command under that button?


How to move freestyle line sets to another layer? How do you move blender line sets from the initial layer they were created on to another layer?

Sadly this is not possible by default, however here is an effective workaround

Under the Render Layers tab there is a checkbox that enables/disables it for that layer. And no, this does not render the Freestly pass if you just set it by itself on a new render layer.

Using this we will be able to (with come complex compositing) get just the Freestyle pass.

Start by adding a new Render Layer and unchecking the Freestyle checkbox. When you render now, you should get two images, one with freestyle and one without. This is exactly what we need for the next step, which will be done in the compositor.

In the compositor, add another Render Layer node by selecting the already present one and pressing Shift+D. Change the dropdown on the bottom of it to the second render layer. Now add a Color Mix node and set it to Subtract and connect it as shown.

Now we have a basic image we can work with:

Now replicate this node setup to take this image and make it useable:

(Basic Math node set to Multiply with a value of 10, and a color mix node set to black and white with the math node input driving the factor.)

Now we have our image to use as the factor to mix the rendered image with a black (or any other) color. Add another color mix node, connect the output of the nodes we just added to the factor input, change the top color to black, and connect the plain render layer image output to the bottom color input. You should now have a node setup like this:

(I added the blur node to make the Freestlye lines less sharp, but it is completely optional)

Your render should now be complete, you can now access just the freestlye render:

And can use that to customize how it is used in your final image.


Export a smoke simulation as a mesh Please help me.... I am trying to export a smoke simulation as a mesh (I mean the smoke 3D volume) for 3D printing it! I cant find how to do that anywhere, does anyone know?

Thanks a lot! Sorry if it is unclear. It is hard to explain.
Emiliano

There's not an easy way to convert a smoke simulation into a mesh; not in Blender at least. I would suggest a different tactic.

Instead of using the smoke simulator, use the fluid simulator. They both use the same basic algorithm. You'll need to toy with the inflow, gravity, and initial force settings. The main difference is that the fluid simulator doesn't deal with turbulence and heat like the smoke simulator does; you'll need to fake it a bit. However the fluid simulator does generate a sequences of meshes as its output. Any of those meshes (stored as .bobz files on your hard drive) can be converted to a "proper mesh" that you can edit and ultimately export as an STL for printing.


Camera dark outline (passepartout) not working I am a new blender user and I'm following a bunch of tutorials to learn about the tool. I recently came across a camera tutorial and ran into a minor problem. After selecting the camera, I was changing the type and scale and wanted to reset the cursor position and pressed Shift + C. Instead of changing the position, it removed the dark border around the camera. How do I restore it back to its default view? Also, is it any different to remove the dark border? screenshot for details: https://bmoondesign.d.pr/XmbHGb

If you really just pressed SHIFT+C then you changed your view to show all objects in the scene. To get back into camera perspective press Numpad 0.

If you disabled the passepartout instead, select the camera and check Passepartout in the camera tab. The setting has no influence on the rendering only on the display in the viewport.


Is there a way to override a material when working with UVs? Basically I want a UV-Grid image showing on the model without having to touch the material of the object. Whatever image I chose in the UV-Editor should be mapped to the object while I'm in edit mode. Is that possible? I'm running 2.8 now.
Thanks

I believe it's not currently possible (as of December 2018) with a simple UI toggle. A UV checker overlay that doesn't affect the materials is one of the most loved features proposed by the community, but still not implemented.

mockup by Xuri Greer

I think that we will see this feature in the (very) near future, since it's known that the devs have discussed it already.

A workflow I normally use is:

Add a Shader editor to the "UV Editing" workspace, and switch the Viewport to LookDev

Make your actual material single user and create a different "Diagnostic material" with a textured Emission shader (add a UVMap input if it's not unique)

When you change the texture in the editor, update the material too

After having this set up, it's just a matter of one more click each time you switch.

(You may prefer using the "Node Wrangler addon"'s preview feature instead of a whole new material)


Painted Texture Not Rendering In Cycles, I have painted some textures onto my UV map like below:

While in Texture Mode I can see the paint applied.

But when I go to render mode, they do not show.

My nodes are setup as follows:

First of all, always Save All Images in Slots tab (Texture Paint mode).

Secondly, Save or Pack as PNG texture in UV Image Editor before closing Blender.

Images used in blender must exist as a file somewhere on the computer (or network). Saving the images will do that.

By default blender reads the images used from the place where they are saved. To make the .blend file self contained, with the images included within the project file, then pack the images


Why can't I smash these 2 fractured objects together? I have 2 objects that have been fractured, but for some reason I can't apply keyframes.  I tried testing animating a cube to see if there were larger problems with settings but that worked fine.  Could anyone shed some light on why this might be happening?

Thanks

Here's a screenshot:

Here's the .blend:

Check the "Animated" box in your physics settings. As it's name states, it will allow you to animate the objects with keyframes.


What do Cyan/Black Edges mean? These Edges from Edit Mode are screwing up my Subdivide. What are they and how do I get rid of them?

These lines appear when you select "Sharp Edges/Vertices" from the "Shading/UVs" menu in edit mode. You can eliminate them by selecting "Smooth Vertices" from the same menu here:

I hope this helped. Happy Blendering! Cheers,
Graves Broderick


How to use python classes with BGE objects? Pretend we have a simple class; "Hero" will be our class. Here's an example of a simple class:

class Hero:

    def __init__(self, max_health):
        self.health = max_health

    def regen(self, amount):
        if (max_health - amount) > 100:
            self.health = max_health
        else:
            self.health += amount

    def die(self):
        self.health = 0
        self.alive = False

Above is a simple class not assigned to any objects. I am a bit puzzled on how I would "assign" a class to an object. When the script reads self.health = max_health, would I change it to self["health"] = max_health? Also, how would I apply the entire class to a specific object? I can do player = Hero(100), which would make "player" be class "Hero" with 100 as the max_health, but I am not assigning this specific "player" to a BGE object. Would I call the object and assign it: main.objects["player"] = Hero (assuming I've defined "main" and "player" exists)? How can I have class attributed be connected to properties of objects, and how can I have the objects be assigned to a class?

Composition

You can assign an object (instance of a class) by referring from the game object to your instance e.g. by assigning it as value to a property.

import bge
from myClassDefinitions import MyClass

myInstance = MyClass()

owner = bge.logic.getCurrentController().owner
gameObject = owner
gameObject["myClass"] = myInstance # assign object to game object

print(gameObject["myClass"]) # get object via game object

Explanation

The game object and the instance of your class (object) are two separate objects.

After creation you assign your object (as reference) to a property of the game object. This means the game object knows how to get the object at any time later via gameObject["myClass"].

The object does not need to know the game object. If you really need you can create a cross reference (e.g. by storing a reference of the game object as attribute of the object).

Advantages

any number of objects can be assigned to the same game object
any number of game objects can refer to the same object
the property name indicates the purpose of the referred object
the property can be exchanged or even removed
allows to avoid dependencies to BGE from within your own classes (you can test it with unittest, you can use it outside the BGE)
can survive game object remove (e.g. on scene switch) when referred from outside the scene.

(this is another option)

Object replacement

The BGE allows to "replace an existing game object". It is a strange idea but allows to feel like subclassing. It is descibed in the BGE API.

Explanation

You create an instance of your class which subclasses KX_GameObject (or whatever you told your class should inherit from).

The game object in the scene will be replaced by the BGE when instantiating your class (that is why you need to deliver a game object to be replaced).

Your object inherits all attributes from the game object you delivered at instantiation.

When the game object dies your object dies too as it is the game object now.

Advantage

single class
can still use properties
feels like a class

Disadvantage

single class only
replaces the game object (any previously made references to this object become invalid)
dependency to a single game object type branch (you can't use the same inheritance for KX_Camera and KX_FontObject)
will not survive ending the game object (e.g. on scene switch).


Object preview not generated for large objects (bug?) I have an issue with generating previews using Batch-Generate Previews for objects larger than around 60m. The object's thumbnail appears completely transparent in Blender file browser.

Can anyone confirm this is a bug? Is there a workaround?

I am using Blender 2.79.1.

EDIT: I have reported that as a bug and it is going to be fixed soon.
https://developer.blender.org/T53002

Wow, so I have reported the bug on developer.blender.org and it was fixed in about 3 hours!

Link with the fix details:
https://developer.blender.org/rB63482a5f2e2ad76989c2d2901c1f34f2f0cb59d4

I have compiled the current Blender build which contains the fix and I can confirm the big object has now it's preview generated correctly.

This means a future public version will have this fixed as well.

Big thanks to Blender developers for such prompt reaction :)


How to make all objects rotate in the same way In other words how do i prevent this from happening:

Thanks

Looks like your pivot point is set to "Individual Origins". Switch it to "Median Point" if you want your objects to rotate around the selection center (as by default). Or you may also use any other pivot, like 3D cursor, etc.


Sky & Atmosphere for Cycles Render The Blender Manual describes for Blender Render extensive setting options for Sky & Atmosphere, like in-scattering, extinction, exposure, brightness, turbidity etc. However, in Cycles Render that all seems to be condensed in world => background => sky texture, with only turbidity and albedo as parameters. Aren't there any more functionalities in Cycles Render?

For atmospheric/volumetric effects in cycles you have to use volume scattering and volume absortion on the volume section:


bpy.ops.armature.duplicate_move() not creating a duplicate I am trying to programmatically add new FK rig controls to a character which is already rigged with deformation bones. To do this, I duplicate a deformation bone for which I want to add a new control, rename it, give it a custom shape, turn off deformation and add a copy transform constraint on deformation bone targeting this new bone. My problem is that when I use the bpy.ops.armature.duplicate_move() operator to duplicate, nothing happens - except that the selected bone is deselected. Here is an example execution on the blender console (I was in armature edit mode when I ran these commands):

>>> len(D.armatures['skeleton_human_female'].edit_bones)
67

>>> C.active_object
bpy.data.objects['skeleton_human_female']

>>> C.active_bone.name
'upperarm_L'

>>> len(C.selected_bones)
1

>>> C.selected_bones[0].name
'upperarm_L'

>>> bpy.ops.armature.duplicate_move()
{'FINISHED'}

>>> len(D.armatures['skeleton_human_female'].edit_bones)
67

>>> len(C.selected_bones)
0

As you can see, the number of bones in the armature doesn't change. I am using blender 2.78c. What could be wrong?

Thanks in advance!

edit: I found that duplicating using duplicate_move() operator is not my favourite way to create new bones in the same position. Instead I just create a new bone, and assign head and tail elements appropriately, using a function like this:

def createNewBone(object, new_bone_name, parent_name, parent_connected, head, tail, roll):
    bpy.ops.object.mode_set(mode='EDIT', toggle=False)

    bpy.ops.armature.bone_primitive_add(name=new_bone_name)

    new_edit_bone = object.data.edit_bones[new_bone_name]
    new_edit_bone.use_connect = parent_connected
    new_edit_bone.parent = object.data.edit_bones[parent_name]
    new_edit_bone.use_inherit_rotation = True
    new_edit_bone.use_local_location = True
    new_edit_bone.use_inherit_scale = False

    new_edit_bone.head = head
    new_edit_bone.tail = tail
    new_edit_bone.roll = roll

Try this:

import bpy

arm = bpy.data.objects['Armature']
bpy.ops.object.mode_set(mode='EDIT')
bone_to_duplicate = arm.data.edit_bones['Bone']
arm.data.edit_bones.active = bone_to_duplicate
arm.data.edit_bones.active.select = True
bpy.ops.armature.duplicate_move()


Rendering wrongly in screw modifier Hi I wanted to create the following structure. I have created a single edge and used screw modifier to create this. I used freestlye option to display the edges. However when I render, I am seeing this extra edges! These are not visible in viewport or camera displays.
How to avoid it?

It renders all edges, even the ones that are made by automatic triangulation during rendering. Maybe you marked the faces instead of edges. You should only mark the edges and also set the render settings to render only marked:


Is there a blender script or way to configure Blender to do this (Retopo) Is there a Blender script out there that lets you basically 'draw' in a 'net' of edges using strokes that you can then fill in using the spider script or something?
Could I possibly just change some settings to have this ability?
I've been doing a lot of retopo work and think just being able to draw in edges with mouse or tablet strokes would be such an efficient and simple way to do it- I've tried Retopoflow and 3D Coat for retopo and both feel needlessly complicated to me.

You could try the Bsurfaces addon:
https://www.youtube.com/watch?v=YQb5lHDFjjs
(The video also activates another add-on).
I haven't tried it myself (new blender doesn't work on my laptop)
but looks simple enough for me.


Multiply and Add functions in Node editor How do I bring up the Multiply and Add functions in the Node Editor?

Can't find them when I do Shift+A or click Add at bottom menu.

For Math: Shift+A -> Converter -> Math and switch math function what you need.

For Colors: Shift+A -> Color -> Mix RGB and switch blend mode

For greyscale images doesn't matter if you use math, or color - result is the same


Get location in scene for pixel? Given a pixel on the rendered image, is there any easy way to get the 3D location that the pixel corresponds to in the scene using python? i would really like to know before I go through trying to do the math to get it myself.

In case it makes a difference, I'm using an orthographic camera.

There are utility functions to convert 2d region coordinates to 3d:

bpy_extras.view3d_utils

There's also a method to cast a ray in the scene:

Scene.ray_cast

... but it might not work with orthographic view.


How do I change the angle of the axis without changing the angle of the object? Hey guys I am currently working on a scene with multiple objects.  There is one object (a wheel) that I need to rotate the origin for without rotating the wheel itself.  I have the exact angle that I need so a manual solution would be the best.  Any help would be much appreciated. I am used to parametric modeling and Blender is a little out of my depth.

Blender's precision modelling tools are a bit lacking unfortunately but you can do this with an auxiliary Empty object.

Create an empty object, align it with an one of the vertex of the object you wish to correct the alignment.

Rotate it and use snapping to align it with the desired edge.

Now copy the empty object's rotation to the other object, either by rotating it in object mode that same number of degrees and applying it, or entering edit mode and rotating all geometry that same amount.


Why does this texture appear fine in material view but appears pink in rendered view? This is about the third time I have posted this question and unfortunately I have returned to ask it again. I am trying to create a scene here where the traffic Light has this Zinc coated texture to it. However, I have noticed that with some textures, (Mainly Transparent leaf Texture's and now this) that the image doesn't show up in the rendered view port. Now all of you have suggested that the pink image means the file or image is missing. But it isn't. When I go to the Material View port I can see it and also where the node's are. Please to help me find out why these textures are turning pink in the Rendered View port only.

@Sarsha W, I hope this doesn't come too late, I had the same problem yesterday, and i went through the same rectifications as in here. In my case all the objects were pink, and I could see the texture fine in texture mode. I found all the missing files. And in python I had no errors.

In my case, what solved the problem was to pack the images, save the "pink" file, and close it. Then I opened a brand new file, and appended the object from the "pink" file. After doing so, everything worked fine.

Other things you might want to test is to make sure the texture is not a corrupted image. And you can always test with a different texture that works in another .blend, that way if you still have it pink you know it's a different issue.


Dvorak keyboard mapping? I learned to touch type in Dvorak keyboard map in late '90s.  is there a way to change key mapping assignment to alternate layout without need to remap each key individually in user preference? I fear something would be overlooked in manual process.
thanks

EDIT: further thought about problem suggests this is asking the wrong question. in order to take advantage of physical layout design intent, remap more involved than simple move of keys. I will do more research and close question next day or two.

Example: 'z' / 'Z' key qwerty is ';' / ':' key in Dvorak. so undo command is not convenient to type one handed in Dvorak layout.

There is a maintained repo on Github by BioticPixels with a script that does this exactly https://github.com/BioticPixels/Blender-Dvorak-Key-Configuration, (more permanent link). It appears to not be feature complete but the author lists the restrictions and it appears to be usable for the most part. There are install instructions present or you can open your text editor and execute the script from there. Direct link.


Blender 2.8 crashes when entering particle edit Blender 2.8 is crashing when I try to go into particle edit to comb hair.

In case it helps someone: if you have a baked hair simulation and try to go into particle edit (i.e., combing) without deleting the bake first, it will crash blender.


Objects don't follow the particles system/vertex group I'm totally new to blender and I'm trying to learn it for scientific pourposes; in particular for creating crystal lattices. In order to do that, I found an addon called Bravais Lattice Creator (BLC), which, sadly, works only on blender 2.79. However the view of the latest version, 2.91, is much better than the one of 2.79, allowing me a better stacking of the diferent crystal layers.
However when I open a file made with Blender 2.79 in Blender 2.91, what happens is that if I try to just move a crystal lattice (vertex groups with a sphere for each vertex), blender moves only the vertex group, while the spheres are totally impossible to be moved. Moreover it see the two system as one; infact if I change, for example, the spheres with cubes, it changes correctly, but still impossibile to move.

In the version 2.79 this problem is not present.
(Moreover Blender 2.91 can exploits the graphic card of my notebook, a nvidia 1650 ti)
Does anyone has some suggestion?
Thanks

This may be because of a thing where in blender 2.80 and up, auto cache refreshing got scrambled. First it refreshed when it shouldn't've, now it has sometimes not been refreshing when it should've: You probably need to refresh the particle cache manually.
One way that seems fairly solid is change some fundamental setting to the particles/simulation, then immediately change it back. Number of particles is one, particle size is not.
This is just a guess, I hope it helps.


Monkey won't smoke or burn I've just started with Blender, following Blender Guru's beginner tutorial lesson 1.
I can get the monkey mesh and the smoke box but when I click "play" nothing happens. The monkey won't burn either.
I've tried selecting the monkey and not the smoke, the smoke and not the monkey, both of them and neither. None of it makes a difference.
Blender version 2.82.7
How can I get Blender to do what it ought to?

In Blender 2.82, the fluids simulation system has been replaced by Mantaflow which default's caching methods, "modular" doesn't bake on playback. It instead allows you to bake different settings of your simulation individually, which saves a lot of time when you're tweaking your simulation.
You have to manually start the baking via the domain's panel. You can also change the caching method, but honestly the new "modular" is usually a better option).

I'd suggest you follow tutorials specifically made for Blender ≥2.82 or with "mantaflow" specified in the title.


Using bos fbx Error: "no module named UMIO" Using v2.77a
Should I go for a clean install? That is all I can think of doing.

Message:

From the error message it seems that you are using the BOS FBX importer with Blender 2.77.

The newest version of this add-on (at the time of this post) relies on precompiled libraries for Python 3.4 (see scripts/addons/io_scene_bos_fbx/win64bit/python34/UMIO.pyd) but Blender 2.77 ships with Python 3.5, so it won't be able to find the UMIO module.

Name                          Version
--------------------------------------------------
Blender 2.76                  Python 3.4
Blender 2.77                  Python 3.5
Blender 2.78                  Python 3.5

BOS FBX Importer 2015-07-04   Python 3.4

You need to either keep around a copy of Blender 2.76 to use this add-on with or ask the author to provide a newer version for Python 3.5.


Firefles in Glass rendering Every time I use glass material in Cycles render with diffuse or any other material with the help of mix shader, I always see 'fireflies' (small random illuminated pixels). I have already tried removing caustics after following BlenderGuru.

What helped me most times is increasing the size of the light source. At default, e.g. point lamps have a size of 0.1 units, so when calculating caustics blender just has rounding errors, I guess.

Of course, raising the size of your light source higher and higher will produce softer and softer shadows, so you have to play with the values.

Another guess: Don't lighten your scene with objects with emission materials alone – they will not produce enough light. Add standard point or area lights where necessary.


Hair deformation (Curves) I am currently working on a hair object for a character. The hair is a series of curves that use two other curves to determine the hair shape and taper variation.
My problem comes with trying to get the hair fit for animation.
My current working solution is to convert all the hair curves into one mesh and then use a lattice to deform the long back part, as trying to use automatic weights with a skeleton achieves horrible results (random weights or just fails to apply any).
I don't really want to rely on cloth physics as the hair is a very complex series of disconnected objects, and I know that would create several issues.
I wanted to know if there was a method to rig the entire group of curves with a skeleton or some shape deformation, or if I will need to go with my current strategy which is a combination of lattice and blend shapes on the merged mesh.

You can't really rig a curve with an armature.  (You can, but you're stuck using envelope weights, which suck.)
Converting to mesh is one option.  If you're interested in maintaining these as curve objects, to one degree or another, you can use curve modified meshes.  That will override your bevel but not your taper-- but I think you'll find that it's not too hard to create a mesh object to match your bevel; you can even use your bevel object, converted to mesh, as a start.
If you do decide to convert your curve objects to mesh objects, there are multiple ways to deform it, and for hair, using a lattice is one of my least favorite.  You can create bones for the strands of your hairs.  This may be easier to autoweight if you leave it as a separate armature, with a root bone that's a child-of your head bone.  But you can always weight it manually as well; simple linear gradients work well for this kind of hair, provided they're not too curvy.
But if you do want to use a lattice, be aware that you can use a lattice on your curve objects directly, without converting to mesh.
Another option, that you didn't mention, is using soft body physics for your curves.  Curves lack most physics options, but they can support soft body.  This can run on the spline (usually preferable) by enabling "Apply on spline" on the modifier (look at the buttons' tool tips.)  To "pin" one end of your spline, select a control point and look on sidebar/item/transform/weight.  This is a factor that's treated as the "goal" for the curve's soft body physics.  Curve physics usually have poor collision, as default soft body collision works just by creating a big sphere over every control, but if your goal is just some slight jiggle, or if you're willing to tune custom, non-rendering collision bodies, it can be fine.


Mesh Deformation due to rigging After I rigged a model part I noticed that some linked parts got kinda deformed, mostly they moved from the original position.

Does anyone knows what causes this and how can I prevent or fix that issue?
I tried to move the linked part but the whole mesh starts to follow it... Yeah,  I'm more of a 3DMax user and I'm kinda lost on Blender.

What's apparent in your image is deformation that differs between the talon and the toe.  The reason for this is that the margin of the talon has different weights than the margin of the toe.  If the vertices have the same weights, they will move together.
This is probably due to using automatic weights on a mesh with non-manifold boundaries-- ie, multiple separated meshes.  Autoweights are not a great way to weight these kinds of meshes.  You can merge the seams and then re-weight, or you can weight by hand, or you can create a manifold "cage" mesh, autoweight that, and then copy weights from it to your non-manifold meshes.
If your problem is that the rig isn't in its rest pose even when all bones have no transforms-- that as soon as you weight a model, it moves at all, even correctly-- then the issue is due to constraints or drivers that you've put on bones in your rig that cause them to transform, even when the bones haven't been transformed in pose mode.


how to move the camera without making the reference background image disappear? I am modeling something off an image. But I don't know how to move the camera without making the image disappear. How do I do that?

You can use an empty as image

Select the image in the properties->Empty->Display tab

You'll get your image (or video) in an empty. The advantage of this method is that your image will be visible as you rotate, and is visible even in when the 3D viewport shading is set to wireframe or bounding box.

Note that empties will not be rendered on the final render...


Missing faces after adding Boolean modifier I have a problem applying boolean after screw modifier.

Somehow boolean doesn`t work properly and some faces are missing along the cut.

Img. Missing faces

I`ve already checked mesh for duplicate vertices.
Applied scale and other transformation to all objects.
And recalculated normals.

Here is URL to .blend file:
boolean-bug.blend

You should remove the faces and edges in the middle before using the screw modifier. Because or else there will be interior faces in the mesh and it messes up the boolean modifier.


Can't see any indication in the 3D view , when changing mesh properties from python console Im using blender 2.75 in windows , i try to change the default cube model simple property data.edge[0].bevel_weight to 1.0
but i don't see any bevel change in the cube model in the 3d View
in the python console i do :

>>> cube  = bpy.context.active_object
>>> cube.data.edges[0]
bpy.data.meshes['Cube'].edges[0]
>>> cube.data.edges[0].bevel_weight
0.0
>>> cube.data.edges[1].bevel_weight = 1.0
>>> cube.data.edges[1].bevel_weight
1.0

looks like in the script it is working but why i dont see any thing in the 3DView?

Make sure you aren't in edit mode. If this is part of a larger script (your example looks like Python Console code), the standard practice is to go into object mode, perform your actions, then enter edit mode again, ie.

import bpy

cube = bpy.context.active_object

# store editor state
is_editmode = (cube.mode == 'EDIT')
if is_editmode:
    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

# make your changes
cube.data.edges[0].bevel_weight = 1

# restore editor state
if is_editmode:
    bpy.ops.object.mode_set(mode='EDIT', toggle=False)


I need help with uv editor I want to create a texture on a plane but after creating a second uv map for the other side idk how to scale it right. The back texture is on the same image also. i need to know how i can make it fit.

This is the texture https://www.textures.com/download/3datlas0401/138065?q=Nettle

and here is my file: https://ufile.io/p5ztw7p0

sorry for my bad english

I'm not 100% sure what the question is, but give this solution a try.

Go into edit mode, select all the vertices of your mesh with the A key, split the view to where you have a uv editor window, and the 3D view window, then, in the uv editor window, select all the vertices, s key to scale.

Hope it helps!


Blender rendered image black I'm trying to render an imported obj mesh file. I think I could successfully put the object in the field of view of active camera. But while rendering it doesn't show anything but a black image. I've attached the screenshot of the blender (In the attached image, I've intentionally black out a portion of the object).

From your image it appears that your light source is excluded from the render. In the outliner in the top right of your screen, enable your lamp rendering by clicking on the grayed out camera icon.


Pure white background + filmic + antialiasing: is it possible? I'm trying to achieve an image with a pure white background. Apart from the grey background, I'm more or less happy with it so far:

This is using Filmic, and I understand the reason for the grey background. I don't want to blow out the highlights in those transparent objects, so my goal is to composite this image onto a pure white background.
To try and achieve this, I enabled "transparent" under "film" in render properties, and then set up compositing like this

So I'm compositing with a white background, boosting its value up to 512 so that it will come out as pure white.
The problem is that the antialiasing looks pretty terrible. I've zoomed in a bit so you can see it:

I guess this is because it's still in the Filmic colour space when it's doing the antialiasing, so the antialiased pixels are just getting blown out along with the background.
This isn't really what I want to do. Ideally, I want to switch into a linear colour space and do the antialiasing there. I still want the render to be done in Filmic, but I want the compositing to be done in sRGB.
Is it possible to do that? Or is there another good way to get a pure white background on this image, without blowing out the detail or having aliasing around the edges?
(I realise I could just switch the whole thing into sRGB and re-tune everything to get a similar look. But this seems a step backwards. I like the way Filmic looks in general, and I want to stay in it for the rendering if I can.)

If you are using filmic blender, "White" is at a value of 16.19 aproximately, there is no need to push it past that number, as it might lead you to other problems, like the one you are experiencing.


How to push apart rididbody objects to avoid intersection? I saw this image on Grayscale Gorilla and I know how to do this stuff in Cinema 4D.

But I have problems to recreate it in Blender. What is the best way to clone objects to a volume and push them apart, so they don't intersect with each other.

Is there a way to do it it with physics and rigid bodies?

There may be methods that doesn't require aniamtion nodes, I will test that later. but here is what I thought at the most beginning and has been proven to be working:

Theory: using locations of particles as a guide for rigid body objects to set in their places. The intersection will be prevented by rigid body dynamics.

Add a particle system to a mesh. (This mesh and particles system should not be rendered at the end, you can just emit hallo or none. Hide the whole thing is also an option)
Uncheck gravity options so that generated particles don't fall with gravity.
birth should all be at 1 frame.
set source type to "volume". Change the velocity acoordingly (0, since the point is not to emit particles but keep them in the volume of mesh)

Finish modeling your "particle object" (preferably a single object). It can be "donut" or whatever stuff, add a rigid body dynamics to that. (Preferrably, you should also add materials at this stage. For reasons, please see the end of this answer)
go to animation nodes panel, the tree should look like this. The principle is stated in the theory. Caution, a check in "copy full object" is very important, It copies things such as modifier, physics and material. Each time you add additional thing to the original mesh, and you want to update it to the instancers, you have to do that again.

Up to this part this is basically done. There are several additional points to that.

if you want to randomize rotation or scales, use "random euler" (for rotation) and ["random number" + "vector from value"] nodes (for scale). ("Scale" is a vector, you can also use "random vector" for random number in each X, Y and Z. But by using random number + vector from value, X,Y,Z are uniform and I think this is what's expected most of time)

Due to rigid body, objects will firstly being pushed apart with a high speed. To pull objects back, easiest way I think is to add a force field, and set the strength to as negative as -1000 or even higher. You will see the effect that pulls objects back.
Some issues to be cautious with. If you rechecked the "copy full objects" for whatever reasons, the originally instanced meshes won't actually disappear automatically (This is different from normal circumstances). you have to manually delete them. Since everything is generated within "AN collection", simply lock all other collection, and shift + A to delete all meshes in AN. Don't worry, as soon as AN updates, the expected meshes will be generated by the node tree again.

let me know if you have any question.
for more information about AN, please go to mannual: https://animation-nodes-manual.readthedocs.io/en/latest/


Render shadows without denoise on a transparent background in cycles I have a problem with the graininess that appears in the shade. I want to render an object with a nice and clean shadow. The result is a png with a transparent background.
Render in Cycles engine. I have enabled Shadow Catcher, Transition, RGBA, Denoising - OpenImageDenoise . The number of Samples is 1000.
Can I fix this problem somehow?

This may not be ideal, but I solve this issue by passing the "Alpha" from "Render Layers" through a HDR Denoiser, then use the denoised alpha map to blend with the background image to generate the noise free shadow.


Unable to fully flatten a face in Blender I'm quite new to Blender and been practicing modifying meshes. I keep running into the same issue with trying to flatten ugly uneven faces. These faces are usually a product of a loop or bisect cut. Example:
I tried all of the following, which I gathered from other similar posts:

Transform to normals SXX0 (experimented with different combinations X/Y/Z)
Loop Tools -> Flatten
Mesh -> Cleanup -> Make Planar Faces
Face -> Solidify Faces
Face -> Beautify Faces
Object -> Shade Flat

Nothing above worked for me to make this face flat. As far as I can tell the vertices are lined up to X-axis. The only thing that was producing the flat face is performing a boolean difference with a rectangle. Which did create a nice flat face, but it created another undesirable effect - the perpendicular faces were reshaped and made uneven.
Original shape, still showing the "ripples" on the large face:
After applying boolean, "ripples" on the large face are gone but the perpendicular faces are now messed up:
This is another issue I'm looking to resolve since this is another problem I run into from time to time when I want to make a boolean cut.
I appreciate any advice to resolve either of the above.

The result of text to mesh.  Mesh Modifier with Apply selected.  Edit Mode.
Consider the Remesh modifier. You will get quads. This may increase evenness.
There is also the Edge Split Modifier.


Apply Texture map to 2D curve from svg I'm trying to map an image onto a shape(svg) that is the same as shape/size as the image.  I'm trying to do a digital version of decoupage cards. I cut out each shape as a layer. I export the base shape for the layer as an SVG from Inkscape. I then export that layer's color data as an image.

After getting stumped I attempted to follow this: SO texture mapping question to no avail though.

In Blender v2.7.6, I blow away the default cube. Import the .svg. Click on the svg, in the Properties->Curve->Texture Space I tick 'Use UV Mapping'.
I then go to Properties->Texture->Image load up the image ->Mapping I set Coordinates -> Generated. And this is what I get->

If I try the other method and extrude the path and then turn that into a mesh, switch to the Compositing view, I get this:

I'm unable to move the mesh around or do anything. I'm a bit stumped at this point.  I followed this youtube video for that method

I can easily get the texture map to appear on a cube or plane but I'm not sure what I'm doing wrong in this situation.

Sample files per request: image map->
svg->SVGfile

Use Match Texture space on the curve.

Then set your coordinates to Object.

You need then to adjust size and offset a bit.


How can I keep blender from freezing whenever I try to render or bake a somewhat heavy scene in my no good very bad computer? Well, I'm trying to render a simple chest, that's all, but it has some high definition textures and the vertex count is very high with SubSurf. I can work fine in the 3Dview, the thing is whenever I try to render my humble chest Blender flips the heck out and starts doing some very time consuming calculations, then RAM use go waaaay up and my whole pc freezes and never comes back A La Chavo del Ocho so I have to turn my PC off and on again. Then I thought, well I just have bake the textures that are causing this and the render will go fine. Well, I was wrong yet again and my PC freezes again, and the weirdest thing, when I use 1000 samples in the bake blender crashes after some time and my computer comes back, but when I use 200 it never comes back. My computer is very bad:
Intel Core i3 3110M 2.40GHz
8gb DDR3 memory(dual 4096 MBytes)
Intel HD Graphics 4000
Windows 10 Pro 64bits Laptop

I was under the impression that the only thing that was gonna happen were very long renders and that would be fine but now i'm afraid and sad that I need a new computer to go on with my studies and right now I cant. What can I do? Do I have to just do simple works while I wait to buy new hardware?

The most likely reason for such a crash is running out of memory - and for what you describe as a simple scene you should not be running out of memory.

In order to reduce the memory requirement for your scene you could try reducing the size of your textures, simplify your mesh, reduce the level of subdivision surface modifiers (there are separate settings for Preview and Render - check both) and check for other modifiers that generate geometry (for example, a Remesh modifier can easily become a problem if set too high).

Simplify the scene and objects until you get a working render and then start adding complexity again until you find the cause.


two same objects rotating differently I got two steers that are physically the same, both of them are parented to an Empty which is rotated in X axis, but both rotate differently when I see them from camera point of view (while holding R), in this picture you can see how the top one (steer 1) rotates 90 degrees in Y axis while X and Z remains in 0. In the other hand, the lower one behaves completely different, it rotates 90 degrees in Z axis while X and Y values are also being changed:

Here is the blend file: https://puu.sh/F1GTy/12964c9a79.blend

The real problem with this is that I'm building a game with working steers and using only Y axis to rotate completely simplified my life, sadly the guy who did the steer that rotates correctly at Y axis is now unreachable. Now all I want to do now is to imitate that behavior, all the steers I made are suffering from this issue. I've already tried clearing Scale, Rotation, Position, etc, getting this problem with the steer that was supposed to work fine made me to ask for help.

I've fixed it for you.

You needed to keep the Y-axes of the steering wheel aligned to the direction perpendicular to the plane of rotation (shown below). The purpose of parenting the steering wheel to the empty was so the axis of the steering wheel stayed aligned for your desired rotation axis.

All I needed to do was to enable Transform Only > Origins, and Face Snapping with Align Rotation to Target then snap the origin onto that flat panel in the middle of the steering wheel. This allowed me to realign the origin of the steering wheel with the normals of that surface. However, this places the Z-axis in the direction you wanted the Y-Axis, so I just rotated it 90 degrees about the X-axis.

Then, just to make sure I didn't move the origin, I pressed Shift+S, Selection to cursor. (The 3D cursor was conveniently already at the origin's original location)

Edit: Alternative metohd for pre 2.81

Rotate the empty box back to 0 degrees for all axes. This will bring the steering wheel back into an orientation where the global Y-axis matches up with the desired rotational axis. Unparent the steering wheel with Alt+P, and press Ctrl+A and Apply rotation to the steering wheel. Then you can reparent the wheel to the empty and it should work as intended.


How to move bones with IK? Hi, does anyone know how I can move the end bone?

The bone only rotates or scales depending on the connected checkbox.

File here:

You need to create a controller bone that will control your IK:

Create a bone from the last one and deparent it with alt P.
Deactivate the Deform option of this bone so that this bone won't deform the mesh of your object when you'll parent it to the armature.
Choose this new bone as the Target of your IK bone.
Move the controller, the bones will follow.


get this gradient style in blender I'm trying to get this gradient style:

My best result are with eevee with volumetric and gradient on a metaball, but i cannot figure out how to get the gradient fill the totally of the metaballs like as one object instead of multiples single object.
Also i have to animate this so the mixing gradient has to coerently mix, so i cannot use window or camera coords...

Now this is my result
and this is my shader node

I'd like to have control ho the position of the gradient, i'm pretty new to blender, in cinema there is a "3d gradient" that can make me understand the position of the coloured portion in the object space.
The second problem is, as i emit this metaballs from an particle emitter, How can i control of the colured zone? i suppose only into a camera or screen coords, or is there a way to use the emitted particles as one big mesh that as a unique object coordinates?

Thanks a lot for any suggestions.

Ok i've figure out. Because i'm a noob in blender i do not know that meta object share same material so in my case

if I move these metaballs the gradient remain fixed in the center, instead of follow the single metaball, than i've found in another post forum, that i need to unlink meta object form others, and it's just simple as rename in differnt name, so instead of naming it meta.001 meta.002 meta.003 you have to change totally the name. It's sound weird but i suppose it's for otpimizating...

so when i changed the colors goes right but i've lost any possibility to use the metaball function and does not modify it's geometry

Gradient texture is your friend:
https://blender.stackexchange.com/a/49351/88382

You can also play with lights, since it seems that in one of the reference images the colors of the metaballs come from colored lights.

(if you need to have a single objects instead many objects you can join them. I think that metaballs btw are considered a single object in blender, so the colors are applied to the full object, not to the single meta-primitives - so please share screenshot or blend file to fully understand the problem)


is there a way to blur the edges of the holdout shader I'm currently working on a VFX scene where I add volumetric fire to parts of my scene but in my footage I have objects that move in front of the camera I modeled each object in Blender and decided that the holdout shader would work great for masking out these objects since blenders z-depth pass doesn't work for volumetrics.

The holdout shader works perfectly but the problem is the edges of the mesh with the holdout shader create a very sharp contrast between the alpha and the fire.

Since I don't think it's possible to do blur the edges of the holdout material in compositing is there a way to create a node based holdout material that smoothly fades to alpha on the edges of the mesh removing the harsh edges?

here is a simplified blend file of the issue the holdout shader would be used to mask out 3d geometry with camera tracking but the edges of the holdout where the orange flames are behind the suitcase are too sharp I could blur the alpha channel but this would also effect the blue flames in front of the holdout

heres an example with images from a project i'm working on:

the flames are volumetric materials and the holdout shader would be used to mask out 3d geometry with camera tracking but the edges of the holdout where the orange flames are behind the suitcase are too sharp I could blur the alpha channel but this would also effect the blue flames in front of the holdout

From your screens it seems to me like you want to smooth part of an edge that is (in reality) optically smoothed by Bloom Effect.
If you can’t use bloom effect in post-production directly, try this … take your mask object, blur its alpha, invert and subtract it from alpha of fire object.

There are two issues to solve ...

ad First - your example material setup use for Volume - Emission shader, that is visible in viewport render, but invisible in render (F12). Material is rendered, but alpha for this material is not generated. From developer side the bug is viewport vs render (F12) inconsistency, but F12 is as designed = emission without alpha is correct. This can be solved by adding Volume Scatter shader.

ad Second - in blender wasn’t a way to get ID pass (or Cryptomatte) of object with volumetric material. From 2.82 beta build, blender use AOV that can output any state of material node tree. So I used AOV to separate specific alpha for Blurring.
(Properties Editor > Layers > Passes > Shader AOV, create one. Go to Shader Editor, add AOV Output node with proper name and set white colour. For more about AOV see Blender Manual or Blender Today #86.)

Note: I had to add Transparent shader to Surface (feeding only Volume didn’t object pass as well). Pass of this volumetric object get object shape, not volumetric texture.

Since your scene consist only from fire I blurred mask object (cube).
To get "fire" pass you can use Alpha socket ...

Show before/after. Sorry for poor render (6 samples only).

... or convert render with ColorRamp into black&white image. That is not mathematically accurate, but gave me nicer result.

(I created also pass for orange fire, but in this comp was not needed.)


Need to scale a ring without changing thickness via animation I'd like to take a ring and animate a increase in diameter without changing the thickness. The issue I'm running into is this: in order to get the thickness to stay the same I  have to attach a mesh to a curve, then scale that curve. However, doing so requires me to add more to the mesh's array modifier. I intend to use this object in unreal so I'm looking to rig and animate this ring. Is there a way to get the ring to actually stay a ring whenever I scale it?

The starting size and the size i'd like to scale to:

What happens when I scale the ring:

The Array modifier can automatically adjust to the size.
Just choose Fit Curve and select your Bezier circle.


Ubuntu and Alt keyboard shortcut To do some stuff in Blender I need to use Alt key. It seems, however, that on Linux Ubuntu the left Alt can't be used for some actions(let's say, for example, Alt + RMB). However, when using right Alt key I than need to click the left Alt key, otherwise Blender goes to uneditable mode. I know that I could change Alt to something else, but I am used to it and I don't want to do so. So I rather wanna know how to prevent Blender from going into the werid mode(where I can't edit things).

This is because Ubuntu uses the alt key as a default-key.
This worked for me.

https://askubuntu.com/questions/521423/how-can-i-disable-altclick-window-dragging

regards


No shadows on plane in Eevee Rendering Cycle renders is all good.

but, here is the Eevee one.

Its someway apart. What settings I need to change?

To make the shadows stand out the most, a point light with a small radius is ideal. However, if you are using an area light or a sun light (or other large scene lighting), you can still achieve clean shadows by disabling "Soft Shadows" in the Render Properties settings. This will give the shadow an "aliased" look, however, so you may have to increase the Cube Size accordingly. Also, make sure to check "High Bitdepth".

For any lights you are using, go to the light properties, and make sure "Contact Shadows" is checked. This will make sure adjacent touching surfaces don't allow light to leak through.


Getting edges of the camera's view on the scene XY plane I need to place objects randomly into a scene so that they are consistently within the camera's view.
I have a script which randomly places a perspective camera pointed at [0,0,0] at a variable distance. What I would like to do is to place a flat object onto the xy plane, centered at [x,y,0] , with x, y placed so that the object's center is guaranteed to be within view of the camera.
But it's not enough to place the object at the center of the view, there needs to be some variability. So I want to convert from camera coordinates (2d, ie [0,0] for camera top left and [1,1] for camera bottom right) to 3-d coordinates [x,y,0]; if I place an object randomly within the camera view, it will be placed randomly in world-space so that it is visible.
Attached image shows what I mean:
I'm aware of bpy_extras.object_utils.world_to_camera_view(), I effectively need the opposite of that command parameterized by 2 out of 3 world coordinates...

From the camera view frame.
bpy: How do you find the corners of a camera frustum?
A camera points in the -Z direction. For a perspective camera can find the vectors of the origin to the frustum and if and where they intersect with the XY plane.
Test script.  Have kept it simple. Uses the scene camera, finds the frustum, adds a cube on XY plane given image (0, 1) coordinate.
Please note: have used (0, 0) as bottom left and (1, 1) as top right.
import bpy
from math import inf
from mathutils.geometry import intersect_line_plane as ilp

# Global XY plane
plane_co = (0, 0, 0)
plane_no = (0, 0, 1)

context = bpy.context
scene = context.scene

cam = scene.camera
mw = cam.matrix_world
o = mw.translation

camdata = cam.data

tr, br, bl, tl = [
mw @ f for f in camdata.view_frame(scene=scene)]
# offset vectors from bl.
# eg middle would be bl + 0.5 * (x + y)
x = tr - tl
y = tr - br
# roll around in CCW direction
for image_coord in ((0, 0), (0, 1), (1, 0), (1, 1)):
    cx, cy = image_coord
    # vector pointing from cam origin thru image point (PERSP)
    v = (bl + (cx * x + cy * y)) - o

    pt = ilp(o, o +  v, plane_co, plane_no, True)

    if pt and (pt - o).dot(v) > 0:
        print("Adding cube at ", pt)
        bpy.ops.mesh.primitive_cube_add(
                location=pt,
                )

    elif pt and (pt - o).dot(v) < 0:
        print("BEHIND THE CAMERA")
    else:
        print("NOT POSSIBLE")

A plane to represent this.
Make a plane outlining the possible locations seen by camera. Tweak to make a plane mesh based on the points.

Plane defining allowable locations in default scene
coords = []
for image_coord in ((0, 0), (1, 0), (1, 1), (0, 1)):
    cx, cy = image_coord
    # vector pointing from cam origin thru image point (PERSP)
    v = (bl + (cx * x + cy * y)) - o

    pt = ilp(o, o +  v, plane_co, plane_no, True)
    if pt:
        coords.append(pt)
print(coords)
if coords:
    name = f"{cam.name}_ViewPlane"
    me = bpy.data.meshes.new(name)
    faces = [range(len(coords))] if len(coords) > 2 else []
    me.from_pydata(coords, [], faces)
    ob = bpy.data.objects.new(name, me)
    context.collection.objects.link(ob)

Tests

59 random scaled dots per click at random(), random()

150 Foos
Related.
How to find all objects in the Camera's view with Python?
Camera coverage calculation inside a room
projecting onto a mirror and back?
https://blender.stackexchange.com/a/160388/15543


Change units , and respect the scale of the scene? i got this bad idea to set up my blender in meters
and when i draw architectural plan , everyone use cm
so then i tried to change my units

right now its like that :

my guy is 1.7meters tall , so its 170cm when you convert .
if i want to move an object 30cm to the left i must type 0.3
and i really dont like that , no architects does that, its just not how you draw arch.

so here the changed version

now when i want to move something 30cm to the left i need to type 30 , thats exactly what i want , but now my object is 1.7 cm , all my scene is screwed

wait i know , i know, i can scale it afterward...
but then what about my 130+ assets and +300 materials that are made in meters? are they all to rework one by one ?? i think its a huge fail blender think that 1.7 in meters is 1.7 is centimeters ...

can someone resolve my problem ?
thanks

When you change the unit preset to centimetres you are changing the unit scale. The unit scale determines how big a unit is, a scale of 1.0 means one unit is one metre, and a scale of 0.01 means the same one unit is 0.01 metre or one centimetre.

You don't need to change the unit scale to be able to enter centimetre measurements, you just need the object size to be the correct scale compared to other object in your scene, this would mean scaling down small objects that import too large or adding .0 before any measurements you want to be in centimetres.

To move an item using unit measurements, press = to start advanced entry mode before you enter the amount. That is GX=30CM will move the object 30 centimetres on the x axis.


How to make axes more visible on a blueprint? Hey. I have faced a problem, I don’t know how to make more visible axes on a blueprint. Help me please.

In the Properties editor > Object Data > Empty, enable the Use Alpha option, you can also play with the transparency.


Some modifiers missing in "add modifiers" tab When I go to the Properties tab, click on Object Modifiers, and then Add Modifier, I notice that a lot of the modifiers are missing.  For example, "Mask" modifier does not appear, "Boolean" also doesn't appear, and neither do several others (which would take a while to label). I'm using blender 2.76b, but I was also missing them in 2.74 (which I was using before 2.76b).

any ideas on what it could be?

Not all modifiers are available for all kinds of objects.
The main difference is between Mesh objects and Curve objects

For Mesh Objects you can use:

If you are dealing with curves (and text is considered a curve object) none of the modifiers you mention will be available, only these:


Transferring colors from my Direct/Indirect passes into Color I'm doing some compositor effects on my Cycles passes before outputting them to Krita and recombining them. But I'm running into a problem: Cycles stores a bunch of indirect light color in the Direct and Indirect passes, which complicates some of my setup. I want my shading passes to be totally black and white, and all the color to be in the Color pass. I'd like to transfer the color from the Shading passes to my color pass.

The normal way passes are combined is (Direct+Indirect)*Color. So I want to somehow alter the Color pass based on the colors in the Direct and Indirect pass, so that when it's all combined, it looks the same as it does now. I'm not really sure where to start with this. Is this something that can be done?

Why there is color in other passes than Color
The direct and indirect stands for direct or indirect lighting so if the light has color, it will show in direct passes and if objects in the scene have color and light bounces off them, the light color will change accordingly in the indirect passes. These passes are supposed to have color. You can change the colors of your objects without changing lighting by changing the Color passes. Unfortunately this means indirect light that bounces off those objects has to be recalculated during rendering for it to change.
Separating color can be done
If for whatever artistic purposes you would like to separate all the color, you can do that in Blender or in any other software that supports 32bit image editing just by manipulating the images.
In this case you could make a copy of the image you wish to separate with a RGB to BW node and simply divide the colored image by it. You would have to multiply them together to get the colors back, so now you can multiply only the color 'passes' together and have the greyscale image for the separated monochromatic part of lighting:

Should you do it?
Obviously, you can do this separation at any moment in the compositing, even with the final image, but then passes are not needed. This can be done inside most image editing software. In many cases the purposes of rendering passes includes separation of the lighting from the colors and textures of the objects.


How to convert a CSV file to 3D Text objects with Python? I want to take a simple CSV file and specify 2 rows then print them next to each other or below each other as separate objects:
eg. row 6 = NAME row 7 = TITLE

I am trying to read the list to reconstruct them as varying elements of a base title. I thought that I could place them on their own layers but I run out of layers quickly. So then I thought that I could allocate each pair to a series of frames or single frames to render.

Heres my text file

My code snippet reads out one row but I'm not sure how to iterate the rows and positions of each new row?

import bpy # THIS IS A MUST TO IMPORT ALL BLENDER PYTHON MODULE
import csv # IMPORT CSV MODULE

 # READ INPUT FILE

file = csv.reader(open('D:\daves\WBD\wbd filtered text', newline=''), delimiter=',')

curRow = [] #empty placeholder for current row

for idx, row in enumerate(file):
    if idx<22: # this is hard coded but you can use

        curRow = row

        # display first data index as string
        bpy.ops.object.text_add(location=(0,idx,0), rotation=(0,0,0))
        bpy.ops.object.editmode_toggle()
        bpy.ops.font.delete()
        bpy.ops.font.text_insert(text=curRow[7], curRow[6])
        bpy.ops.object.editmode_toggle()

Try this:

import bpy # THIS IS A MUST TO IMPORT ALL BLENDER PYTHON MODULE
import csv # IMPORT CSV MODULE

# READ INPUT FILE

fp   = 'D:\daves\WBD\wbd filtered text'
file = csv.reader( open( fp, newline='' ), delimiter=',' )

nameIdx = 6 # Column index of text object's name
bodyIdx = 7 # Column index of text object's body (content)

for idx, row in enumerate( file ):
    if idx < 22: # this is hard coded but you can use
        # display first data index as string
        bpy.ops.object.text_add(location=(0,idx*2,0), rotation=(0,0,0))

        # After the line above is executed, the added text object becomes
        # the active object, referenced as the bpy.context.object
        # 't' will become a shortcut variable to access this object
        t = bpy.context.object

        # Access and alter the text object's name
        # This will be reflected in the outliner and object properties panel
        t.name = row[ nameIdx ]

        # Often in blender, the 'data' property holds specitic data
        # related to the object's type. For instance, a polygonal mesh
        # object's data property hold data about vertices, edges and polygons
        # among other things.
        # A text object's data stores the "body" property, which is the
        # actual text content of the text object. In this line we are
        # updating the text content, and assigning it the name, a newline
        # character and then the title.
        t.data.body = row[ nameIdx ] + "\n" + row[ bodyIdx ].upper()

For simplicity's sake I combined the name and title to one text object (with a newline special character "\n" between them), but you can of course simply generate another text object and offset its position with a variation of this code.


Help with transitioning color with dynamic paint I am trying to create an effect where the color (green) spreads from the center and then regresses with a certain path. The only way I have been able to do this so far has been through the dynamic paint function and through using a secondary object as the brush to control where the color is added to the primary object.

In the file found here I have a rounded object which is being painted by an expanding cuboid mesh. The difficulty I am having is with the erase function. Though I have selected "erase paint" with the two lateral rectangles, neither of them is erasing the paint when I examine the bake image result. Their paths are correctly animated towards the center. The only thing that I have found that actually succeeds in erasing the painted color has been to duplicate the original brush, make it 30X its original size and select the "erase paint" option.

Using this method, however does not afford enough control in where the color moves. Color animation does not seem like it should be quite this complicated and I would very greatly appreciate any help you can offer with dynamic paint or suggestions for other ways of achieving the effect located in this video (with the expanding yellow circles). Thank you all, again, I greatly appreciate your help! In essence, I am trying to animate the process of taking a piece of paper, drawing graphite along the surface in a smooth fashion, and then erasing bits of the graphite to reveal the paper below.

I am new to the software and am trying to help my professors make some videos for my medical school classes.

The central cube is the brush as my goal is to have straight edges to the color animation.

This is the render demonstrating the green color being added.

By expanding the central cube, the color has been expanded to the entire surface.

The outer rectangles are then moved in with the intent of removing the color from the outer edges. This is intended to give the effect of the color being removed in the opposite pattern as it was deposited.

Further central movement is intended to remove the color from the lateral edges proceeding into the center.

After the bake sequence is complete and the product is rendered, the color is not being removed by the "erase paint" function. The node I used is also demonstrated; it is a image

First Suggestions.

Select for Brushes, for data value Paint Source

Mesh Volume + Proximity

as indicated by the Yellow Arrow. Image Above.

For the Canvas change Resolution to 128 for a higher resolution image and smoother transtions

See Yellow Arrow Image above.

I am not claiming this is the minimal set of changes.  You can test the two changes.

This is an improvement.  There may be other lesser problems.

OLDER

To have a circular or blob spread,  create a sphere or similar blob and use it as your paint brush. Your current box paintbrush is not going to fulfill your goals.  A sphere is a standard object and can be further shaped with proportional edit tool which can be searched here at BSE or the general internet.  This low cost improvement can be started by you immediately.
Experiment with the Dry and Dissolve features of Dynamic Paint.

Other suggestions may come later.  My time currently at BSE is expiring.


Number changing animation with animation nodes? How to make number changing animation with animation nodes pleae?

First we have to make two lists of texts. first list containing 5 copies of 14.5 260 and second list containing the modified text. Then we can use a switch node to switch between these two lists. The switching condition can be set using a sine node which produces flickering effect.

Here is the full node tree :


Dynamic Paint texture with Cycles I started following this tutorial from Blender Guru to do a rainy scene. While most of it works, he's using Blender Render, and by the end the process of setting up the dynamic paint just doesn't work the same way in Cycles. Specifically, after this moment (21:24), the process changes completely, as Cycles Render uses nodes, while the Blender Render does not. Anyone can assist me in setting this up for Cycles, taking into account that all my materials are using the new Principled shader?

I have tried using the baked image sequence as the factor for a mixed shader but have gotten no results. The material remains the same after plugging it in.

Further screencaps, I got it to try to work for one frame, I don't even know how, and I should've screencapped it, but some more as proof that this is not working.

Notice how that's supposed to be frame 46, have a look at the mask for frame 46.

This should be very much mixed down to the other half.

To get the frames to update when previewing in the 3D viewport, you need to enable Auto Refresh on the image texture. In final render, this is not needed.

This is not documented in the online manual's section on the Image Texture node, and the only references I've found to it are on the various help sites for Blender. Therefore I can't say for sure why this is so, but I'm assuming that in the 3D viewport speed is given priority over accuracy, while renders give priority to accuracy over speed.

In this answer to a related question, it is mentioned by Ray Mairlot. I've seen this mentioned in other places as well, but this was the first one a quick search turned up.

You may also want to try using the Alpha socket of the image texture as input for the Fac socket of the mix node, though that will depend on how the dynamic paint was set up.


Difference between visual and normal keyframes I was looking at this question:

What do the preferences keyframing options actually mean?

I still can't figure out what the difference is between a visual LocRotScale, and just a normal LocRotScale.  An in depth explanation would be nice.

The following cube has a limit location set to (0,0,0) when you move the cube its position in the viewport don't change while the location info in the transform panel shows this change:

this is the case for all constraints they won't change what is displayed on the properties panel while they change the visual properties ( loc, rot, scale)

so you if you keyframe the location you'll store (1.938, 0.411, 1.286) for the current frame
while if you keyframe the visual location you'll store (0, 0, 0)


In Python, given x-value on 2D Bezier Curve, return y-value I am attempting to create my own transfer function.

So first I draw a curve:

3D View > View > Top

Info > Add > Curve > Bezier

Tab to enter Edit Mode

Curve Display > Normals > (off)

Properties > (Curve icon) > Shape > 2D

Create the curve using:

RMB to select waypoints or control points
G to move them,
Select last waypoint, E to 'extrude' i.e. add another waypoint,
or
Select two adjacent waypoints using RMB and ShiftRMB > W >

So now I have my curve:

How do I now, from a Python script, retrieve the associated y-value for a given x-value?

P.S:
This question follows from: Create custom graph and access values from Python but I realised that trying to hijack the keyframe animation curve editor for this purpose is trying to get a square peg into a round hole.

The following script uses the formula for cubic Bezier curves (which Blender approximates) to first determine t (which is the parametrization of the curve) from x and then gets y from t.

import bpy
import numpy as np

def main():
    '''Here's an example usage of these functions'''
    x = 5.0
    bez_obj = bpy.data.objects['BezierCurve']

    print('The y-value is', getYfromXforBezierObject(bez_obj, x))

def getYfromXforBezierObject(bez_obj, x):
    '''Given a Bezier object which, when projected on to xy-plane, is a
    well-behaved function (i.e. each x-value has only one associated y-value),
    this returns the y-value for a given x-value

    The higher resolution your curve is, the more accurate the resultant y-value
    will be.'''

    #find appropriate segment
    segment_i = determineBezSegment(bez_obj, x)

    if len(bez_obj.data.splines) > 1:
        print("WARNING: your Bezier object has multiple splines!")

    spline = bez_obj.data.splines[0]

    #get the four points that control the cubic bezier segment
    P0 = spline.bezier_points[segment_i].co[:2]
    P1 = spline.bezier_points[segment_i].handle_right[:2]
    P2 = spline.bezier_points[segment_i+1].handle_left[:2]
    P3 = spline.bezier_points[segment_i+1].co[:2]

    y = getYfromXforBezSegment(P0, P1, P2, P3, x)

    return y

def determineBezSegment(bez_obj, x):
    '''Given a Bezier object and an x-value, determine which of the cubic
    segments corresponds to that x-value.
    A return value of 0 would represent the first segment.'''
    print(bez_obj.data)
    bez_points = bez_obj.data.splines[0].bezier_points

    if len(bez_obj.data.splines) > 1:
        print("WARNING: your Bezier object has multiple splines!")

    #loop through all segments and find which one contains x
    for segment_i in range(len(bez_points)-1):
        start_point = bez_points[segment_i]
        end_point = bez_points[segment_i+1]
        #break if this segment contains x
        if start_point.co[0] <= x < end_point.co[0]:
            break
    #check if no segment was found
    else:
        print("WARNING: no segment found for given x-value and Bezier object")
        return None

    return segment_i

def getYfromXforBezSegment(P0, P1, P2, P3, x):
    '''For a cubic Bezier segment described by the 2-tuples P0, ..., P3, return
    the y-value associated with the given x-value.

    Ex: getXfromYforCubicBez((0,0), (1,1), (2,1), (2,2), 3.2)'''

    #First, get the t-value associated with x-value, where t is the
    #parameterization of the Bezier curve and ranges from 0 to 1.
    #We need the coefficients of the polynomial describing cubic Bezier
    #(cubic polynomial in t)
    coefficients = [-P0[0] + 3*P1[0] - 3*P2[0] + P3[0],
                    3*P0[0] - 6*P1[0] + 3*P2[0],
                    -3*P0[0] + 3*P1[0],
                    P0[0] - x]
    #find roots of this polynomial to determine the parameter t
    roots = np.roots(coefficients)
    #find the root which is between 0 and 1, and is also real
    correct_root = None
    for root in roots:
        if np.isreal(root) and 0 <= root <= 1:
            correct_root = root

    #check to make sure a valid root was found
    if correct_root is None:
        print('Error, no valid root found. Are you sure your Bezier curve '
              'represents a valid function when projected into the xy-plane?')
    param_t = correct_root

    #from our value for the t parameter, find the corresponding y-value using formula for
    #cubic Bezier curves
    y = (1-param_t)**3*P0[1] + 3*(1-param_t)**2*param_t*P1[1] + 3*(1-param_t)*param_t**2*P2[1] + param_t**3*P3[1]
    assert np.isreal(y)
    # typecast y from np.complex128 to float64
    y = y.real
    return y

if __name__ == '__main__':
    main()

This script will work only if your Bezier curve is a function when projected into the xy-plane (hit NUM7 and make sure it passes the "vertical line test").


How do I reparent an entire model (and accompanying objects) to another armature? I have a model composed of several objects: the main one is a body parented to the armature using vertex groups; there is head parented directly to the head bone, and there are also supporting objects for attaching other props, also parented directly to bones - the model wasn't originally made in blender and that's how it's imported. Props attached to the support objects are parented to them using constaraints.
Now, I obtained a modified skeleton that has added IK for arms and legs. Apart from this one thing, the names of deform bones, their locations etc. are all the same. Is there a quick way (or a script) to reparent everything - main body, head and the support objects - to the new skeleton without the offsets blowing up? If it was just one character, I would do it slowly by hand, but there are lots of them - all with the same structure.
Thanks in advance for any help.

This does indeed sound scriptable. Here's some docks.
Python API on parenting: https://docs.blender.org/api/current/bpy.types.Object.html?highlight=parent#bpy.types.Object.parent
Parenting Inverse explained: https://docs.blender.org/manual/en/latest/scene_layout/object/editing/parent.html?highlight=inverse%20parenting
The process sounds simple enough, though I don't know for sure without seeing the direct file.


How can I apply a basic material to an object using python in cycles render? I would like to be able to apply and edit a material to objects I have create using python script. I am using the cycles render engine but can't find a way to get this to work.

I've tried a bunch of the answers already given in other threads but none of them seem to work.

I would like to: create and apply a new material for each object and adjust the colours using rgb, using nodes or otherwise.

Sorry if this is a stupid question, I'm very new to blender scripting!

The super-simple example is

import bpy

def mission1(obj):
    mat = bpy.data.materials.new("bacon")
    mat.diffuse_color=(0.8,0,1)

    obj.data.materials[0] = mat

obj = bpy.context.active_object
mission1(obj)

If you need to actually create and rig nodes, update your question with a screenshot of nodes you have manually created and if I have time I'll cobble together some code to build a matching node tree using python.


Create Object along three curves Hello,

I want to create an object along three given curves (brown, blue, black) just like in the picture (with Blender 2.76).
But I haven´t got a clue how to start or which function I should use...
Has got anyone any idea?
Thanks.

Sverchok

You can build the geometry starting from the curves interactively by accessing their vertex coordinates with the Sverechok add-on.

As you can see in the image sequence below, this will allow you to move each curve in object mode or it's control points in edit mode and transform the resulting surface by simply updating the script.

For the following, example I choose to build an 3-points-arch for the sake of semplicity as Sverchock has a built in node that is able to create an arc from a given points triplet, but with more effort you can surely achieve whatever result.

On the right of the image below you can see three Object input nodes, one for each curve, followed by a Matrix apply node to get the absolute coordinates of the vertices. As they are stored in separate lists, you'll have to join them. By enabling Mix option we esure that all the first vertices of each curve is bundled with the other in the array.

Then you just have to set the arbitrary resolution of the arc and place an output node (Viewer Draw in this case).

In order to get a full surface we should add some nodes. In this case I picked a Cylinder's polygons indices after filtering out the faces that were connecting the two curves on bottom and joining this data with the vertices coming out from the 3 Point Arc node.

The images above are showing a blue surface because it's just the add-on preview, no "real" geometry has benn created yet, as before we must define also the edges of the surface.

As did for the polygons, I filtered out the edges (they need some further math tricks) and then added a Bmesh viewer to bake the surface in the scene.

Here's the final node setup:

Note:
The nodetree is expecting curves made by the same amount of vertices (there is a node where you should input that). Keep them with the same number of control points & resolution. Same thing if you choose to input meshes instead of curves.


Blender Game Engine: Do something when an 'action' animation happens For a game I'm making, I need to make a sensor be positive every time an 'action' animation runs.
This is my shooting setup:

So how do I check what frame an action is at? Because if this is possible I can make a python script so that when the animation is at frame 1 it does something.

You can add a property (float or int) and enter it into the Frame Property field (right lower corner of your image). Then you can check the property with a property sensor.

Be aware that frames are float. Therefore it is better to check against a range e.g. 0.5 ... 1.5 (Interval mode) rather than a concrete value, as it is not likely to match it.


Smart unwrap using script I am stuck. I am trying to smart unwrap objects individually using script.

I tried this code but it fails. Any help is appreciated

import bpy
import time

for obj in bpy.data.objects:
    if (obj.type == 'MESH'):
        bpy.context.scene.objects.active = obj
        print(obj.name)
        bpy.ops.object.editmode_toggle()
        bpy.context.object.data.uv_textures['LightMap'].active = True
        bpy.ops.uv.smart_project(angle_limit=66, island_margin = 0.02)
        bpy.ops.object.editmode_toggle()

Code Edit for 2.8x, for 2.7x see previous revision.

Some Edits

The collection bpy.data.objects is all objects in a blend file,
whether linked to context scene, another scene or no scene. If not in
the context scene cannot be the context object. Use scene.objects
I put the "convenience variable" context in test scripts, so I can
paste later into panel or operator code where it is passed as a
parameter to most methods, in which case better not to use path addressing from bpy IMO   it gets tedious reading bpy.context.object.data.uv_foo.bar.blah
Add a UV map named "LightMap" if the mesh doesn't already have one.
Blender uses radians not degrees as the native unit of rotation.  This appears to be one of the anomalies.
Remember to select faces to be unwrapped.

Script

import bpy
from math import radians

context = bpy.context
scene = context.scene
vl = context.view_layer
# deselect all to make sure select one at a time
bpy.ops.object.select_all(action='DESELECT')

for obj in scene.objects:
    if (obj.type == 'MESH'):
        vl.objects.active = obj
        obj.select_set(True)
        print(obj.name)
        lm =  obj.data.uv_layers.get("LightMap")
        if not lm:
            lm = obj.data.uv_layers.new(name="LightMap")
        lm.active = True
        bpy.ops.object.editmode_toggle()
        bpy.ops.mesh.select_all(action='SELECT') # for all faces
        bpy.ops.uv.smart_project(angle_limit=66, island_margin = 0.02)
        bpy.ops.object.editmode_toggle()
        obj.select_set(False)

Resultant UVMap "LightMap" on Suzanne, using limit angle radians(66) interpreted as 1.152 degrees

Related

https://blender.stackexchange.com/a/172990/15543


3d objects that disappear in my scene when rendering using cycles I'm creating a small scene, which is my bedroom, and following is the problem i'm facing

This bed that shows in preview mode just disappears in cycle render

Only the feet remain.
These two objects are cubes with these modifiers applied to

the material applied is the Following:
the only change between the two is the color

i use an hdri combined with a directional light pointing to a point in space that i can move,
The camera is rigged with constraints on a location point and a look at point
I'll appreciate any help of any kind, best regards,

Following is the answer to the problem i had:
after conversing with @lemon , he/she as found a the answer.
Regarding the modifiers i was appliying, the subdivision surface modifier was set to 0 for the render as you can see in the image.

So, the smooth modifier was smothing a mesh that has to few vertices to be seen on screen.


Turn Obj-sequence into FBX file for Unity? I have a sequence of objs of an object deforming, each of which has the same number of vertices and faces, that I would like to be able to put together into an animation and then export as an fbx that could be brought into unity.

I've used 'Stop Motion Add-on' to import the sequence which seems to have worked, I can play the animation, but when I try to export as an fbx I just get a single object of whatever frame I was on with no animation attached to it.

is there some special way I need to export it so that the animation is part of the fbx file?

You can try Import OBJ Sequence As Shape Keys blender add-on from here. As described by you and shown in the video on the add-on page, it seems to work in your case.

Download the add-on from here (Windows).

Initial setup is as follows:

Select “File” - “Import” - “Wavefront.obj” from the “file” menu and navigate to the directory which holds the OBJ sequence
Select the first OBJ file in the sequence and click “Import OBJ”.
Select the newly imported object in the 3D view or the outliner
Select the “Object Data” tab in the main properties panel
In the “Shape keys” section, click the “Add shape key to object” button (+)
Uncheck the “Relative” Checkbox and set the interpolation dropdown menu to “Linear”
Change the current frame in the timeline to “0” and set a keyframe for “Evaluation time” (as “0”)
Change the current frame on the timeline to “1000”
Enter “10000” as evaluation time. (it seems to go in steps of 10 strangely!), then set a keyframe for “Evaluation time”
Change to the graph editor window, then select the curve for “Evaluation time”
Select “Key” - “Interpolation Mode” - “Linear” from the graph editor menu.
Change back to the 3D view.

Once you done that, you use the script to import the sequence:

Select “File” - “Import” - “OBJ as Shapekey” from the “file” menu and navigate to the directory which holds the OBJ sequence.
Select the rest of the sequence(all except for the first obj file in the sequence) and click “Import OBJ as Shape Keys”.
Wait as it loads the sequence…

A video tutorial..


Why doesn't this script extrude the cone base in edit mode? I'm studying scripting in blender, I am pretty much taking notes of the actions I do in the blender interface and creating the same in a separated script.

One thing I can accomplish in the Blender UI that I can't in the script is extrude the base of a cone in edit mode, see script below:

import bpy

bpy.ops.mesh.primitive_cone_add(location=(0,0,0))
bpy.ops.transform.translate(value=(0, 0, 1.94102), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False}, TRANSFORM_OT_translate={"value":(-1.97143e-009, 3.68831e-009, 0.447236), "constraint_axis":(False, False, True), "constraint_orientation":'NORMAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False})

what am I missing?

A Command, select_face_by_sides, can be used.
However, this does not work when the bottom face is a triangle.

import bpy

bpy.ops.mesh.primitive_cone_add(location=(0,0,0))
bpy.ops.transform.translate(value=(0, 0, 1.94102), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)
bpy.ops.object.editmode_toggle()

bpy.ops.mesh.select_face_by_sides(
        number=3,
        type='GREATER',
        extend=False
    )

bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False}, TRANSFORM_OT_translate={"value":(-1.97143e-009, 3.68831e-009, 0.447236), "constraint_axis":(False, False, True), "constraint_orientation":'NORMAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False})