Which properties should I read in a Mesh struct inside the .blend file? I wrote a custom parser for .blend files using some of the info found here. I can read the structs inside the file, one of these is a Mesh and I would like to render that mesh in my application. I'm having trouble figuring out what to read from this Mesh struct.

I found two properties: mvert and medge, the first is a list of vertices and the second a list of edges (an edge is a pair of indices to the first list.)

Theoretically this is all I need, but turning a list of edges into triangles for rendering seems non-trivial, the brute force solution is slow and I couldn't find another solution on the internet.

I also found the mpoly property, it seems promising since its count is always the number of faces in the mesh, but I can't make sense of the properties (loopstart and totloop being the ones that seem more relevant.)

So my question is: which properties from the Mesh struct should I read and is any of them a closer representation to triangles than just a list of edges?

For a basic engine you need to extract mvert which is an array of the vertices of the model. Within an item of this array the co attribute will contain the local vertex coordinate of a vertex. the no attribute contains the normal of that vertex.

The mpoly contains the face data as edge loops around the face. As a face within Blender can contain a finite amount of vertices you will need to triangulate the faces yourself. At forehand in blender, or later in your own code. An mpoly contains a loopstart as an index into mloop and a totloop as number of sequential entries that construct the face.

The mloop contains the data for the edge loops. It has a v for vertex index and a e as edge index.


Mesh only moves in Blender units Im new to blender, so please explain the answer clearly. I don't know what I did, but now, my meshes only move in Blender Units - it's understandably annoying. The only way they move more or less freely is when I hold the control Key.

Using blender 2.72b

This is from snapping. You must've accidently turned it on. Click the magnet again to turn it off. You can find it at the bottom of the 3D viewport (the main window.)

When you know it's on, snapping is a helpful tool to move stuff exact distances without having to type it in.


Intermittent Error: EXCEPTION_ACCESS_VIOLATION when using Python script I'm running a script that opens .obj files and renders them from a series of viewpoints. Most of the time, it works no problem. However, sometimes it crashes, giving only Error: EXCEPTION_ACCESS_VIOLATION. If I try again, it usually works the second time around.

Is this maybe a Windows read/write lock messing things up? I can't really debug where in the code it gets stopped as it's not raising an exception. Sometimes it fails after rendering "Cam0", sometimes after "Cam1", or sometimes before loading the model - it's really inconsistent!

Another observation: if I pass n models to the script, it's much more likely to crash than if I run the script n times on each model separately.

Any ideas? The only solution I have is to keep trying over and over until it succeeds. I've commented out parts of the original script so you can run it yourselves with: blender -b -P view_interpolate.py -- path/containing/an/obj/model [more paths...]

I am running Blender 2.78c

Toggling pose mode / imports / rendering scene, many situations
in blender can break pointers,

for example

foo = bpy.data.objects["Cube"]
bpy.ops.posemode_toggle()

foo can now cause crash!

full documentation
https://docs.blender.org/api/2.78b/info_gotcha.html#help-my-script-crashes-blender
https://docs.blender.org/api/2.78b/info_gotcha.html#edit-mode-memory-access


Whats the easiest way to animate a toy house being built from the ground up? I've modeled this toy house and now would like to animate it being built from the ground up brick by brick. Almost as if the pieces are raining down into place. I could animate each piece individually but I'm hoping there's a more efficient way. Maybe an add on? Any ideas would be of great help.

My suggestion would be to use python to animate the individual blocks.

I would pick a landing time based on the z coordinate of the block and a little bit of randomness (but not so much randomness that a block with a different Z coordinate could land before one below it).

http://web.purplefrog.com/~thoth/blender/python-cookbook/sweep-animate-size.html includes some examples of setting keyframes like

    fr = obj_to_frame_f(obj)

    obj.scale =(0,0,0)
    obj.keyframe_insert(data_path='scale', frame=fr-timescale-timescale2)
    obj.keyframe_insert(data_path='scale', frame=fr+timescale+timescale2)
    s = 0.9
    obj.scale=(s,s,s)
    obj.keyframe_insert(data_path='scale', frame=fr-timescale)
    obj.keyframe_insert(data_path='scale', frame=fr+timescale)

Although you'll be animating data_path='location' instead of scale.


How to get the directory of open blend file? (from Python) What's the best way to get the full directory of the current Blender file in Python?

It should be cross-platform.

Path Utilities module provides bpy.path.abspath("//") where the "//" prefix is a Blender specific identifier for the current blend file.

You can also do...

bpy.path.abspath("//my/file.txt")
bpy.path.abspath("//my\\file.txt") on Windows, with backslash escaped
bpy.path.abspath(r"//my\file.txt") on Windows, using python raw string
bpy.path.abspath("//../file.txt")  to go back a directory

This is used by all internal paths in blender, image, video, render, pointcache etc - paths. so blend files can reference paths relative to each file.

Worth noting that the path may be an empty string, so you may want to check bpy.data.is_saved first.


Splitting Object into two different objects using a script I am splitting an object into two. I am able to do it using the GUI. I go to edit mode, select the vertices I want, then press P and select partition by selection. Can anyone help me with the equivalent in script of pressing P and making the partition by selection. (Not able to find the command in the info window during the operation)

Thanks!


How to reconnect/extend edge loop So I made an edge loop on horizontal along size the whole side of this object as you can see in the front, and where it is in red that is me extruding the selected face. However, I messed up and had to delete bunch of geometry and then re-add it (that very long rect on right side is what I redid). So then I wanted to basically re-do the edge loops I made and extend them to this re-done geometry.

So I went and started to dissolve edges on the faces, but did not realize that the edge loop was still there, and was wondering why I couldn't re-add edge loop, until I extruded this face and saw that I only dissolved the visible side.

So my question here is, either A) How do I easily recombine my geometry (even the not so visible sides) or B) how to I "extend" the edge loop to these faces I dissolved them on.

That picture has only face selection mode right?

Because I can see a whole bunch of zero area faces that are going to be confusing.

First thing you should do is try to get rid of those faces by selecting everything and merging vertices by distance (use a very small distance).

Once the faces are cleaned up you should be able to easily cut the edge loops you want either with the knife tool or by dissolving and re-adding with ctrl + r.


Why Is Blender Missing Buttons? I am trying to add material to my tire and after I complete the steps to get the material and make it textured, I am told to hit the material button to see the material and texture as one. However, my blender doesn't have the buttons under the preview window on the right hand side as the instructed video I am watching has.

I added pictures so you can see what I am talking about.
Screen shot of Instructed Video.

My Blender

Well I think I might see your problem. If you are trying to view your textures through the 3D Viewport without the need to render the scene:
There is a button that should have a white ball with up and down arrows on it aka "Viewport Shading" is its name and it sits to the right of "Object Mode" button in which that button also has up and down arrows on it. Here is a pic:

The picture you see above is the editor or "3D View Editor". Now in this picture you will see that white ball im talking about next to the "Object Mode" button. Now click that ball in your blender "3D View Editor" and set it from Solid to Texture or if that does not work set from Texture or Solid to Material. If all else fails then try and get a recent version of blender.
Let me know if this does not help you in any way! :D


Mesh doesn't follow the armature I'm trying to rig this 3D astronaut model, but I'm having problems. The mesh doesn't follow the armature, I tried all the fixing steps. but nothing happens. A strange thing also happens when moving a bone. blender starts to lag for some reason. Can someone help me out?
Here's the link to the blend file:
https://drive.google.com/open?id=11ujtoCIPFT7M03eqsOH_TQPPsYmUkmr5

The problem is that your mesh is too high in polygons, it will make rigging and animation tedious if not impossible, try to reduce the amount of polygons and, if possible, retopologize it.


How do i reduce density of retopo? So im retopologizing a sculpt i did and part of the mesh gets very dense but im not really sure how to reduce this without ruining the flow of it. i tired a method shown in the bottom pic but kind of guessed and im not sure if thats the best way to go about it.

Tris can be a solution if it doesn't cause any problem when you bend the object, you need to test it, here is another solution to go from 3 faces to 1:


Where are my screencast keys? I can't find the Screencast Keys which allow me to start the display. I have tried the right hand pop-up menu using the hotkey N, but I could not find the Screencast Keys menu which is usually located under the Transform orientations rollout.

Screencast keys is now an external addon (it was formerly distributed with blender, but has since been removed).
To use it:

download it ( RMB > Save Link As… in most browsers, to save it as a .py file)

Click install from file in ⎈ Ctrl⎇ AltU>User preferences > Addons:

Select the downloaded file:

Enable it:

If you want it to stay enabled after quitting blender, be sure to click Save User Settings.


My armature deformations inexplicably 'pop', without any shape keys or other modifiers. What's going on? When I rotate my armature in certain positions, the mesh lurches outward into strange positions.  I've already checked out my weight painting, and there's no other modifiers causing any issues -- what's going on?

What could be?

Modifier actived: armature//corrective smooth

Here a picture from behind

Here the file:

When in doubt, check out the various settings in Properties >> Bone Settings >> Deform Tab.  If there's more than one segment under 'Curved Bones', try dialing it down to 1.  While sub-dividing curved bones can lead to higher-resolution deformations, they are also problematic, and hard to trouble-shoot.  If you really want to have those high-resolution deformations, try selecting 'Multiply' on the deformation settings for nearby, connected bones.  Also do lots of testing before animating.


How can i procedurally change ring sizes in wave texture? I got to the point where I got each ring size different by having the Wave Texture go through a Noise Texture.

How can I get each ring to not be uniform like this drawing. Not exactly like the drawing since each ring isn't exactly circular but each ring having a constantly changing width.

I wrongly assumed by changing the ring width it would have the effect of the sides running down like this drawing. I'm not sure how to go about this. Any changes to the z scale in the Mapping node removes the side lines and the top/down center circles.

You can mix some noise into the texture coordinate space.

This has the unfortunate side effect of offsetting the center of the circle, so you would have to use the Mapping node to translate it back.


Glow behind reflective text I have a reflective ( Mirror Surfaced ) text on a dark background / Wall so it's barely visible. Backlighting does not light up the scene too much, the text is reflective and would only pickup the backlight on the wall. What I needed is to make glow effect behind the reflective text.

How could i achieve this effect?

I have attached a scene for your reference.

Basically, the scene is straightforward.
A text "G" with reflective and emission material & a wall with white material. Make sure you turn off ambient occlusion in your World Tab as it will throw false lighting in the scene. The wall material is almost completely white, due to the lack of light in the rest of the scene only the backlight is visible.

Hope this helps and is what you are looking for.


Is there a way to equalize the thickness of my grease pencil drawing over an entire scene? or per entire frame? I drew and animated a whole scene using the grease pencil, but when moving from 2D animation tab to the 2D full canvas tab, it suddenly shows the difference in line thickness. Is there a way to equalize the thickness over the entire scene? or per entire frame? I tried to downscale using the object data tab and decreasing the ''stroke thickness'' and the "thickness scale", but that scales all the other lines with it as well leaving me with the same difference in thickness. I can scale using alt S, but I have a ton of frames. If I need to select only the thick lines in every frame and then alt S to the exact thickness the rest it's incovenient.

Solution: Thickness Modifier

Check my fast scribbled helper showing the might of the modifier.

Don't laugh, well you can, but only if this helped you, then i can laugh with you.
Joke aside, the modifier affects all layers under the same Stroke Object. It's slightly more work if you have multiple Stroke Objects. Then all need a modifier, but you can select all Stroke Objects and once you have "Normalize" active and the Thickness Factor set, just right click on each and use "Copy to selected" for each, that way all Stroke Objects or rather their Layers will be normalized and the same thickness.


how do you show selected mesh in blender's outliner? I click on a mesh in the graphical window, and I see the mesh gets highlighted. I go to look at the Blender outliner and I cannot find the mesh. My blender file has 700+ components, and I cannot find the graphically selected object in the outliner. Is there a way to have the outliner automatically scroll to the selected mesh?
I see that there is a similar question answered on this website, but I do not have a number pad to use that answer, so I do not know how to use that solution. Is there a method to find the mesh in the outliner using the mouse, or some other alternative? I see this question as well, but that does not address the issue I am running into.

It is possible to filter the displayed objects in the Outliner by their state. Click on the filter icon and change the object state filter to Selected. The outliner should now only display the selected objects.

If the particular objects are deeply nested in collections and you don't want to step through the hierarchy, disable the Collection filter checkbox. This will display the objects without their collection hierarchy, just one after the other in the outliner.


How to export a 3D object from blender to adobe after effects How can I export a 3D object from blender to adobe after effects without using cinema 4D. And in what format?

Bartek Skorupa has an addon that lets you export objects and camera to an AE script that you can run in AE to recreate the scene.

http://cg.bartekskorupa.com/b2ae/


Error when I render to RTX I have a technical question for you.

The company in which I work has invested in better equipment. It is RTX 2080Ti and Ryzen 7 2700x.

I read that RTX is not currently supported by the program and you have to download the beta version or copy the files to the lib folder. I tested both ways and the render actually starts.
However, after some time everything starts to shouting and the tiles start to go crazy and become transparent. In the meantime I get an error: "CUDA Error: Illegal address in cuCtxSynchronize(),line 1151". Sometimes the numbers are different, e.g. 1372.
Beta version 2.79 and 2.80 can switch off for unknown reasons. The problem does not occur only when rendering on the processor.
I have the latest drivers for my graphics card and Cuda 10 installed.
Is there any way to render stable on 2.79b or any other version?

If something is not understandable, I'm sorry, the whole thing was translated in the Translator.

I am rendering with multiple RTX2080ti GPU's in a windows 7 pro system and I am getting very good and stable results.
What I did was the following;

Download the latest experimental 2.79 version that supports RTX.
Replace the complete content of the C:\program files\blender foundation\blender
folder with the experimental 2.79 version. This will force windows to treat the
experimental version to run as an installed application, much better results!
Do not use the latest Geforce driver but find and install version 417.35

Good luck!


why is my object solve not matching my plane track? Ok so im tracking a flat piece of paper and everything seems to look great! when i add a plane track to the points it follows the paper perfectly.  but for some reason when i use the object motion solve and set up the tracking scene the points don't follow the paper any more.  can anyone help me or explain what i'm doing wrong please?

Thanks in advance.

here is a screen shot of it.  left side shows the plane track around the paper and fitting it perfectly. on the right side it shows the plane up right and not tilting back like it should.

Tracking a piece of paper as it moves around in a video is a matter of following some points on the video, an image can then be distorted relatively easy to match the movement of the plane.

To track camera movement you need points that are not only following points on the video but that can also be used to define a three dimensional box in front of the camera. When reconstructing camera motion you specify some points that are flat on the ground and also raised up on a wall. This provides a way to re-create the camera movement relative to the given points.

Once you have the camera movement you can then track objects that move relative to these points.

With enough points on an object you can get the same effect as an object moving in front of the camera, but in your example video you have nothing that adds height to the sheet so there is no way of re-creating the rotation of the page, the best you can do is distort a 2d image to match the distortion of the page in front of the camera.

In your screenshot you have a solve error of 18.65. A solve error less than 1.0 is considered a good track with values up to 3.0 considered possibly good enough to work with. Anything higher than 3.0 is considered a bad track.


Confused about an object's dimensions Hi.
I'm having such a hard time trying to fathom the dimensions of this object I just imported:
x 54.6m
y 169m
z 79.8m
It would seem to me that the height(z-axis) would be 3-5 times greater than the width or the length( x- or y-axis).
thx

From the properties panel to the right of the viewport in your screenshot, the mesh is rotated 90 degrees around the X axis. The dimensions are shown as local to the object, so what you’re seeing in the scene is the object after the rotation. Rotating around X will effectively swap the Y and Z dimensions - so ‘Y’ is the height of the figure.


Cant unlink a curve created from an instanced collection Once I click on "Make Instances Real", It unlinks the geometry from the copy and it makes it unique.

Now for the curves, once I try to edit the new "real" curves, I am unnable to unlink them. I have created them from instancing a collection. I have tried everything from
1- Unparenting
2- Setting it to single user
3- Applying all the transforms
4- Tried to click on "unlink object data" but such option only exists for meshes.
Image 1. The right side of the curves is a copied collection made real

Image 1. The right side of the curves is a copied collection made real

Image 2. The right side is selected in object mode

Image 3. In edit mode, the right side gets selected and all changes to the right side will affect the other one as well. I would like to make them individual of each other.

Any help or advice is welcome. I found that linking meshes to curves to be a great technique for applying hair cards and it is working really well for a ghillie camo outfit that I am creating for a game.

I have read this page from the manual https://docs.blender.org/manual/fr/dev/scene_layout/object/editing/duplicate_linked.html but it doesnt say anything about curves. The only thing that seemed to work in the sense of editing only one of the two sides was to press ctrl+L and click on link object data but that messed up the position and transform of my meshes. I tried to apply the transforms but to no avail. In other words, I have no solution :(

Found this unanswered question as I was facing the exact same problem -- I solved it with this:
In Object Mode, select all objects that you want to be separated. When I "made instances real" I was able to select them individually in Object Mode, but they would all edit together in Edit Mode.
Use the Object dropdown menu > Relations > Make Single User > Object & Data.
I did not unlink my textures, as I wanted them to remain uniform for the time being. This will make every selected object an individual editable object. This was enough for my own problem.
If you want to regroup objects -- perhaps all the objects on the right side -- Select them in Object Mode, Object dropdown > Relations > Make Local > Selected Objects and Data. This somehow relinks them, but not vertex to vertex as they were before. I haven't been able to find the solution to this second half of the problem.
For further clarification on what this is doing, look up "Make Single User" and "Data Blocks". I'd explain it here if I fully understood it myself.
Hope this helps some!


Liquid lighting artifacts I am currently working on a slime character splatting onto a branch using mantaflow fluid simulation. I am so close to my desired final look, but the last problem I have is that the lower half of the simulation had bizarre, jittery lighting. I am mostly confident that this comes from the automatically generated geometry from the fluid mesh, but I don't know how to fix the issue. I have tried increasing the Upres factor and Particle Radius, but while the smooth shaded model is a bit more refined, the lighting issues persist.
If anyone has done slow-moving liquids before and seen this issue, how did you fix it?
Here is the Vimeo link: https://vimeo.com/492565125

Apparently, increasing frame steps fixed the issue and made the whole thing look a bit smoother.


Anvil tutorial. Subdivisions Surfice modifier creates a face where it should be a hole I wanted to make an anvil with a tutorial. But as I added the subsurf Modifier it started looking weird. I wanted to make a"Hole" but it fills it up. How can i get it right?

The marked edge (see green arrow) causes the problem, since it has influence on the subsurface modifier:

If you delete it, it will solve your problem.


Quit blender with dialog My addon  code calls bpy.ops.wm.quit_blender()
And after that there is simply an exit from Blender. But I want to see the standard Blender quit dialog. Is it possible?

You would have to pass 'INVOKE_DEFAULT' to call the invoke method of the operator:
bpy.ops.wm.quit_blender('INVOKE_DEFAULT')

Read: https://docs.blender.org/api/current/bpy.ops.html#execution-context


How to increase Font size in blender-3d (2.79)? After the new update, how to increase the font size to be larger in blender 2.79?

From the Release Notes: The user preferences now have a Display Scale setting in the Interface tab, to adjust the size of fonts and buttons relative to the automatically detected DPI.


How to map the displacement texture? I've added the Displacement Modifier to my object with a Wood texture for displace. How to change its location, rotation and scale (like you can do with image textures: Map a procedural texture like an image texture)? There are no mapping options in the Displace texture panels. I'd like to rotate the pattern pictured below, so it's mapped verticaly. How to achieve this?

The easiest way to do this is with an empty (empties can be thought of as an object that only stores loc, rot, and scale).

In the modifier, just switch the type to object, and then specify an empty in the drop-down box.

Here is an example blend:


Does anyone know how to rig a truck/trailer so that the trailer follows the truck in a realistic way? I am trying to rig a truck with a trailer so it can be animated along a path/curve. Having the trailer follow is not a problem, but in order to look realistic it shouldn't follow the exact path of the truck it is attached to, but a shorter one.

There is surprisingly little documentation about this on the web, for Blender or any software.

I have seen that this dynamic is sometimes built into ordinary car rigs, where the front axle of the car is animated and the rear is dragged behind it in a realistic manner, but no tutorial I have found has a setup like that explained.

I actually managed to make it work using Bones and kinematics.
Basically I used the description from:
How to IK rig legs

.. to create an inverse kinematic constrain.
But additionally I added a copy-constrain from the "target_bone" to the foot and then it worked. (target copies from foot)

I cascaded it 3 times to get an articulated trailer:

Edit: Here is the dependencies I have for one instance:

From How to IK rig legs :

'foot' is child of 'shin'
'shin' has IK constrain from 'control'
'foot' copies rotation from 'control'

At this point you should be able to move the foot and the shin changes accordingly

My Addition:

'control' copies location from 'foot'

Note: that these constrains must be bone constrains (i.e. in pose mode) not object constrains.


Distribute object instances at every vertex Can I distribute object instances at every vertex? I tried with the new geometry nodes but it only distirbutes randomly (see screenshot).

Get rid of the Point Distribute node. Just use the Point Instance Node.


How to make light ray with Luxcore I'm trying to make a realistic prism with Luxcore since yesterday but it's not really working, there's no ray! But I know that the prisme is working because if I put a plane in front of the prism I can see the light on it
How could I do that ?

In the World tab you can add a volume to the entire scene. This allows you to create fog which scatters light from your laser and thus makes it visible. You will likely need to adjust the Scattering Scale to the size of your scene, larger values result in stronger scattering.


Can't change opacity of scene strip in Video Sequence Editor In the VSE, I have a scene strip, but I cannot change the opacity.  It just snaps back to the last value it was keyframed at as soon as I alter it.

(Blender 2.69)

This is already a known issue that is on the To Do list for the VSE.  I'm posting this Q&A because it took me a long time to come across the solution.

As explained in the above bug report, in order to keyframe a scene clip, you must turn off the preview.


Blender 2.70 Fly Mode Camera: How Do I Change the Camera "Height" For Gravity? In the new 2.70 fly mode, pressing TAB causes the camera to fall and hit any relatively flat surface (in Z axis).  However, when viewing scaled scenes at an arbitrary scaling, the camera falls really really far as though the "person" is incredibly tiny within the scene that you are walking through.

How do I change the camera/person's pov/player height so that I can fit in my scaled scene?

You can change the properties of fly navigation (including view height) in User preferences > Input > View Navigation:

Even if it's grayed out because the Gravity checkbox is disabled, changing the value will still affect the view hight when gravity is enabled by pressing Tab while in fly navigation mode.


Why won't text Boolean correctly after the second Boolean operation? I'm pulling my hair out over this bizarre issue that I'm having.  If I create any text and convert it to a mesh I can successfully Boolean it against a cube.  However, if I then attempt to do the same thing with a 2nd text mesh it does correctly Boolean the cube, however, it's always missing the back end of the engraved text.

Here's a simple case where I have a cube and the letters A and B which I converted to meshes from a Text object.  This is what it looks like before Booleaning:

It doesn't matter which one I do first, but which ever letter I choose it will correctly do a difference boolean.  In this case I did a Boolean with the A.  Now, however, if I attempt to Boolean the B it doesn't work quite right - you can see thru the back since it doesn't generate any polls.  This composite image shows the correct result of the A and the incorrect result of the B:

It ONLY does this with Text that I have converted to Meshes.  If I attempt to Boolean, say, a Sphere it works fine.  I don't think there's anything wrong with my text meshes because like I said whichever one I do first always works, so if I did the B first it would have been correct, and then the A would have been missing the back.

I've tried all sorts of things to try and resolve this, but nothing works.  I even double checked to be sure it wasn't generating flipped backfaces that were hidden.  Does anyone have any ideas what may be going on here?

You need to 'Remove doubles' for you text objects (merge vertices on top of each other):

Enter edit mode for the converted text object.
Select everything.
W> Remove Doubles.
Repeat for each text object.

By default, when text objects are converted to a mesh they are left as separate parts, like the front of the text and  the sides. This creates a messy boolean operation (or more messy  than usual). Here, I applied the first boolean and you can see that it creates disconnected faces (the selected ones) meaning the second boolean doesn't work as expected:

Cleaning the text objects with 'Remove Doubles' will create a cleaner mesh, ready for the second boolean.


Priorities with actions in bge I am working on a character for a game that has 3 main actions: Walking, Running, and Idle. S1 and S2 stand for Scenario 1 and Scenario 2, respectively. I have all the priorities set to 0.

I want the priorities to be in an order where if Sonic runs or walks, the animations will play, but if neither of those things are happening, he will remain Idle. I have tried multiple combinations of priority orders, but I could not find a way to do this.

After almost a month of trying, I finally figured out what was wrong. Since you had to move the Up-Axis to walk, and the Up-Axis + Y  to sprint, you need to put the run action on layer 1, since it has the same control.


How to generate a mesh based on MakeHuman model I am using a makeHuman to model different body person. I am wondering if it is possible to generate a mesh by sampling this model on cube or triangle or any other geometric form. Is this suggestion make sense? it it is not. How can generate a human mesh? Thanks

We can export the MakeHuman model as .STL file and after that , we can easily Import a 3D model from STL as a MeshRegion object in mathematica
How to import an 3D model from .STL file as meshregion on mathematica


How to get a transparent shader equal to the Maya`s x-ray shader? Hy,

I have several pieces ensambled ones with anothers, and I need to see them transparent to see´(in the work view) how they fit together and modify it as needed. For that, I need them to be semitransparent. Specifically I´m looking for the same effect that you get in Maya when you apply to a mesh the X-ray shader.

I´ve been looking for tutos and answsers buy none of what I found looked as I am looking for.

In the file, I have a material formed by: diffuse + transparent bsdf connected to a mix shader connected to the material, but I still does not see the pieces transparent in the work view nor in the rendered view (in render circles).

Any way to do it? or any idea of why I don´t see the material transparent?

Thanks a lot

First option - Cycles in Rendered view.

You can mix Transparent with Diffuse or in this case Emission shader by Layer Weight > Facing. Additionally you can add Color Ramp to have even more control over Facing falloff.

This material is added to the monkey mesh.

Second option - X-Ray in any other view.

This option will allow you to see chosen object trough everything else in the scene. You will need to check X-Ray under Object tab > Display section > X-Ray.

This option is turned on for the sphere mesh.


Where can I find the code behind the Remesh Blocks modifier? In this answer by @RayMairlot, I learned how to generate a mesh surface that looks like many small cubes stacked in the shape of a sphere (or other meshes).  Remesh -> Blocks

Because I can't leave well-enough alone, I would like to see exactly how this algorithm works, and what an Octree is. Where can I find the C code (?) behind this modifier?

Blender Modifiers are not written in Python but are compiled into Blender and written mostly in C, therefore Remesh won't be found in the scripts folder. The code for Remesh can be found by searching for "MOD_remesh.c"  once you've downloaded the source tree locally. Either download the entire GIT repo, or archived as a zip. Alternatively you can browse the source tree on-line figuring out the path should not be difficult, but here it is anyway:   source/blender/modifiers/intern/MOD_remesh.c

Questions about the C / C++ sources of Blender are off topic for Blender.stackexchange but you can try the developers mailing list or irc freenode #blendercoders.


Blender 2.8: I want to select the whole image for each face of a cube I am super new to Blender and I am having trouble with there being a lot of information on the web that does not apply to 2.8. I am hoping this will be simple.

Here is my cube and my texture:

See the little orange square that shows what portion of my texture is on my cube face? How do I make that the whole texture and not just that little part? I tried hilighting the vertexes and dragging them to the corners, but I cannot seem to be precise enough, I end up with corners that are slightly off... There must be a better way?

The easiest way to do what you want would be to go into Edit Mode, select all, press the U key and then select Cube Projection.

This will unwrap your cube and overlay all faces on top of each other, completely filling the UV texture space.


Why is my animation choppy when I render it? So I just made a very short animation. what will be my youtube intro, its 20 frames long and the animation is very choppy. How do I fix this?

Here is the video file.

This can happen when fast moving objects result in a large difference between consecutive frames.
For reference, here's what my test scene looks like at 24 fps without any motion blur:

To fix this, you have a couple options:
Increase the framerate
Increase the framerate, adding more frames while keeping the same run time.
AFAIK youtube will play high framerate videos at a reduced framerate at lower user-set quality levels, so this may not be an ideal solution for youtube (the results may not be the same for all youtube quality settings).
Here's the same scene at 60fps (click the gif to see a better version):

Add some motion blur
Add some motion blur to smooth the transition between frames
See the manual for details on how to use motion blur in blender internal and in cycles.

Or both
Of course, you can do both at once too ;)
Again, click the gif to see it in a video format..

Unfortunately gifs make terrible examples when showing framerate settings and SE doesn't support embedding of other formats. Click on any of the gifs to see it in a video format.


How to add "Copy Location" Constraint programmatically? Let's say I have 2 objects: 1 empty and 1 cube. How could I create a "Copy Location" constraint for the empty, so it follows the cube's movement?

import bpy

scene = bpy.context.scene
obj = scene.objects['Cube']
empty = scene.objects['Empty']

constraint = obj.constraints.new('COPY_LOCATION')
constraint.target = empty


Apply transforms to linked objects? Note:
Vader's solution set me on the right track, but I ended up using this, as it goes a bit faster with large numbers of objects.

Original question:
Is it possible to directly apply transforms on linked object data? Blender does not seem to let you do this. It results in an error: Cannot apply to a multiuser: object, object2, etc. aborting
That makes sense, but I should be able to apply the scale to all of the objects, right?
For instance, I have three cubes which are linked, but have different scales:

I realize that because the mesh data is linked, they all have to be the same size once the scale is applied.
I tried selecting them all with the smallest cube active, then applying the scale.

The expected result is that they all become the size of the smallest cube with scales of 1,1,1:

However, it just throws the same error instead:

Is there some way to do this without unlinking everything and then relinking?

Update: There seems to have been some confusion about if this was possible or not, so I'll quote my comment below to help clarify what I wanted:

I only want the active object to remain the same size, I realize the other objects will have to become the same size as the active object. I don't see why that would be impossible..

Vader's solution works, but I think this modified version is slightly more efficient because it only unlinks the active object:

import bpy

selected=[]
# de-select all selected objects and add to array:
for obj in bpy.context.selected_editable_objects:
    selected.append(obj)
    obj.select = False
# reselect active object
bpy.context.object.select = True
# Make single user and apply scale
bpy.ops.object.make_single_user(type='SELECTED_OBJECTS', object=True, obdata=True, material=True, texture=True, animation=True)
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)

# select objects again
for obj in selected:
    obj.select = True
    # reset scale
    obj.scale = 1,1,1
# link selected to active
bpy.ops.object.make_links_data(type='OBDATA')


How to straighten and rearrange UV Islands? (hair cards) This is picture is so you can see what I mean. Reds are the same, and greens are the same and I want reds to be an island and green to be a separate island.

In the tutorial linked below, you can see that after he finished the hair in ZBrush and he created the UV layout, he then imports it in Maya and creates islands out of the similar hair cards (Step 8 and 9).

How can this be done in Blender?

https://www.3dartistonline.com/news/2015/04/how-do-i-create-real-time-hair-for-games/

The easiest method to straighten and rearrange UV islands in Blender is by using the free add-on TexTools by renderjs.

After you installed TexTools, you find a new tab in the UV/Image Editor.

Step 1

In the first step, you want to rectify all the UV islands. Select one island, click the Rectify button then repeat the process for all the UV islands.

Step 2

Once you've rectified all islands, enter Face Select mode, then select the similar ones and rearrange them vertically at the top edge.

Step 3

In the next step, chose one island as template and scale the edges of the others vertically. Do this by selecting the same edges on each island except in the template island, then press S, then Y and then 0.

Repeat this for all edges.

Step 4

After that, turn on "Snap to Vertex", hit G, Y then press Ctrl while moving the edges vertically, until they snap at the same height as the template edge.

Repeat this for all edges.

Step 5

Now, position the islands roughly into a vertical stack, switch to Face Select mode, then press the "Align left" button to arrange them horizontally on the left edge.

Step 6

After that, turn on "Snap to Vertex", hit G, X, then press Ctrl while moving the right edges horizontally and move your mouse over the template  until they snap at the same width as the right template edge.

Step 8

Repeat Step 1 to 7 for the second island group, then rearrange them by using the method in Step 2.


Where can I find RGBA, color depth or compression settings? I'd like t get the usual Output panel back. I used Blender for some motion tracking and regular modeling stuff and here is how my Output area looks like now - no RGBA, compression slider, or color depth picker:

How should look like:

Q: How to get back to the default Output panel?

The output options depend on the output format.
For FFmpeg video, just open the Encoding options to change the settings.


Execute function on object property change I'm searching an equivalent to the observer design pattern.
I want to execute a script function every time an object position changes.

To achieve this there might be some options directly in blender UI, but if there is any possibilities to set up the observer using scripting, please provide both.

As an example I would like to do something like that in my script :

bpy.data.objects["cube"].location.onChange(myFunction)

def myFunction():
    #do stuff every time location is changed...

I am using Blender 2.67b

It appears that this is not supported by blender. So here is my workaround.

I made a little script that will allow you to execute a function when the property of an object changes. I'm not used to blender modules so I didn't made a downloadable module out of it. But it's still pretty easy to set up.

Create the observer module

first, we need to execute a function every frame, this function will check if any property has changed and call the corresponding observer function.

Add an empty to the scene.
Add a pydriver to the empty (open the property panel (n) and then right clic on the location and select "Add Single Driver")
Go in the graph window and open the "Drivers" display (clic on f-curve editor button in the bottom).
Open the properties (n)
Select the added driver in the list on the left.
Remove any variable and modifier in the properties panel.
Just below the "Scripted Expression" button there is the "Expr" field enter in it the following :

update(frame)

This will call our frameUpdate function at every frame change.

Now that we are setup

create a new file in the text editor named

observer.py

check the "register" option (this will create a new module loaded automatically with .blend) and add the following to the file:

#author : Vincent Picard

import bpy
import bpy.app

#list of all the observers.
observers = []
print("test")
#This is to function to call in your scripts. use it to have your function called everytime an object property changes.
#object : Object to watch,
#property : property to be wathed.
#function to execute every time the property of the given object changes.
#function will be given this parameters :
#    object : the object.
#    value : new value of the property
#    old : old value of the property.
#    frame : current frame.
def observe(object, property, function):
    observers.append(Observer(object,property,function))

#Called at every frame. This will call the function that are listening.
def frameUpdate(frame):
    for observer in observers:
        observer.update(frame)
    return 0.0

#make the function visible to scripted driver.
bpy.app.driver_namespace['update'] = frameUpdate

#Each time we call observe we create an observer object.
class Observer:
    def __init__(self, object, property, function):
        #if the property object needs deep copy
        try :
            self.oldValue = getattr(object, property).copy()
            self.newValue = getattr(object, property).copy()
        #if the property object doesn't need it (and don't have a copy method).
        except AttributeError:
            self.oldValue = getattr(object, property)
            self.newValue = getattr(object, property)

        self.object = object
        self.property = property
        self.function = function

    #Call the function if the object property changed.
    def update(self, frame):
        #if the object needs deep copy
        try :
            self.oldValue = self.newValue.copy()
            self.newValue = getattr(self.object, self.property).copy()
        #if the object doesn't need it (and don't have a copy method).
        except AttributeError:
            self.oldValue = self.newValue
            self.newValue = getattr(self.object, self.property)

        if self.oldValue != self.newValue:
            self.function(object = self.object, value = self.newValue, old = self.oldValue, frame = frame)

How to create an observer and use it.

You now need to reopen you .blend, that way the "observer" module will be available.

You can now observe object properties and make a function to be call when it changes.

Create your script file (example) :

import bpy
import observer

#define the function you want to be executed. this one as an example simply print old and new value when they are changed.
def updateAnimation(object, value, old, frame):
    print(value)
    print(old)

#register your observer.
observer.observe(bpy.data.objects["Cube.031"], "location", updateAnimation)

Run it, it will register your observer.

Potential Problems

do not run the observer.py file, if you do then it will stop working and you will need to reopen the .blend.


orient transformation along edge i am new to blender coming from maya.

Is there a way i can orient the transformation along an edge, so i can scale them down to a flat surface and keep it parallel to the other surface.
like in maya with the insert key you can align it along an edge or surface.

Thanks

This is what Custom Orientations are for.

In the Transform Orientation dropdown, there's a '+' sign, which will create an orientation from your current selection. You have the options in the operator to name the orientation, use the orientation immediately after creation, and/or overwrite the previous orientation, to avoid clutter.

If you create an orientation from an edge, or 2 vertices, then the Y of the new space runs along the edge. (I believe the Z is in the mean direction of the vertex-normals, and X is at right-angles to Y and Z)

If you create an orientation from a face or 3 vertices, then Z is the normal of the defined plane, (I think X and Y are the tangent and cotangent, and it's not easy to know which edges determine those, as a user)

So for example, to flatten to a plane normal to an edge and at one end of it, it could be:

Set Pivot to 'Active Element'
Select the edge and create an orientation from it
Select the vertices to be flattened, making the one at the end of the edge active
SY0 scale the vertices to 0 about the active vertex, in the direction of the edge.

In your case, you could also create an orientation from the opposite face, (the one you want to align to), and with the same selection of vertices, SZ0


Extruding equally along a path This is my first post on here. I've been using Blender for years and a lot of my questions have been answered here but I've been having trouble with something and I haven't found a solution. I'm trying to create a sidewalk for a road. I figured I would do this by extruding out along both sides of the road and then extruding up. However, the road is curved, and when I got to extrude the extrusion is not equal in all directions. I've searched for a way to do this on here but I haven't found a way to equally extrude all sides. Any advice? Or is there another way to do this?

Pic is of the road object.

You can try this, it might work for you.

In Edit mode, select the first edge of your road (Left or Right) using alt-click.
Duplicate (Shift-D), hit Escape, then split into a new mesh (P, choose "Selection").
In object mode, select the new object you created (should be a single line of connected vertices), tab into edit mode, and extrude along the Z axis.  (A to select all vertices-->E to extrude-->Z to constrain to Z axis-->1 to extrude one unit-->Enter),
Tab into object mode then add a "solidify" modifier.  Modify the Thickness to your liking - use a positive or negative Thickness to get it to extrude out to the direction you want.
Apply the solidify modifier.
Tab into edit mode and delete the upper/lower layer of vertices, or else move them up/down to the sidewalk thickness you prefer.
Do the same for the other edge of your road.

Should do the trick!  At least it did with a sample curve I played with.  I don't know if it's shaped like your road.

Edit: here is a screenshot of the sample I worked with:

I started with the light gray road mesh (which I actually created from a bezier curve), then I created the two light blue sidewalk objects using the steps described above.


How to draw custom elements with python? How to draw custom faces/lines/points in 3D space with python?

Like this addon.

I need just a simple example of how to draw these elements.

Blender provides opengl access through python with the bgl module which allows you to use opengl calls to draw to screen. Any opengl reference should help.

An example from the contours addon - countour_utilities.py

def draw_outline_or_region(mode, points, color):
        '''
        arg:
        mode - either bgl.GL_POLYGON or bgl.GL_LINE_LOOP
        color - will need to be set beforehand using theme colors. eg
        bgl.glColor4f(self.ri, self.gi, self.bi, self.ai)
        '''

        bgl.glColor4f(color[0],color[1],color[2],color[3])
        if mode == 'GL_LINE_LOOP':
            bgl.glBegin(bgl.GL_LINE_LOOP)
        else:
            bgl.glBegin(bgl.GL_POLYGON)

        # start with corner right-bottom
        for i in range(0,len(points)):
            bgl.glVertex2f(points[i][0],points[i][1])

        bgl.glEnd()


How do I solve the problem of black surface forming on an object with 0 alpha transparency adjusted in cycle mode? In order to give the effect of disappearing the product through video, i made the alpha 0 in the cycle mode to give transparency.

When I proceed the rendering, it's not completely transparent also black surfaces are occured, and I've tried this and that, but I'm asking because it doesn't work.
I'd like to ask if there is any way to get rid of this black surfaces and set it to a completely transparent state.
The current setting is as follows.

Increase your transparency bounces in Render Settings. I think you don't have enough bounces to make it through the object all the way .


How can I have multiple areas open but only add a panel to one of them with Python? What's my goal:
I want to have a property on an area or something similar. The idea is that with this I can have two areas of the same type open, but display a panel only in one of them.
The problem:
The problem is that it looks like you can't add properties to an area. If I do bpy.types.Area.test = bpy.props.BoolProperty() it doesn't become an actual property of the Area but only returns the builtin function for the BoolProperty.
Is there any way to add a property to the area or something related to it, or to achieve the same effect of showing a panel only in some areas of the same type and not in others?

Use the poll method

Test script, using Text Editor > Templates > Python > UI Panel Simple and adding a poll method such that only the largest PROPERTIES type area in the screen areas polls
class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    @classmethod
    def poll(cls, context):
        areas = sorted(
            (a for a in context.screen.areas if a.type == 'PROPERTIES'),
             key=lambda a: a.width * a.height)

        return areas and context.area == areas[-1]

other methods to consider would be looking for the lowest index type area in the screen collection.  As a rule of thumb when enumerating the screen areas collection, recently split off areas are added last.
>>> for i, a in enumerate(C.screen.areas):
...     i, a.type
...
(0, 'PROPERTIES')
(1, 'CONSOLE')
(2, 'OUTLINER')
(3, 'PROPERTIES')
(4, 'TEXT_EDITOR')

>>> C.screen.areas[:].index(C.area)
1

A property can be saved on the screen object.  Using a group property that keeps track of area index and type is another method I've used in the past to attach a draw callback to only one instance of an area in a screen.
>>> bpy.types.Screen.my_panel_area_index = bpy.props.IntProperty()
>>> C.screen.my_panel_area_index
0


Get anti-aliased depth map in cycles render I know that in Cycles Z pass is not anti-alisased while Mist pass is normalized anti-aliased. I need the real depth of each pixel (like the Z pass) but with anti-aliased. I don't know if getting that from the Z-pass (by making it anti-aliased) or from the Mist pass (making it not normalized) would be feasible and easier?

The real problem is when looking at the output Z pass, the pixels around thin objects like branches, grass stocks, are kinda sparse and missing. I doubt that could be because anti-aliasing is not on. I wouldn't want to post-process that with filtering, since they may create artifacts. So I am trying to get better anti-aliased depth image.

You can easily extend the mist pass again.

  When measuring pixel values with ⎈ Ctrl LMB, be sure to set the display color color management to None otherwise your values will not be read linear.

Define an infinity limit, a value which is the maximum distance from the camera. Infinity will assume this value as well, objects beyond will clamp to this value. I used 1000. Set the mist depth to this value.
Set the mist start to 0.

Render a separate mist pass.

In Compositing:

Invert the Mist pass (1 - Mist).
Multiply it with the depth limit.

Remember to save as an .exr to retain values > 1.


Underwater weed wave dynamics I was trying to replicate the dynamic joint setup presented here (Maya) http://youtu.be/quNPwNt5zmk?t=48s (See the first 10 seconds animation of the "Process and inspiration of the making of PTEROIS" starting at 48s). The animation is showing a simple armature dynamic setup waving as you move/rotate the root of the armature around (soft/rigid body kind of dynamics - underwater weed/anemone kind of animation). Is this kind of setup / dynamic animation possible in Blender ? I was unsuccessful to find the proper solution/settings that would give me same smooth, non-jerky, attenuated animation. I used spline IK combined with curve/soft body animation. In the referenced animation note how when the root bone rotates, the rest of the armature follows the root bone propagating the wave all the way to the tail (@note: the tail does not move immediately).

I'm looking for a solution that would be as close as possible to the illustrated one: namely i want the dynamic wave animation to be smooth, the curve bending should be smooth (no uneven bending due to properly updated curve tangents during the animation). Also the curve should not jump around due to some funky solving errors, and the waving should attenuate to the rest position without further mini oscillations. And the armature should not stretch as the curve animates.

In order to help refine your searches for how to do simulations/animations, here are a few tips and key-words to help you on your way.

For sea-weed, you could start by adding a plane and then also adding a particle system to the plane.
Here I used mostly default settings with the few differences visible in the attached image.

Then I added a Force Field-> Turbulance and animated it's position using two keyframes.

You can also substitute each 'Hair' with a model that is on a separate layer using the following setting.


Where are the key frames in this animation? I have loaded an animation in Blender 2.83.0.
When I press Play, I can see the animation playing.
If I press the Tab key, my model goes into T pose.
I would like to copy this T pose to the first frame of the animation.
For some reason, I don't manage to show the key frames at all.
I have selected "Dope Sheet", then "Action Editor", and then I selected various elements of the model.
But I just don't see any key frames.
How could I show them in order to replace them?

You have "Only Show Selected" turned on in the bar at the top of the Action Editor

If you switch to pose mode and select a bone, it will show you the curves for that bone only. You can turn it off to see all the curves instead.


Can I animate which vertices a certain material is assigned to? What I want to achieve is to have a low-poly mesh with a certain mesh assigned to a set of vertices, and then be able to animate it to change which vertices are affected. Something like this:

To something like this:

I need the solution to work for any shape, and to be able to be animated to at least four different positions, and fairly easily. Any solutions?

Assign different materials with different pass index to the different vertex groups you want to affect.

Enable Pass index on the render layers.

In the Compositor you can then alter the material using the ID mask.


Boolean modifier difference not working I know this has been asked before - I've looked through and tested them all, and none works.
I'm using Blender to create a medical implant for 3D printing. I need to make the inner and outer casing fit exactly, and have been using Boolean Difference to "subtract" the inner volume of the casing from the outer casing. Normally, Boolean subtract works, but in this case, it either gives the error message "Cannot execute boolean operator", or simply deletes the whole upper casing (see overview figure - can't attach more figures currently).

I've tried:

removing duplicate vertices (edit mode A, W > remove doubles)
recalculating the normals (edit mode CtrlN)
applying scale/rotation (object mode CtrlA)

Yet nothing works.
I know this has been already asked a lot, but I have yet to found a go-to guide to systemically troubleshoot to find the problems with Boolean operators. Any thoughts? Blender file attached.

blender file

I add an answer to post pictures, here.

I checked your mesh, both shapes have some problems that could make boolean troubles... eg:

maybe try to fix those weird shapes...


How to call a function on change in Enum dropdown list? I have created enum dropdown list to change masking of an object by changing vertex group assigned

# On Enum change i want to trigger this function
def maskIt (self, context):
    #Do some thing here like bellow
    #bpy.data.objects["Suzanne"].modifiers["Mask"].vertex_group = "Group 2"

Creating Enum dropdown list here

def initSceneProperties(scn):
    bpy.types.Scene.MyEnum = EnumProperty(
        items = [('Group 1', 'Group 1', 'Group 1',1),
                 ('Group 2', 'Group 2', 'Group 2',2),
                 ('Group 3', 'Group 3', 'Group 3',3)],
        name = "Mask the MESH")
    scn['MyEnum'] = 2

Calling the function

initSceneProperties(bpy.context.scene)

Use the update argument of the EnumProperty.

import bpy

def maskIt(self, context):
    print('called and changed to,', context.scene.MyEnum)

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

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

def register():
    bpy.types.Scene.MyEnum = bpy.props.EnumProperty(
        items = [('Group 1', 'Group 1', 'Group 1',1),
                 ('Group 2', 'Group 2', 'Group 2',2),
                 ('Group 3', 'Group 3', 'Group 3',3)],
        name = "Mask the MESH",
        default = 'Group 1',
        update = maskIt)

    bpy.utils.register_class(LayoutDemoPanel)

def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel)
    del bpy.types.Scene.MyEnum

if __name__ == "__main__":
    register()


cube faces disappear I have download the file from some website and when im rotating the file some faces hide and only edges is visible. Is the file corrupted or is there setting done to the cube when rotated the faces hide.

The cube has backface culling enabled. Tab into object mode, hit N to bring up the Properties Region, then scroll to shading and untick "Backface Culling".


How to make a bronze material in Cycles? how to achieve a bronze shader, optionally with some dirt?

Here is my Mesh:

And here is a reference image showing how it should look:

Here's what I came up with using procedural textures:

I would use dirty vertex colors in 3D view > header > Paint while in Vertex paint mode to add some dirt to the corners:

You can then use this in your node setup via an Attribute node, with the name set to the name of the vertex color layer (Col by default):

You could more than likely get a better result more easily by using image textures.

I'd also recommend this tutorial, which has some great examples (and a free image texture).


How to Get only Shadows from a Collection in 2.8 EEVEE? I want to know is there a way to render Shadows only in Blender's new EEVEE Render Engine.
I want my objects in a separate collection and a ground plane on a separate collection(to receive shadows from the objects collection).I want to render the shadows only and not the objects.

As far as I know Collection won't behave like Render Layers in Cycles but you can use material as below to hide your mesh and show only shadows in EEVEE.


Python Error: Cannot write a single file with animation format selected I'm trying to render a single image using a script i have written using blender 2.78c

If i run the script on the default cube it works fine.

If i run it on an existing .blend scene i have loaded i get this error.

I have tried:

bpy.ops.render.render( animation=False, write_still=True )

I've also removed all animations from the scene.

Is there a way to do this?

Oops, I had Properties / Render / Output / File format set to h.264 instead of png


Why is the hair is only on one side? I've just started learning blender and I don't know how to change the particle position. I wanna move the hair to the other side. How do I do it?

This delves into the concept of normals, and mathematical planes. My short answer is to extrude the plane a bit, then recalculate all the normals in the Mesh menu (make sure to select everything first). This will turn the plane from a two dimensional area into a three-dimensional object, and will allow it to emit hair from both sides.
If you don’t want the plane to be solid at all, I recommend changing how the hair is emitted to not use normals.


Is there a way to get the exterior surface of a complex model in Blender? I have an stl-file with a 3D scan of a small unmanned aerial vehicle that I want to use in a physics simulation software, but before I can use it I need to clean it up a bit and fix non-manifolds. The model has over 600.000 faces, so it is not easy to manipulate by hand. Furthermore the 3D scan of the vehicle includes some of the interior of the vehicle that I am not interested in, since it would complicate the aerodynamics unnecessarily. So I was hoping for a way to create a new model based on the surface of the complex model.

I have included a image of the front of the vehicle from Blender with holes to the interior colored red.

I should probably also mention that I am completely new to Blender.

There are at least three ways to do this. One is to select the whole object, and apply the decimate modifier; another is to create a pair of planes, one above and one below, and apply to the planes a shrinkwrap modifier. The third method is to use the retopology idea offered by @poor. However, while any of these might yield suitable results, they each require a certain level of mastery of Blender to be able to do. In my view, you'd be well served to spend some time mastering Blender, before you attempt what you are trying to do.


Particles always in random size I am making a sprinkles on donut using particles but blender (2.79a) changes the size of the particles even though, random size is on 0 value.

Edit:

I tried changing type to emitter which made the them all same size but, also resulted in sprinkles placed randomly around glazing

I also have a box under my glazing which is only place I can use to move the glazing and I wonder if this is a cause of my problem.

Thanks for you answers guys!

As Mr Zak pointed Random in my Velocity settings was set to 1 instead of 0 which I probably changed to see what it is doing and simply turn it to 1 thinking that is the default value. I changed it back to 0 and all the particles are the same size.

Again, thanks for your help!


Curve handles aren't working I know I must have toggled something but for the life of me I can't figure it out. In this one Blender file any time I make a curve and go into Edit mode I cannot adjust the handles of the curve. The handles are there but whatever point I click on(be it vertex or handle) and try to move it, the whole curve moves. However if I open up a different or new project the curve handles work just fine and I can change the shape of the curve with ease. I can't seem to find the solution anywhere. If someone could help be I would truly appreciate it.

Do you have proportional editing turned on?  Toggle this on/off to see if your proportional editing zone is simply not visible and gives the impression the entire curve is moving as you try to adjust.


Python: how to iterate through and rename shape keys? I have a model with Japanese characters in the names of objects throughout the model. I've found this script which translates those names into english:

https://github.com/toruta39/blender-datablock-translator

It works well, however, it does not translate the names of shape keys. I'm attempting to modify the script to include shape keys but have not been successful. I believe shape keys data are stored in bpy.data.shape_keys. How do I loop through shape keys and modify each name?

What about this?

import bpy

for shapekey in bpy.data.shape_keys:
    # rename / translate shape key names by changing shapekey.name
    for keyblock in shapekey.key_blocks:
        # rename / translate block key names by changing keyblock.name


weird, white, glossy looking rendered view mode I'm super new to Blender and I need some help. I've been following a youtube tutorial "how to make a donut" and everything was alright till the rendered view mode. I don't know why, but in rendered view mode my donut has a very weird, white, 'glossy' look. When I switch to any other mode, everything is fine, donut looks normal. I didn't do anything to solve the problem, because I have no idea what the problem is. I would really appreciate some help :)))
here's a foto for better understanding the problem

My first guess is that you have a light source (point, sun or something else) that is way too bright.
Try and lower your light sources while in rendering mode and see if anything happens. Normally, lights only affect rendering mode, so my guess is maybe you tweaked the lights in another mode, went too far, and now everything is too bright.


Making an elastic waistband on clothing? I made these pants with this tutorial another user directed me: http://www.blendernation.com/2016/02/25/cloth-sewing-in-blender/

I followed the tutorial and got it to this:

I want to add an elastic waistband around the pant's waists and ankles so that the pants don't droop like that. How can I do this?

You may achieve the effect you want using a cloth pinning.

In Edit Mode select the vertices around the belt and ankles areas. Create a new vertex group and call it 'pin'. Assign vertices to that group.

In the Cloth settings check the Pinning checkbox and input the 'pin' group name below.


How can I see texture on my model besides in shading? For some reason I can only see the texture in shading. How do I make it so I can see the texture regularly?

You need to switch render modes. Pick either lookdev, also known as material preview (second from right), or rendered preview (farthest right). See below (highlighted red):


Solidify problem with borders 2.79 I take a circle, extrude it, and solidify and obtain a kind of cylinder.
If I deform the cylinder, the border becomes skewed.

How can I have a flat border as if the cylinder was cut with a knife?

You can solve this easily in Blender 2.82+.

In the Solidify Modifier

Set Mode to Complex.
Set Boundary to Flat.


Cannot select vertex I made a plane, and added knife cuts - now i cannot select specific vertices.
See picture below:

Most likely you have overlapping vertices. That means two or more vertices share the exact same position in 3D space. When you click on one of them, you are actually selecting a vertex, but it doesn't appear like it since one or more are overlapping.

Select all the vertices with the shortcut  A  (in edit mode) then right click > Merge vertices > By distance.


Calculating 3D world co-ordinates using depth map and camera intrinsics I am looking to annotate points on a rendered 2D image and then use the rendered depth map with the camera intrinsics to find where the point in 3D space is. This process is identical to creating a point cloud from a depth map instead I am looking for select points. I am following the function from the answer supplied here.
Function:
def point_cloud(self, depth):
"""Transform a depth image into a point cloud with one point for each
pixel in the image, using the camera transform for a camera
centred at cx, cy with field of view fx, fy.

depth is a 2-D ndarray with shape (rows, cols) containing
depths from 1 to 254 inclusive. The result is a 3-D array with
shape (rows, cols, 3). Pixels with invalid depth in the input have
NaN for the z-coordinate in the result.

"""
rows, cols = depth.shape
c, r = np.meshgrid(np.arange(cols), np.arange(rows), sparse=True)
valid = (depth > 0) & (depth < 255)
z = np.where(valid, depth / 256.0, np.nan)
x = np.where(valid, z * (c - self.cx) / self.fx, 0)
y = np.where(valid, z * (r - self.cy) / self.fy, 0)
return np.dstack((x, y, z))

self.fx & self.fy:
$\hspace{.5cm}$
From reading about pinhole camera's from here I learned that:

In a true pinhole camera, both fx and fy have the same value

So i have set self.fx and self.fy to 50
self.cx & self.cy:
I have entered the cameras position in blender which is (0,1,0) so:
self.cx = 0
self.cy = 1
Renders and Compositor:
$\hspace{5cm}$
$\hspace{5cm}$

My Implementation:
import cv2
import numpy as np

def point_cloud(depth):
    rows, cols = depth.shape
    c, r = np.meshgrid(np.arange(cols), np.arange(rows), sparse=True)
    valid = (depth > 0) & (depth < 255)
    z = np.where(valid, depth / 256.0, np.nan)
    x = np.where(valid, z * (c - 0) / .05, 0)
    y = np.where(valid, z * (r - 1) / .05, 0)
    return np.dstack((x, y, z))

img = cv2.imread('/home/sam/Desktop/Depth0001.png',  cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH)
img = img[:,:,1]
points = point_cloud(img)

This method does not output the correct set of points, I would appreciate if anyone can show me what I am doing wrong.

Several things to take into account to rebuild the rendered mesh.

Camera parameters:

Focal angle, in particular to reconstitute the mesh with the good positions. See here.
Also, camera clipping planes can be used to filter the image.

Camera axis:

Camera's Z is to the opposite to the projection: we need to minus Z from the image.
The rendered image is like a mirror: we need to minus X from the image.

Image size:

If camera is not shifted (common case), it is at the center of the image.
So coordinates should be centered around the half of the image width and height and scaled in consequence.

Compositor node:

Don't normalize the depth. If normalized, the values have no mean: they are just remapped between 0 and 1.

Image format:

Don't use PNG. You can't store the wanted values in a PNG except if normalizing them and we don't want that.
Use openEXR which allows to store the Z values as they are.
Compositor settings
Use openEXR and don't normalize:

Code
Comments below for key elements:
import bpy
import cv2
import numpy as np
from math import tan
from mathutils import Vector

def point_cloud(depth,cam):

    # Distance factor from the cameral focal angle
    factor = 2.0 * tan(cam.data.angle_x/2.0)

    rows, cols = depth.shape
    c, r = np.meshgrid(np.arange(cols), np.arange(rows), sparse=True)
    # Valid depths are defined by the camera clipping planes
    valid = (depth > cam.data.clip_start) & (depth < cam.data.clip_end)

    # Negate Z (the camera Z is at the opposite)
    z = -np.where(valid, depth, np.nan)
    # Mirror X
    # Center c and r relatively to the image size cols and rows
    ratio = max(rows,cols)
    x = -np.where(valid, factor * z * (c - (cols / 2)) / ratio, 0)
    y = np.where(valid, factor * z * (r - (rows / 2)) / ratio, 0)

    return np.dstack((x, y, z))

img = cv2.imread('C:/tmp/depth0001.exr',  cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH)
img = img[:,:,1]

# Get the camera
cam = bpy.data.objects['Camera']

# Calculate the points
points = point_cloud(img, cam)

# Get the camera matrix for location conversion
cam_mat = cam.matrix_world

# Translate the points
verts = [cam_mat @ Vector(p) for r in points for p in r]

# Create a mesh from the points
mesh_data = bpy.data.meshes.new("result")
mesh_data.from_pydata(verts, [], [])
mesh_data.update()

# Create an object with this mesh
obj = bpy.data.objects.new("result", mesh_data)

# Link it to the scene
scene = bpy.context.scene
scene.collection.objects.link(obj)

Results

Test file (relocate the compositor output before using it, and the file location in the code)

Also note (if useful), it seems that color management has no influence for depth.


Why isn't 'Inset with individual origins' working? What am I doing wrong? When I'm inserting one face at a time it works fine. When I select more the result is the same no matter if I choose individual origins or median point.

With some faces selected in Edit Mode press I to create insets, the status bar changes and displays that you need to press I again.

What you show in the animation is changing the pivot point to individual origins which does not affect the inset operator.


How camera size affects render quality? I would like to know, how the size of camera contributes to the render quality? We set the resolution in output properties. But I still, I have a doubt of whether or not the camera size contributes.

The Camera Size in the 3D viewport will make no difference in the qualities of the rendered image. Changing the size is meant to help you find and visualize the camera while you set the scene.
The Sensor Size will make a difference in the characteristics of the image, if it used in combination with the Lens Size and f-Stop to control depth of field (meaning how sharp, or blurry, the objects will be if they are closer to the focus distance or further away from it).
The Render Size in pixels, or resolution will determine how large the image will be, and how it is represented in a monitor (or whatever other media is used to display it). The more pixels the image has will have an impact on the amount of detail and how large the image can be displayed, or printed, before it is no longer sharp.


Displacement modifier as a wave? To see if it's possible, I'm trying to make pulsating veins on a heart in blender render. This step isn't too difficult, you can use a simple normal geometry of a veroni crackle texture and change the normals over time, or bake that texture into an image and use a displacement modifier and keyframe the strength over time.

But, the next step is to make this pulsating effect move like a wave through something like an actual heartbeat would, wherein one part on one end of the vein network starts the deformation, then the wave travels through gradually deforming only the vein texture onto the mesh over time.

Can this be done?

There is the wave modifier but this is a very outdated modifier that lacks a lot of precision in its control, it's pretty much only useful for large oceans.

I guess you can think something along the lines of this
https://www.youtube.com/watch?v=9tcR81BfiVY

Another 'In Principle' option...

Animate a 'pulse' mesh along a curve derived from, or used to construct, your blood vessel, using a Curve deform modifier, keying the location of the pulse mesh along its deformation axis:

Give the blood vessel a  Vertex Group for displacement, set to 0. (Vertices outside the group altogether will not be affected) Assign a Vertex Weight Proximity modifier, using the vertex group, targeted on the pulse mesh:

Assign a Displace modifier to the blood vessel, aimed at the vertex group.

'In principle', because, to say the least, you probably want the shape of your deformer, weight influence, timing, everything to be tweaked differently. :D But all the adjustments are available.

The pulse mesh could itself be shape-keyed on its journey, to modulate the expansion.


Closing useless areas with python I want to close all useless areas in my blender window. How command I could use?

To sum up, I need the command of "Close area":

for area in bpy.context.screen.areas:
    if area.type != 'IMAGE_EDITOR':
        #Close area

If you're using Blender's default startup.blend as your initial starting place, the easier solution would be to change to the "3D View Full screen" layout and then change that area to hold the editor you want (in your case, the UV/Image Editor). The code might look something like this:

bpy.context.window.screen = bpy.data.screens['3D View Full']
bpy.context.screen.areas[0].type = 'IMAGE_EDITOR'


How to assign an image to Image Node by its name For example I load 2 images (with suffixes: _normal and _color) into Blender.
I'm using this code for importing images:

supported_file_types = '.png', '.jpg', '.tif', '.hdr', '.bmp', '.dds', '.psd'
def path_iterator(path_name):
for fp in os.listdir(path_name):
    if fp.endswith(supported_file_types) and ((bpy.context.scene.color_string) in fp[-10:]) or ((bpy.context.scene.normal_map_string) in fp[-10:]) or ((bpy.context.scene.height_map_string) in fp[-10:]) or ((bpy.context.scene.metallic_map_string) in fp[-12:]) or ((bpy.context.scene.rough_string) in fp[-15:]):
        yield fp

Then I have those images in Image Editor.

How to find imported image by its suffix and assign to Image Node? I can't use the exact name of those textures just suffix, so this method won't work:

image_node.image = bpy.data.images['YOUR_IMAGE_NAME']

you can iterate over the currently referenced images in bpy.data.images.

def get_img_reference(suffix):
    images = bpy.data.images
    for img in images:
        if suffix in img.name:
            return img

img = get_img_reference('_Roughness')
if img:
   image_node.image = img

It's possible to write this shorter but the extra checking is a sanity check. This is case sensitive, beware :)


2.8 Rotate multiple objects around the origin in edit mode? for some reason the

bpy.ops.transform.rotate

code dont take account the pivot point, i dont understand why?
and its only one part of my problem... in my code :

import bpy

A = bpy.context.view_layer.objects.active
A.select_set(state=False)
bpy.context.view_layer.objects.active = bpy.context.selected_objects[0]
bpy.ops.object.editmode_toggle()
bpy.context.scene.tool_settings.transform_pivot_point = 'BOUNDING_BOX_CENTER'
bpy.ops.transform.rotate(value=4.71239, axis=(1, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='ENABLED', proportional_edit_falloff='SMOOTH', proportional_size=0.00584779)

i need that every object of my selection exept the active object do a rotation of 270* on the x axis while the origin point stay in place, is it possible ?

im on 2.8 by the way
i was trying to use the new multi-mesh-editor function, and this new select code :

A.select_set(state=False)

instead of the old code

thanks in advance

here's the version I had to use in my script to set the pivot point to work in blender 2.80.   by setting the transform to rotatate around the cursor, all objects will rotate around that locations and you can use shift+s to place the cursor.

context.scene.tool_settings.transform_pivot_point = 'CURSOR'


Cutting a rectangle from an arc A continuation of a previous post . I'm looking to cut a rectangle into an arc that i've modeled but running into some topology problems that I couldn't resolve. Below is an image of what i'm trying to do:

I've tried a couple of methods (that I know so far to my knowledge)

creating a mesh that has the inset and then extruding it after --> problem by doing this is that i'm unable to straighten the edges of the inset, they end up just being curves. For this, i've tried using subsurf edge (SHIFT + E)

Another method i've tried is doing a boolean but that just completely messes with the entire model...

Reaching out to the blender community and hoping someone may have an answer to this!

The basic key to a good subdivision surface result is having a loop of faces along either side of any edge that you want to harden. In your case, you have supporting edge loops on the extruded sides of your arch, but not on the large flat surfaces:

I used the bevel tool with the following settings to create face loops around each of the edges that needed to be hardened. This could also be done with the bevel modifier, using either angle or bevel weight as the control.

Here is the result with subdivision. Note that because the top and bottom are completely flat, and surrounded by face loops of quads, it doesn't matter that much that the geometry as a mess, as long as none of the n-gons are too concave. They can even be made all tris:


How do I write a code that starts playing animation, and stops playing it in 30 sec? This is a possible duplicate of my previous question, but the answers didn't help, so question remains the same.
How do I write a code that starts playing animation, and stops playing it in 30 sec? I'm working in blender 2.79 and 2.80.
Please give me an example of working code, that's really important for me now.

Modal timer template

Blender comes with a modal timer in its templates.  Text Editor > Templates > Python > Operator Modal Timer Here is the timer for 2.8 converted to start playing when operator pressed, and stop after 30 seconds.

This part

self._timer = wm.event_timer_add(1, window=context.window)

creates a 'TIMER' event every second (the 1 designates 1 second, the original has 0.1 or a tenth of a second)

When 30 of these are counted (30 seconds) the animation is stopped.

import bpy

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None
    count = 0

    def modal(self, context, event):
        if event.type in {'ESC'} or self.count > 30:
            self.cancel(context)
            return {'CANCELLED'}

        if event.type == 'TIMER':
            self.count += 1

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        # start animating
        bpy.ops.screen.animation_play()
        self._timer = wm.event_timer_add(1, window=context.window)
        self.count = 0
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        bpy.ops.screen.animation_cancel(restore_frame=False)

        wm = context.window_manager
        wm.event_timer_remove(self._timer)

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.modal_timer_operator()


How to see polygon's local axis in Animation Nodes? Sometimes it is very handy to visualize local axis to debug polygons' rotation (like 3D Viewer for location of points). Is there any default solution for this task?

This is an Axis type of displaying particles and I'd like to build something similiar in Animation Nodes:

While the local axis of a polygon is not exactly defined, one can generate a possible transformation for the polygon using the Extract Polygon Transforms node:


Remap spacebar to last action/command? Coming from an Autocad layout, it's so convenient to repeat the last command/action by hitting the spacebar, anyway to do that in Blender?

Repeat Last (Shift+R) should do the trick:


Deleted objects still exists I manually deleted an object from outliner but my python code still finds that object. Is this because we need to somehow "update" or "synch" the blender's display component with its actual data base?

Thanks!

My python code use bpy.data.curves[0].splines[0] to find the object (a bezier curve). I deleted the first BezierCurve from outliner then added a new BezierCurve object. Then I ran the code through the built-in scripting window. That is when I noticed the operation occurred on the originally deleted BezierCurve.

    import mathutils
    import bpy

    # by zeffi
    # https://github.com/zeffii/rawr/blob/master/blender/scripts/addons_contrib/curve_normalize_spline.py
    def get_points(spline, clean=True):

        knots = spline.bezier_points

        if len(knots) < 2:
            return

        # verts per segment
        r = spline.resolution_u + 1

        # segments in spline
        segments = len(knots)
        print("segments = %d"%segments)
        if not spline.use_cyclic_u:
            segments -= 1

        master_point_list = []
        for i in range(segments):
            inext = (i + 1) % len(knots)

            knot1 = knots[i].co
            handle1 = knots[i].handle_right
            handle2 = knots[inext].handle_left
            knot2 = knots[inext].co

            bezier = knot1, handle1, handle2, knot2, r
            points = mathutils.geometry.interpolate_bezier(*bezier)
            master_point_list.extend(points)

        # some clean up to remove consecutive doubles, this could be smarter...
        if clean:
            old = master_point_list
            good = [v for i, v in enumerate(old[:-1]) if not old[i] == old[i+1]]
            good.append(old[-1])
            return good

        return master_point_list

    spline = bpy.data.curves[0].splines[0]
    points = get_points(spline)

    for i in points:
        bpy.ops.mesh.primitive_uv_sphere_add(size=0.05,location=i)

Objects are "containers" for data. Mesh objects contain mesh data, curve objects contain curve data, etc. When you deleted the curve, you deleted the container, not the data that it contained. So, in your code your operating on the first curve in the curve data block, which would be the original curve.

Some options you have to resolve this are:

a. Delete the curve from the curve data block
 b. Find the curve that the curve object contains, and operate on it.

I would do the later:

curve = bpy.data.objects["curve object's name"].data
spline = curve.splines[0]


Add object constraints and link to an object I am hoping to get some help. This is the code I am using, but the constraint has no effect.

bpy.ops.object.select_all(action='DESELECT') #deselect all object

bpy.data.objects['A'].select_set(True)
obj = bpy.context.window.scene.objects['A']
bpy.context.view_layer.objects.active = obj
o = bpy.context.object

add_constraint = o.constraints.new('LIMIT_ROTATION')

target = bpy.data.objects['A']

bpy.context.object.constraints["Limit Rotation"].use_limit_z = True

bpy.context.object.constraints["Limit Rotation"].influence = 1
bpy.context.object.constraints["Limit Rotation"].min_z = 0.0872665
bpy.context.object.constraints["Limit Rotation"].max_z = 0.0872665

bpy.context.object.constraints["Limit Rotation"].owner_space = 'LOCAL'

Some tidy up.

In addition to @Leanders answer re limiting the constraint when using transform (which I've added in code below),  Note doesn't stop you setting  the z rotation property in UI to whatever..

If we wish to use context, would select those to add constraint to before script and then run from the context.  This is the fundamental concept of the context-operator paradigm. eg to run on object "A" select only "A" and run script below.

Test script. Adds constraint for all selected objects.  Note uses the reference to the newly created constraint con. It will have the default name only when there are no others with that name. Otherwise you add a new one and set the old one.

I use context = bpy.context in test scripts, so they can be simply copied and pasted into operator or panel code later, where context is passed as an argument.

Added code to remove other constraints of same type first.

import bpy

context = bpy.context

ob = context.object

for o in context.selected_objects:
    #o.constraints.clear() # removes all

    # remove other constraints by type
    lrcs = [c for c in o.constraints if c.type == 'LIMIT_ROTATION']
    while lrcs:
        o.constraints.remove(lrcs.pop())

    con = o.constraints.new( type='LIMIT_ROTATION')
    con.use_limit_z = True

    con.influence = 1
    con.min_z = 0.0872665
    con.max_z = 0.0872665

    con.owner_space = 'LOCAL'
    con.use_transform_limit = True

If you know the name of the target object is "A".  Unless you are going to later use operators on this object, there is no reason to set it as active and selected (context) to add modifiers to it this way.

scene = context.scene
o = scene.objects.get("A") #  if there is no object named A it will be None
if o:
    con = o.constraints.new(...) # as above.

For other constraints that need a target set, for example to add a constraint to each selected targeting context object

obs = context.selected_objects #safe to manipulate this prop
obs.remove(context.object)
for o in obs:
    con = o.constraint.new(...)
    con.object = context.object


My mesh goes nuts when I try to move points In edit mode I select a row of edges (alt+click), when I try to move the row with "G" it pulls points that aren't selected. I have tried to fix this any way I know how. (Including changing the origin of my object. I am getting ready to yeet my computer out the window. Please help me

It sounds as if you have Proportional Editing enabled. Click on the O shaped icon and choose Disable, or just press the hotkey O (in blender 2.79) until the blue circle turns grey.


Some materials aren't rendered in the Blender Game Engine As I described in the title, some materials aren't rendered. I'm not sure, but I think it only happens if I "copy paste" or append objects with their materials. I can solve this problem by recreating the broken materials (but this is a tedious task).

The materials are visible in textured viewport. Only when I  start the BGE they are invisible.

Here you can Download the .blend:

Download

(it is a car game. on the left is a text editor where I describe the problem again)

in this picture you can see the Material which disappears.

Thanks

I am having the same problem. Best solution I could find (more like a workarround) is to apply all the modifiers of the object which is causing trouble (in our case, it is Luftauslassheck).

Should you find out what is happening, please let me know. Here is a link to my blend if you want to take a look at it. The object is Support.Cover, which only has the material PlasticMaterial.002, used in other objects as well.

Nice car model by the way


VSE script for to add constant gaps between strips? How to add equal distance between the selected strips ?

Is there a script to access strips it will be great ?

Note: The I am aware or Shift + = to remove the gap between strips
I want to do the reverse of it I want to add equal space

I turned your question into one of my example scripts.  I'll include it inline because that's how stackexchange works:

import bpy

def gap_strips(strips, gap):
    strips = sorted(strips, key=lambda strip: strip.frame_start)

    cleanup = []
    for i in range(1, len(strips)):
        st0 = strips[i-1]
        st1 = strips[i]
        cleanup.append( [ st1, st1.channel ])
        st1.frame_start = st0.frame_start + st0.frame_final_duration + gap
    # blender's anti-overlap code might change the channel.  put it back.
    for x in cleanup:
        x[0].channel = x[1]

def gap_selected_strips(gap):
    gap_strips( bpy.context.selected_editable_sequences , gap)

gap_selected_strips(15)


How to get objects from different files into one file? When I click open, I get to I wanted to open, but I lose everything else. How can I open two files into one?

There are several ways to import other blender objects in to a blender file.
Copy paste
The simplest way is to have both blend files open, and simply copy the object from one file and paste it into the other.
Select the object in the 3D view, then with the mouse still in the 3D view press CrtlC to copy. To paste the object in to the other file pressCrtlV.
Append
For the second method you only need the file that you want both objects inside to be open (prior to 2.8 you have to be in object mode), and then Append the object you want.

File > Append (prior to 2.8 ShiftF1 opened the append window too)
Select the blend file that has the object you want
After opening the blend file go to the Objects and select the object you want by its name.
Click the Link/Append from Library button.


Render Blender's Internal Halo Material with GPU? Is it possible to render the Blender Internal's halo material with an Nvidia GPU instead of the CPU?

Blender Internal is designed to use CPU, not GPU, thus making this impossible... for now

Related:

Graphics Card Not Avalible in Blender Internal


Can I get a UV-irrelevant grid material on blender? I've been modelling on blender for a long time, and I was never really particular about what my default material is. Now, I've tried probuilder (unity plugin) and the only thing that I really enjoy and miss elsewhere is its default material that displays a grid.

Is it possible to get such a material in blender? This material always displays in 1:1 and never stretches, essentially ignoring UV. If you scale or modify the mesh, the texture is always gonna show the grid as is.

Someone on the blender Reddit made an custom node that does something like this.

He publiced it on blenderswap:
https://www.blendswap.com/blends/view/85263

You can tweak it a bit, here is a node setup you can use:


Unable to dissolve faces I want to dissolve faces as shown in this video.
In this video (please watch it at 0.25), the author turns some faces into "holes".
I try to do the same, but for me, it doesn't have any effect:

Why does it not work as in the video?
Thank you!

The tutor used an operator in the delete menu delete only faces.


Export Blender Character animation to Cinema 4D Lite I'm trying to export a character animation from Blender to Cinema 4D Lite. I've tried several exports, but I have been unable to have the animation come across. I'm afraid it has something to do with Cinema 4D Lite's lack of character animation tools (they're only available on the full, non-lite versions).

I'm new to Blender and tried some tutorials on baking the animation, but I'm not sure I'm doing it properly. I'm fine with not being able to edit the bones in Cinema, I just need the mesh to be animated.

Could someone lend a hand, or point me in the right direction?

Thanks!

I would use either COLLADA or FBX.
COLLADA
Copy these setting exactly. They can be found on the bottom left when you choose what to call the file.

Overview of settings

Apply modifiers:
Applies any modifiers like subsurf, generally a good thing since your mesh could end up different on the other side

Selection Only: If you have a hole bunch of other stuff in your scene, this can be useful to limit which objects you send.

Texture Options: Allow you to send textures.

Deform Bones Only: Removes all bones that don't influence a mesh

The rest of the setting are irrelevant
NOTE: You can only export Euler rotation, not Quaternion.
FBX
The default options work, just make sure you have Armature selected:

More Options:
Simply try each one of these the C4D Lite supports. Make sure to include animation + armatures in the setting in the bottom right hand corner (like mentioned above).


How to set scale across all blender objects and keyframes? I have a complex scene with physics (not baked) and I discovered a long way into the scene that I need to scale everything up for the physics to do it's thing right. I scaled everything up, pressed play and everything went to crap. My keyframes are interfering. Is there a way to set the scale of all of the objects across all of the keyframes without messing up the other keyframe settings?

Set the scale to the value you need and all the scale keyframes will be updated accordingly :

import bpy

scale = 2     #change this value  'scaling factor'

for action in  bpy.data.actions :
    for fcurve in action.fcurves :
        if fcurve.data_path == 'scale':
            for p in fcurve.keyframe_points :
                p.co[1] *= scale


How to "stick" an object to another such that it follows during animation I am trying to animate a swimming robot. It looks like this
I can easily calculate the centers of the spheres during one swimming strokes and set the keyframes accordingly. Now, is there a way to "stick" the jacks to its two corresponding spheres such that it deforms during the animation? The idea is that the spheres always stay connected. In reality, the arms would elongate and retract. More precisely, the spheres move along the axis defined by the jack around some initial length, while the whole structure translates and rotates.

You may want the cylinders to keep their shape when the spheres are moving.
First approach: cylinders follow spheres

A way to do that is to use bones and a "stretch to" constraint for each bone:

The vertices of each cylinder are linked to there bone's group name.
Each bone is placed along its cylinder.
And each bone as a "stretch to" constraint to the sphere (with "maintain volume" to none in order to have no deformation of the diameter).

Second approach: spheres follow cylinders
If you prefer to rig/animate the cylinder and make the sphere follow, you can use a "copy location" constraint to the spheres:

For each sphere, indicate the armature to follow, then the bone and set head/tail ratio to 1 so that the sphere follow the tail of the bone.