Exporting Texture Files as PNG or JPG So I have looked around the internet and blender forums and have had no luck finding the answer to this. So a group of friends and I are building a game in Unreal Engine and I have been using the OBJ format for 3d models. However Unreal Engine does not support .mtl files so baking won't work. So I want to know either if there is a different type of file I can use for it to work in Unreal Engine, or if there is a way to save PNG or JPG/JPEG etc. files. This is because I have added nodes and textured my obj with them which Unreal Engine does not work well with this. Thank you in advance for any help.

First thing - you can export textures from blender without a problem using uv/image editor:

Just select the UV/Image editor as show in (1). Then select texture you want to save (2) and finally save as (3).

Second important thing, from what I understood you are trying to export materials including nodes from Blender to Unreal Engine? This won't work as you suspect it would.

MTL files exported together with OBJs have very little material information and are pretty much useless, not to mention the format is old and there seem to be better alternatives available nowadays.

Basically no 3d software allows you to freely move its own materials to other 3d engines, everyone has its own material making system, renderer etc and I don't think I have ever seen any 3d modeling software being compatibile with 3d engine in that field.

What you should do, is export all the textures, including baked ones (by "baked" I mean textures with shadow/colour/light/normal informations baked into them) and then recreate the material inside the engine using those textures.


Calling variable functions based on name I would like to be able to iterate through a loop and call two sets of functions based on ..something - something that I can iterate through, such as a string list. Here is an example of my situation:

def Check(name):
    return not_important

def DrawA():
    draw_a_stuff
def DrawB():
    draw_b_stuff
def DrawC():
    draw_c_stuff

list = [ "A","B","C" ]
for type in list:
    if Check(type):
        continue

    func = get_function_in_this_module( "Draw" + type )
    func() # call drawing function

What would be the simplest way to do something like this? It will be used to draw UI sections of a panel based on which sections are visible/available.

Put references to the functions in a dictionary, using the names you want to invoke them by as keys, and the references as value.

functions={"A":DrawA, # The function name *must not* be followed by parentheses
"B":DrawB,
"C":DrawC
}

Then, you only have to check if type is in the dictionary, and call the function using functions[type](...).

(Edited for clarity in regard to the lack of parentheses)


How to screen two shaders in environmental view How could I mix these two shaders so I could screen one over another?
Attached here the blender file

I have these two shaders (in environment texture)
Shader1

Shader2

And I want to screen one over another like this (done in photoshop)

However, After trying with several mix nodes (color, math, mix shaders, add shaders) I can just get some mixture out of them like this:

So I'm not sure what you're doing but you could create this setup for your red cloud node group:

Then plug the 2 groups this way:

And you'll get that:

I hope someone has a cleaner way though  ;)


Need help with lighting the scene I'm a beginner to Blender and as my first Non-tutorial model, i tried making a Wine Bottle & a Wine Glass.
Well, the modelling went fine but the lighting part is still troubling me.
Can someone please help me with the lighting .
Here is the reference photo of how I want it to look like(except the cap opener) :
And here is my best renders up till now :

I'm also attaching the .blend file :
Thanks in Advance.

Maybe try adding a HDRI for your lighting/reflections. Go to the World section of your shading tab and add an Environment Texture (not an Image Texture).
Blender has some HDRI's at ...2.91/datafiles/studiolights/world. You can also find plenty more for free online. One of the most popular places is HDRI Haven (https://hdrihaven.com/hdris/):


How to do simple transformation How do I make a simple tranformation in respect to world coordinates. For instance, I want to change the standard cube (add->Mesh->Cube) to a 50mx40mx1m cuboid and have a another cuboid with the same dimensions with a distance of 0.5m in the z-axis away from it.
What I can do is use transform but I can not change the dimensions in respect to meters.
Does anyone understand my problem and can help me?

It looks like all I was looking for was to find and edit the dimension property (press n)


(Blender Internal) Texture Switching? I want to switch between textures, kind of like key framing them, and i tried this by clicking on the texture check mark, inserting a key frame, scrolling down further on the timeline, and inserting another keyframe, but it didn't work. Is there a way to do this and is there a way to make the texture switch a smooth transition?

Animating the use_texture property should change textures but will give a sudden change not a nice transition between textures.

The influence settings of the texture can be animated allowing a texture to gradually replace another texture.


Can I make a bevel curve transition to another one during the same bevel process? My situation is as follows:
I want to create a curved plane that has a crease or ditch at one end and is flat at the other.
To achieve this, I created a curve (curve 0) that defines my plane, then used another U-shaped curve (curve 1) to bevel the first one, creating the actual plane with the ditch or crease (the U shape of the crease or ditch being defined by curve 1).

Now my question is: can I create a third curve (curve 2) that is just a straight line and have the bevel transition from curve 1 to curve 2 over the distance of curve 0?

I don't know of a way to to morph a bevel from one curve to another.  If you want a blend a curved plane from one profile to another you need a NURBS surface.

Add (Shift + A) a Surface, NURBS Curve.
Edit the curve to the profile you want for one end of the surface.
Duplicate (Shift + D) the curve and move it along the Y-axis.
Flatten out the curve control point by scaling them in the Z-axis.
Select both curves and press F to loft them into a surface.


Breast texture in manuelbastioni is black My first post here. I'm a total beginner so sorry if I'm breaking any rules in advance.

In the past I used to use MakeHuman to create some characters and used them for project visualisation (for example). But it was a huge pain and now the future of MakeHuman seems even dimmer.
I just found about the ManuelbastioniLAB Blender plugin. It seems awesome, except the breast are covered black:

Now I need realistic breasts, because I work on breast cancer robotic surgery! I was wondering if you could help me know how I can get a more realistic texture for the breasts. Thanks in advance.

In order to solve your problem permanently you have to edit preferences.py file in /home/your_home_folder/.config/blender/2.81/scripts/addons/MB-Lab-1_7_5 folder:

from:

  use_censors = bpy.props.BoolProperty(
        name='censors',
        description="Use censors to cover genitals and breasts",
        default=True
    )

to

  use_censors = bpy.props.BoolProperty(
        name='censors',
        description="Use censors to cover genitals and breasts",
        default=False
    )

hope this helps


Creating normal map from foam like geometry I would like to create a certain material in order to use it in Unity. It is foam and it looks like this:

To create such a material, I have constructed a pyramid:

How could I now bake a normal map from the pyramid?

The pyramid would be the "high poly model", and then I would need a low poly model, right?

If yes, what should I choose for a low poly model? A cube?

Thank you very much for the help!

I think you need Bump Map (Heightmap) ...

Unwrap from top view
Create this material with disconnected, but selected Texture node (and newly created image texture)
Bake Emit pass

Save as OpenEXR or some 32bit format.

Use the baked texture for Plane object material as Displacement ...

... wait a minute ... you said for Unity ... do you want to bake pyramid shape or foam structure for pyramid?
The thing is I used it as a Heightmap that is possible in Unity, but require dense geometry ussually optimised by tesselation - nice quick explanation - Displacement in Unity.
On other hand using Bump or Normal map affects only shading - light behaviour on a surface, that will never gives you believable result for such object.

Source

Again I didn't notice the date ... that is terrible system ...


Pipe with round caps (ends)? I was trying to make a pipe with rounded cap or ends. Something like in the image, where I just added to spheres as "ends".

I've already surfed the internet a little and it looks like an uncovered issue, as simple as it seems.

I need to do this because I want to animate it later, like some type of growing body of water.

So, the method I'm trying out now is using a Bezier curve and applying some bevel, because of the "start bevel factor" and "end bevel factor" parameters which can modify the length of the pipe from its start or its end. Very handy.

What I've tried later, was to select a sphere for the bevel object, so it would return a pipe with rounded caps... but it was impossible.

So I'm totally open to new approaches, if you have any ideas!

You can do this with an array modifier and a curve modifier (see this post):

Add a slightly extruded circle/cylinder with no caps:

Add an array modifier:

Add a curve modifier:

For the array to deform as expected the object origins must be in the same place.
Add two half spheres as start and end caps:

the length can be animated with the Count value of the array modifier.


Joining rooms made with archimesh creates one sided model I'm a real blender noob (maybe 4 hours of experience). I created model of a house with archimesh addon. Once I was happy with the layout, I joined all the rooms into one model using CTRL + J. I tried to texture the outside of the house but it does not have vertices, edges nor faces.

Here is image of the faces my model contains when rooms are joined:

I took a look at backup of the model where rooms are not yet joined and I noticed that rooms didn't have "backside" then either:

I want to see the edges of "outside" of the house (and each room) so I can mark seams to start texturing. Please help a noob.

Archimesh uses a so called solidify-modifier to make your walls thick (instead of "real" geometry that you can manipulate in edit mode)

you have multiple options to change the materials:

you can apply the modifier: go to the panel on the right and click on the blue wrench icon. there you can click apply (green box in the screenshot)
you can enter a material index offset of "1" in the modifier panel and simply add a second material to you walls


How do I create a clay/fingerprint texture on a Blender model (as shown in the art pieces here)? Beginner here - I saw these art pieces on Instagram, and was very happy to see that it was indeed possible to make a 'light fingerprint/clay' texture on 3D models. Since I was hoping to create a similar look for a character model I'm working on, could anyone please tell me how to create such an effect on a Blender sculpt?

I saw the happy globe on reddit:)
You can get a goot fingerprint texture for free from Poliigon.com.
https://www.poliigon.com/search?query=Fingerprints

You need to change the render engine to Cycles and create a material while you have an object selected.

Click the "use nodes" button and open the node editor (where the different modes can be chosen).

In the node editor press Shift+A and chose "Image Texture" from the menu. If you use the add-on "Node Wrangler", you can click on the image texture node and press Shift+T to get your mapping node.

You then choose the texture of the fingerprints in the image texture node. You got to create a bump node and plug in your image texture there and then plug the bump to the normal node of the shader you choose. I recommend the principled shader. You could also directly use the displacement node to plug in your image texture. In that case just put a math node in between them and choose the multiply function to control the strenght of the displacement. If you do that you can change to the experimental feature set in the render panel and then go to the Settings section of the material tab and change the material tab from bump to true.

Don't forget to unwrap the mesh object you want to apply the texture on.
I hope this works for you as an explanation. It's a very broad question.


Unusual lines on UV map after using “Difference” to create apertures on a plane I used the difference procedure to create a “door” and “windows” on a single plane. (placing 3 joined cubes through the plane and using the “difference” modifier to create the apertures) After overlaying the test map the result shows unexpected lines, indicated with yellow lines, on the resulting map. I uploaded the results (Second life) and it appears to look ok.

I could use Loop cuts to get the same result but was wondering if anybody knows what is happening (the unexpected lines) and if this is going to cause issues elsewhere.

I have applied rotation and scale modifier, remove double vertices and reset origin to centre

Using the Boolean to cut the openings left the object with only 2 faces, Filling in these  Concave Ngons caused the lines you see in the UV space. If you enable the face select mode this will become more obvious.

These Ngons will not be a problem as such once the object is imported into SL as the importer will convert those Ngons to triangles.

But as FFeller suggested using loop cuts is a much better way to go about this simply because you have more control over the geometry:

And having more control means it will be a lot easier to optimize the model ( = Lower LI costs) , easier to create lower LoD models and Physics model later in the process.
So best to avoid Boolean cutting for SL :)


Creating a graph on the surface of an object I am trying to achieve a robot in blender, but I am stuck at a part where I have to make a sort of graph. Here's what I mean

I've been trying to add cubes, shrink them, resize, and rotate them, but I never get a good outcome. I was wondering how I could make it close enough to the actual picture. I am not rendering it, I am going to 3d print it. Heres what I have so far.

You may do it using a curve and then convert it to mesh.

Add a curve, scale it to make it longer and then subdivide many times with W (set the segments number in a Tool Shelf). Form its shape as you like (to be accurate use background image as a reference).

Select all points with A, then press V-->Vector to change the handle type. Add bezier circle and do the same with it. Rotate it 45 degrees (you may change the circle's shape as you like though).

Select the curve and go to the Curve header, set it's type to 2D. Set the bezier circle as a Bevel Object target. Check the Fill Caps checkbox in a Geometry panel. Scale the bezier circle to adjust the curve's thickness. Finally press Alt+C-->Convert to Mesh in Object Mode.

Enable Auto Smooth checkbox in the Normals panel of the Mesh Data header to make the object smooth.

Use a snapping tool to attach the curved mesh to your robot. Click the magnet icon and change the snap element type to Face.


Windows 10 crashes using blender I have tried to find an answer in internet on my issue before to write in this blog but I couldn't find any. I am currently using blender 2.90.1 and after rendering a complex scene I open a new Blender file and windows suddenly crash. I have the same issue with Blender 2.83. I am testing the software with 'The Junk Shop' scene. I have updated Windows with the latest updates but I think I have an issue with my GTX 1060 and windows doesn't update the latest graphic drivers as it was doing before.
Please see below the Computer info:
I hope that some one can help me
Thanks

I had to search better for the correct driver. there is a different between Descktop driver and Notebook driver. Thanks to everyone for your help
this looks the correct driver

https://www.nvidia.com/Download/index.aspx
for now it look that it is working properly
Thanks


how to correctly import .wrl in blender? I basically know how to import this type of file (file-> import-> X3D Extensible) but when i do this with a wrl file i got from DSI Studio (Program to track brainfibres) the fibres show weird dark triangles. if i open the same file in windows' own 3D Builder app the fibres apper as nice as in DSI Studio (lack of color ignored)

So what do i do wrong? is blender the problem? could you suggest annother program to convert the wrl file to an fbx file? i want to use the 3d model for a game being developed in the unreal engine 4.

I put some images in for clarification. first is blender, second is windows 3d builder.

Hopefully someone can help me.
Thanks in advance.

Got it!

I have selected the model in blender, changed to from object to edit mode, then pressed ctrl + n and. after that on the lower left hand side appeared "Make Normals Consistent" with a checkbox "Inside". clicked that, exported as fbx, imported in ue4 and everything looks fine.

Thank you for your help!


How do I make every vertex to be associated with the same number of bones? If I want to make every vertex to be associated with three joints, no more or less, is there a way that doesn't involve manually setting the vertex?

There is an operator called Limit Number of Weights per Vertex:

  Limit deform weights associated with a vertex to a specified number by removing lowest weights

Operator call in Python:

bpy.ops.object.vertex_group_limit_total(group_select_mode='ALL', limit=4)

You can find it while in Edit Mode of the parented mesh,
in the 3D View T-toolshelf > Tools > Weight Tools > Limit Total.

Or you go to Weight Paint mode > Weights menu > Limit Total.


I'm trying to set up a workflow to build PS1 low-poly 2D/3D environments and I have a few questions I'm trying to work towards making 3D/2D environments and assets like those you'd see in PS1 games, specifically games such as Xenogears, Wild Arms 2, and a couple of others. If you're familiar with that era, specifically JRPGs (Japanese Role-Playing Games) you know what I'm talking about. The actual workflow of building the pixel textured 3D assets I'm getting down, but I still have a few questions.

The pixel guy you see is made in Asesprite; I'm not building the flat 2D assets such as him in Blender, I'm using him as a reference image to compare against the actual 3D objects I'm building in Blender.
Often I need to import a 2D, pixel based reference image to ensure that the 3D assets and environment I'm building match up with one another. When I'm importing a reference image, especially a flat/2D image, how can I make sure that the image is and remains the absolute, objective size that it is? I ask this because sometimes when I import a reference image that otherwise is the same size in Asesprite, in Blender they're wildly different dimensions.
As you can see from the link the reference image I uploaded is blurry; how do I fix that?
How can I check the sizes in pixels of something in Blender? For example, if I'm using 32x32 sized pixel assets it's important for me to check and double check those dimensions in Blender to ensure that everything is in order from time to time.
Any additional tips for what I'm doing? Anything I'm missing in my workflow?

Blurry Reference Image
Your reference image is blurry because it's only 32 x 32 pixels small and Blender needs to scale it up to the actual size on the screen. The default algorithm to scale an image is Linear which interpolates the pixels. It's a setting of the Image Texture node. Switch the Texture Interpolation setting from Linear to Closest and the image will keep the pixelated appearance.
Units and Sizes
Blender's default Unit System is Metric. It can be changed in the Scene properties but there are only 2 other options: None and Imperial (inches). No pixels. So it's up to you to create a mapping. For example, you can say that 1 pixel of the reference image is 10 cm in Blender. That way your image would be 32 x 32 cm.
Of course, when you export the 3D object it will be 32 cm tall. This might be too big or too small in the game engine. It's probably best to import a sample asset into Blender and check the size. Then you will have the correct mapping between pixel and meter.
You can check the Dimensions in the "N-panel", the viewport's side panel. Press N to open it. There you also can lock the scale values so that you cannot accidentally change the image's size.
Helper Add-On
Blender comes with an add-on called "Import-Export: Import Images As Planes". You can activate it in the preferences. It might be handy if you need to work with a lot of reference images.


How do you find the nodes you're looking for When following tutorials, I often come across one of the Math nodes ("Greater than", "Power", "Modulo"...), which, unless you use the Compositor for several hours every day, I don't think you can know by heart.

Of course, I usually end up assuming that the nodes I'm looking for are inside the "Math" node - and usually that's exactly where they are.

I just came across a tutorial requesting this node:

Sure enough, I thought I'd find it in the Math node. Not there.

I searched again:

Still nothing.

I think it would be a great idea for the developers of Blender to show these words in search results even if the word is a part of the node (rather than the node's name itself), for example:

Math > Modulo

could show up in the search results, thus informing the user where the node they're looking for is and what it's hidden inside.

Does anyone know of a way to find where to find certain functions of a node when it doesn't show up in the search results (or when it's a sub-menu of a node)?

Ideally an offline way of doing this.

Going back to look for the Soft Light...

I think it would be a great idea for the developers of Blender to show these words in search results even if the word is a part of the node (rather than the node's name itself).

You should suggest this to the developers, if enough people find it useful it will have a better chance to be implemented,there is a section in blender about small tasks so that new developers can pick a small task and try to code them to be implemented in blender , yours seem like a good task.

  Does anyone know of a way to find where to find certain functions of a node when it doesn't show up in the search results

There aren't many nodes like that that have those kind of sub menus, if you use blender long enough and with practice you will know their location by heart.

to ask for a feature to be implemented in blender , see  : Best Place to put Feature Requests?


Z dimension insanely skewed? My model shows dimensions of 1.35, 3.9, and 100000000000000000.000000. It looks perfectly fine in my viewport though. The z size is very similar to the other dimensions. I have applied all transformations in object mode. I am clueless what else to do. It is causing me to be unable to import into unreal. Any suggestion how to fix?

welp, apparently I had a stray vertice a million miles in the sky. I was able to pinpoint it and delete it.


How can an Android photosphere be used as a scene background? How can an Android photosphere be used as a scene background?

Should I map it onto a sphere? Is there a feature of background images I can use from scene?

Yes, there's a easy way;
Cycles
Just go to the Node Editor, change the type to World.

Then, check Use Nodes, if it isn't already, press Shift + A and add a Texture>Environment Texture node; Point the to your file, and connect it to the Background node.
If you don't like/understand the Node Editor, you can go to the Properties, switch to the World tab, and click Use Nodes, then besides the Color field, click the dot, and select Texture>Environment Texture and point it to your image.

Blender Internal
Go to the Properties panel, switch to the World tab, go to the World subsection, and check Blend Sky and Real Sky.

Then go to the Texture tab, click New click World under Preview and open your image. Scroll down to the Influence subsection and check 'Zenith Up', Zenith Down, Horizon and Blend.
Then go to the Mapping, and change the Coordinate field from View to Equirectangular.


Rigging voxel character; How to reduce deforming of mesh at joints I've created a very basic character so that I can learn to do basic rigging and animation, but I'm struggling with areas of the mesh that will bend.

This will be easier to show.  In the first picture, you can see the leg is bent, however, I want the mesh to remain as boxy as possible.  I don't mind some deforming, but in the picture, it's way too much, but am unsure what to do next.  I tried adding more loop cuts around the joint (1 above, and 1 below), but I seemed to make it a lot worse.

Is this a case where I may have to have an upper and lower leg that are separate parts?

One way would be to make pseudo joint on the mesh, where you expect it to bend (like knee) by making 2 additional edge loops and merging them on one side like this:


Can't reset rotation of object I am following a tutorial to learn Blender and I have a rotation problem.

All the rotation values of my object are reset to 0 but it is still rotated. Apparently rotations made in Edit mode apply differently but I am now unabled to reset it to zero.

I tried ctrl + R and Clear all user tranformations and nothing seems to work.

Thanks

Edit: It's now easier since 2.8 as you can enable the Affect Only > Origins in the Options and use it to realign to a custom orientation.
Previous versions:
If you've rotated your object in Edit mode, you will only be able to get back to the original rotation position with a trick like the one I'll explain below. In Object mode, if you reset the rotation to zero with alt R it will only reset the rotations you've made in Object mode, not the one you've made in Edit mode. And also, if you've applied the rotation in Object mode with ctrl A, you also won't be able to reset (again, except with the trick like the one below).
How to avoid it: if you want your object (cube for example) to remain orthogonal to the grid, don't rotate it in Edit mode, only rotate it in Object mode, and don't apply the rotation with ctrl A. This way you'll always be able to go back to the original position with a simple alt R.
Now, the trick to align a randomly rotated object (cube for example) to the grid
as explained by refa42 in a youtube video: https://www.youtube.com/watch?v=0pfTDzAaXp4


How to make looping circle animation? Is there an easier way to make a circle looping around without animating its frame? That's means if it can automatically loop around using this circle

I made a circle similar to yours and extrude it.
You can add a driver to the Y rotation. See below:

You can change the value of driver to whatever number you want,
for example: frame / 2   can change to  frame / 1


How to apply the UV map of a scan to a retopologized model? Using photogrammetry, I obtained a perfectly textured model. I created a retopologized low density mesh of it. Now, I'd like to apply the UV map of the original scan to the new mesh. What is the best option to do it?

You won't be able to tranfer the uv map since there is a difference in face count between the two meshes.
what i would do is unwrap the low poly mesh and bake the diffuse from the high poly.
use selected to active option when baking and enough samples, the result is an approximation but can be a good start for re-texturing.


Is there a function to fix edge length in Blender? I hope this question is clear enough. I am trying to create a 3D model of a tesselated origami model. What I want to do is translate a vertex and have the surrounding vertices translate such that edges connecting them to the translated vertex keep their original length.

Here is an image of the origami model:

Here is an image of the 3D model of the flat tesselated pattern:

I hope you can see here that I would like to translate the centre points of the concave hexagons (the vertices currently selected) and have the connected edges keep their length as if it was made of a rigid material.

For the specific case, You may consider using cloth simulation to preserve the edge length:

Step 1 to 3: Create Unit; mirror + arrays; Apply modifiers + coloring for convenience. (For existing model, you can ignore above)

Step 4: Select all poked vertices, CtrlG to add to a new vertex group, then CtrlH) to add a hook.

Step 5: Add Cloth simulator. use the vertex group as pins.

Step 6: Scale the hook while simulating (playing animation). Then AltC - 2 to convert the result. Finally, delete all unwanted faces.

Example file


3d model visualization settings I am modeling a house in solid view. I have some problems with the visualization. Expecially where non complanar faces have the same colours, this is confusing and pretty much annoying since it is quite difficult to have a real vision of the solid that appears flattened and with no depth.
Are there some particular settings that I should modify?


Grease pencil + multiply layer blend mode = small gap where layers overlap I'm wanted to draw with two colors, each on a layer with a multiply blend mode of the same Grease pencil object. It always ends up having a thin gap where the colors overlap. Any ideas of why this is happening and how I can fix it ?

Here's a screenshot and more info :

So the red layer is the one underneath and the blue layer is on top, but only the red layer (bottom) has this gap or line around it.
I've tried changing the stroke depth order, the blend mode, and basically all the other parameters in the object layer tab. But nothing gives, and when rendered it's still there.

It looks like it may be because the layers are on the same plane, but I know I can't move them individually as they're part of the same grease pencil object. Then again I've seen videos where this issue isn't present, so I wondering if I'm not the one doing something wrong here.

I've found this thread that as the same issue in the developer forums.

I'm running Ubuntu 20.04 and using Blender 2.82a.

To replicate this issue :

Create a new 2D animation
Create 2 new materials (or use the default black and red strokes)
Use any brush, with strength at 1.0 for better results
Make overlapping doodles with one of the colors on one layer and with another color and a second layer
Switch the top layer's blend mode to multiply (or any other but regular)

Any ideas ?

Ok so I found a solution to my problem, I'm posting it here in case it may help someone some day.

The white line or gap goes away if you add a third layer underneath them with a fill to act as a background. Here is a screenshot where I drew a white fill shape under the right part of my two other multiply layers :


Filling holes in a mesh I'm currently designing a space window, shown in this picture

Currently I got this far:

So I have  problem with filling the smaller Windows,
I want to fill them em with these windows just like in the picture, but I cant really do it. How should I do this?

In most cases it's better to think ahead before you model something. More difficult to do with less experience. I would approach it this way (I'm sure there is more than one way to model this).

Add a circle with 34 vertices
In Edit Mode, extrude it four times by pressing E and S (Scale)
Then extrude one more time but instead of scaling, Left Click (LMB) and then press ALT+M > Collapse.

Then select the following faces and Extrude up:

It's hard to tell from the reference image but if the window has a conical shape:

Select the following interior Vertices > Enable Proportional Editing > choose a Falloff type (I choose Linear)
Grab them and select an axis to move them on (I used G+Z)
Control the number of vertices effected with the mouse wheel


How to keep all the islands facing the right direction (UV)? I am looking to make all the island facing the correct way. I can use a texture with arrows to help me, but it will be difficult to notice the small mistakes. How can I have the islands all facing the correct direction?

In 3D-View-Window press N for opening Properties.

Under "Mesh Display" you find "NORMALS:" press the "Face" Symbol. If you now go with your mesh to the Edit-Mode you see little lines coming out of the center of each face (These lines show the Normal direction). With "Size" in Properties-Panel you can change the Length of the these lines.

Now choose all your faces and open Tool-Shelf by pressing "T". Under "Shading" you find "Recalculate". All Faces should now look in the same Direction. If any of your faces should not, select these faces manually and press "Flip Direction".

"Recalculate" could not work perfectly when your faces are not connected (Island-faces?????)


Is there an easy way to set the speed in units like km/h for an object travelling along a path? I've made a scene with a car travelling along a path; is there a way that I can simply set the speed of the vehicle in m/s or km/h?

Manually calculating the distance my object has to travel in a certain time, or setting the correct slope in the graph editor seems like a hassle that shouldn't be necessary.

I think I finally have a working solution:

    import bpy, mathutils
from mathutils import Vector

le = 0

#Speed in m/s
targetSpeed = 10
obj_name_original = bpy.context.active_object.name

def getLenght():
    ob = bpy.context.active_object
    if ob and ob.select and ob.type == 'CURVE':

        em = (ob.mode == 'EDIT')
        bpy.ops.object.duplicate_move()
        bpy.ops.object.mode_set()
        bpy.ops.object.transform_apply(scale=True)
        bpy.ops.object.convert(target='MESH', keep_original=False)
        ve = bpy.context.active_object.data.vertices
        global le
        dd = le = 0
        for i in bpy.context.active_object.data.edges:
            dd = ve[i.vertices[0]].co - ve[i.vertices[1]].co
            le += dd.length
        le = round(le,4)
        bpy.ops.object.delete()
        print(le)
        if em: bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        global obj_name_original
        bpy.context.scene.objects.active = bpy.context.scene.objects[obj_name_original]
        bpy.context.object.select = True

    else:
        raise Exception("The selected object is not a curve")

targetC = 0

def findC():
    global obj_name_original
    for ob in bpy.data.objects:
        if ob and ob.type == 'MESH':
            for c in ob.constraints:
                if c.target.name == obj_name_original:
                    global targetC
                    targetC = c
                    #print(c)

def setO(scene):
    global targetSpeed
    global targetC
    global le #scene.render.fps    ((le/targetSpeed))*(scene.frame_current/(scene.frame_end*targetSpeed))
    targetC.offset_factor = scene.frame_current/((le/targetSpeed)*scene.render.fps)

getLenght()
findC()

def register():
    bpy.app.handlers.frame_change_pre.append(setO)

def unregister():
    bpy.app.handlers.frame_change_pre.remove(bpy.app.handlers.frame_change_pre[-1])

if __name__ == "__main__":
    register()

The way it works is that it approximates the length of the curve, and then changes the offset of the object following it every frame - essentially animating it. It does require that you select the curve before running the script, otherwise, it will purposely crash.

If you want to use km/h instead of m/s you just need to divide the speed by 3.6, which will convert it to m/s.


Snapping an Extrusion Referring to the attached image, using a simple extrude and scale workflow, is it possible to snap the upper extrusion so it matches the size of the lower one? I thought this would be quite simple but I just can't seem to work it out....

With the top face deleted and vertices selected ...

Set Pivot to Median
Set snap to Vertex and Active, and set it to influence Scale. Check 'Project on to Self'.
With cursor close to Active (white) vertex Extrude E Scale S Limited Axis ShiftZ and snap the active vertex to the one below it.

(Holding Ctrl while dragging toggles the 'Snap' state.)


How to add a minimum value to f-curves I want to make a plane change the scale to an audio signal. Now when I try using the bake sound to f-curve-function it obviously starts with the scale at the value 0. Is there a way to give it a minimum value so that it starts with the normal size I gave it before and only moves above that one and doesn't shrink?

Greetings

Bake indirectly to custom property

If you add a custom property, in this case on the cube, give it a keyframe,  Note make sure to set the maximum to more than 1 when defining the custom property

Bake your sound to custom prop.

Drive a value with the custom property. Here I'm driving z scale of the cube

Can type a driver expression straight into property box. Initially a hash # signifies it to be a driver.

In 2.79, switch graph editor to drivers mode.

Because I used the same object that has the custom property as the one who's scale I wish to drive I can use self in drivers.  Note since use self is not default, have to set this manually, and will need to update dependencies, since without use self, it doesn't know itself

The driver expression is

1 + self["prop"]

returning a minimum of one when the bake is zero.

Can amplify, etc

1 + 20 * self["prop"]

Or to make things more interesting. add two more custom properties.

self["min"] + self["amp"] * self["prop"]

allowing the animation of the minimum the amplification.

If you know the maximum of the fcurve can use a generator or an envelope to adjust.

What's the range of values on a sound-baked f-curve?

How can you invert an F-Curve

Please Note, the now-defunct sound drivers addon was my first addon project.  I have it way back on the back burner, and am replacing it with a third party module aubio version.  Check out the site, baking sound is much quicker with aubio


How to export list of prop values as txt to a certain folder? And how to import them back? How to export list of prop values as .txt to Local Disk (C:) > Blender game > New Folder?
And how to import them back?

Now im creating save and load game: global position, stats, items etc...
and im planning to save it as list.

Tho im not sure how to do it.

Let's say I have informantion set as var myprop and myprop2.

Btw... how to get globalPosition?

Here's a very simple example, of how you could write out something to a text file:

import os

# Ensure all folders of the path exist
path = "C:/Blender game/YourFolder/"
os.makedirs(path, exist_ok=True)

# Write data out (2 integers)
with open(path + "file.txt", "w") as file:
    file.write("%i %i" % (myprop, myprop2))

# Read back in
with open("C:/Blender game/YourFolder/file.txt") as file:
    data = file.read()
    a, b = map(lambda x: int(x), data.split(" "))
    print("Imported integers:", a, b)

Note that C: is usually the system partition and in order to write to it, you must have elevated rights (run Blender as administrator).

Other possible ways to dump and re-import data is to use the struct module (binary), pickle (python object serialization) or maybe json if you want something human readable. You can come up with your very own text-based format too of course, like shown in my example above, but it can be come tricky to parse very soon. I discourage the use of XML, as it's rather complicated to use in Python without additional libraries.


Why did these bones go all funky? I opened my blender project today and for some reason certain bones of the armature are scaled weirdly and are out of place. The model still moves correctly, but this just seems weird. Sorry if it's a dumb question, I'm a blender newbie.

Well, you could select the bones that are over the others, or
interfering and send them to a second layer. Select the bones you want and press M, then in layer click the one you want to send them.


Cell Fracture Causing Squares I am trying to use the cell fracture addon to make tiny, pointy shards from a plane. I will have objects flying through the ground and shattering it. The original plane looks like ice when it is textured. When I turn the quantity up in the cell fracture settings, the pieces look like rectangles. Like I stated I wanted to make many tiny, uneven, pointy shards. What am I doing wrong?

You will want to modify certain parameters of the cell fracture tool. To change the numbers of fractures increase the Source Limit. To avoid all fractures looking like squares increase the noise. I would increase is all the way to 1, this will look the most natural.


Boolean difference - Confused I'm very confused about the Boolean difference modifier. I'm modelling a concrete road block for use in a board game. I've created a basic shape and now I want to create grooves in the side by subtracting a wedge using the Boolean modifier.
I have uploaded my Blender file to Google Drive:

https://drive.google.com/open?id=0B9jXsWFCZiMJMTZxTzVhcEl5Yzg

I've got two copies of my roadblock, named Roadblock 1 and Roadblock 2. The shape I want to subtract is named Wedge. Here's a screenshot (I'm working on one of the copies of the roadblock):

When I select the wedge in the modifier's "Object" field, the roadblock shape disappears completely. I can't put any additional pictures, my reputation isn't high enough.
I have tried this with both roadblock objects, and both have the same problem. No matter where I try to subtract the wedge from the object, it disappears entirely.
To find out it was the roadblock or the wedge that caused the problem, added a cube and tried subtracting the wedge from the cube, this worked normally. I'm a complete beginner at Blender, and I find this very confusing.

edit: I spotted you're using 2.69, which is quite old... I'm on 2.78 so it could be a problem with 2.69 perhaps.

I tried your file, and I get this, which is pretty ok, imho, if I got what you exposed in the question:

otherwise maybe you could show what exactly is not working for you?


added cylinder looks like it's the wrong size During mesh edit, I'm trying to add a cylinder that has a 0.125" radius.  Seems straightforward enough.  But I'm finding that the dimensions look completely wrong.  See screenshots of 0.5", 0.25", and 0.125" radius cylinders below (viewed on-end).  The grid pattern is 1" squares.
the size doesn't look right.  What is going on here.  If I draw a line approx 1/8 of the distance from the center of the cylinder to the first line, I would expect it to be near the size of the 3D cursor.  But it's much bigger.  What is going on here, how do I fix this?
I'm setting the size in the "add cylinder" dialog.  It reads, for example, "0' 125 thou"
The view is directly down the Z axis, with an orthographic projection.

UPDATE:  Added units settings screenshots

Blender v2.91.2, Windows 10, fresh install

Turns out this was caused by a "solidify" modifier that I had on the object I was editing.  Applying the modifier or deleting it before adding the cylinder solved the problem.


how to smooth zoom in on a movie clip using transform scale in video sequence editor? I've created a transform in the video sequence editor that applies a uniform scale to a strip.

The zoom in happens as soon as the transform frame is reached and then the zoom out happens just as abruptly at the end of the transform.  I would like zoom to be progressive.

How can I do this with blender?

Have you tried to do linear interpolation in the graph editor?
Press A to select all, then V> Vector.

Optionally, after the previous steps: Shift+E> Linear extrapolation.


How can I use the curve modifier with curves that have sharp corners? is there any way that I can get a mesh to follow sharp corner better. I'm using the array modifier and the curve modifier. As you can see from the image, the corner is very messy, so any suggestions would be appreciated, thanks.

You have to add edgeloops or subdivide the mesh to get smooth deformation:

Plane without Edgeloops:

Plane with Edgeloops:


How to model 4 camera automatically in python import bpy
import numpy
import math
import os
from mathutils import Euler
from bpy import context, data, ops

scene = bpy.context.scene
bpy.ops.object.select_all(action = 'SELECT')
bpy.ops.object.delete(use_global = False, confirm = False)

#***********************Camera parameters**********************************
focal    = 3.04  #focal lenght (mm)
sw       = 3.68  #sensor width (mm)
sh       = 2.76  #sensor height (mm)
eul_mode ='XYZ'

number_cam = 4
count      = 1

location = [(0, 0, 3), (3, 0, 3), (0, 3, 3), (0, -3, 3)]
rotation = [(math.radians(0), math.radians(0), math.radians(0)), (math.radians(45), math.radians(0), math.radians(90)), (math.radians(45), math.radians(0), math.radians(180)), (math.radians(45), math.radians(0), math.radians(0))]

if count <= number_cam:
    for cam in scene.objects:
        cam_name = 'Camera' + str(count)
        cam      = bpy.data.cameras.new(name = cam_name)
        cam.lens = focal
        cam.sensor_width  = sw
        cam.sensor_height = sh

        cam_obj                = bpy.data.objects.new(cam_name, [cam + str(count)])
        cam_obj.rotation_mode  = eul_mode
        cam_obj.location       = location[count]
        cam_obj.rotation_euler = math.radians(rotation[count])
        scn.collection.objects.link(cam_obj)

count = count + 1

I am a beginner in python with Blender.
I would like to create 4 cameras automatically with Python but I have an error in this code.
Can you tell me what this error is and if what I want to do is possible?
Thanks a lot

Some fixes.

Lose the "bling" ... many moons ago a language named COBOL was
nicely aligned on equals signs, would stick with pep8 for python. The
result below is result of autopep8 via nvim text editor.
Never a fan of scripts that delete everything first, took that out,
it was an issue with your original logic, since the scene now had no
objects.
Made one loop to add each camera. Named via fstring formatting rather than string addition (which can be slow).

Resultant script.
import bpy
from math import radians
from bpy import context, data

scene = context.scene

#***********************Camera parameters************************
focal = 3.04  #focal lenght (mm)
sw = 3.68  #sensor width (mm)
sh = 2.76  #sensor height (mm)
eul_mode = 'XYZ'

number_cam = 4

location = [(0, 0, 3), (3, 0, 3), (0, 3, 3), (0, -3, 3)]
rotation = [(radians(0), radians(0), radians(0)),
            (radians(45), radians(0), radians(90)),
            (radians(45), radians(0), radians(180)),
            (radians(45), radians(0), radians(0))]

for count in range(number_cam):
   cam_name = f'Camera{count}'
   cam = bpy.data.cameras.new(name=cam_name)
   cam.lens = focal
   cam.sensor_width = sw
   cam.sensor_height = sh

   cam_obj = bpy.data.objects.new(cam_name, cam)
   cam_obj.rotation_mode = eul_mode
   cam_obj.location = location[count]
   cam_obj.rotation_euler = rotation[count]
   scene.collection.objects.link(cam_obj)


Is there a list for all available python functions? I know that a list of math functions can be found on this site

But how about functions such as

obj.data.materials.clear()
obj.data.materials.append()
len(obj.data.polygons)
.normal or
.length ?

I have always wondered whether there was an overview or list or whatnot for these functions.

These functions (or rather methods, properties and attributes) you are asking for are blender-specific, thus part of the Blender Python API (a.k.a. bpy) - just to clear it up. For standard python module features, please refer to the official python docs.

.polygons, .length etc. are properties of certain Blender type instances (objects). To find out what they do and which features are available, you need to check out the bpy API docs for a particular type (class).

There is a page in the docs about how to use the docs:
Blender/Python API Reference Usage: examples of how to use the API reference docs

  Example

  .polygons is a property of the type bpy.types.Mesh.

  It is a type on its own, MeshPolygons, > which has an .active property and an add() method.

  If you use the slice notation on .polygons, you will get elements returned of a bpy_prop_collection. The element type is MeshPolygon. A MeshPolygon has i.e. a .normal property in turn.

As you can see, the methods and properties are not found in a single place. The most valuable information is hidden in the bpy.types section of the docs. You can use the online search, or use Blender's built-in Python Console with auto-complete to figure out what is where. You can also find out the type and search for it in the API docs by adding bl_rna.identifier to an object:

>>> bpy.context.object.data.bl_rna.identifier
'Mesh'

>>> bpy.context.object.data.polygons.bl_rna.identifier
'MeshPolygons'

>>> bpy.context.object.data.polygons[0].bl_rna.identifier
'MeshPolygon'

Prepend bpy.types. and you have your type to lookup in the docs!


Setting GPU rendering: CVMCompiler has now run for 5 hours I've got an AMD 6750M graphics card with 1 GB of VRAM and Blender 2.79. I successfully selected the card as a GPU target in the user preferences.

When starting my render, Blender says: Loading render kernels

According to Activity Monitor a process named CVMCompiler has now been running for over five hours. That surely is more than a few minutes?

The rest of macOS is practically unusable, as it seems most things are reliant on the GPU. When I force quit the process, other apps, including Safari, become responsive immediately.

What could be the issue? I can't see any signs of any errors, but where should I look to find any?

5 Hours loading kernel doesn't sound right, that should be the first indication that something is wrong.

Anyway your graphics card is too old and unsupported.

As stated in the Official Blender Manual only cards with GCN (Graphics Core Next) 2.0 or above are supported.
That means Radeon HD 7790 and above, as stated in the linked Wikpedia article

The AMD 6750 is no longer supported. Also 1Gb of memory is very low for today's standards and you probably wouldn't get any benefit from GPU rendering anyway


Cut off subsurf supporting geometry only using quads I want to put an edge loop on this subsurfed base mesh so it acts as supporting geometry for the teeth so they aren't so round:

However, as you can imagine, this would create some problems in the other parts of the mesh because they would look too "sharp":

I've tried moving the unnecessary part of the edge loop to the center of the face, but this makes the subsurf in that area flatter, which I do not want. How do I get rid of the unnecessary parts of the edge loop? I want this mesh to be only quads, so a quad-only solution would be preferred.

Do all your quads have to be connected? It might be easier to split the mesh, so you have more control over specific parts.


How do I put an image onto the surface of a mesh? How do i get the .tga image on the right onto the mesh on the left?

thank you

If you just want to make an object use your image texture, try creating a new material under your "Material Properties" tab, then choosing your image.

As long as you have unwrapped your Object, your image should be applied to the object. If it looks stretched, choppy or just tiled in a way you don't like; this is a reference to a node structure I use for my meshes.

But if you are planning on using images as like a background or even a wall, there is one option for you that I use pretty consistently and is built right into blender!

First thing you will want to do is go to your User Preferences under File -> User Preferences. next, go to the Add-On Tab in the middle and search for an Add-On called Images as Planes. Once you find it, click the little check box and close the User Interface window. Now, you can press Shift - A to add a new mesh as you normally would and instead of choosing a mesh, go to the bottom and select "Images as Planes". This will bring up a new window where you can choose your image file, and once it has been imported it will show up in your world as a plane.


Separate multiple faces UV I can separate single faces in the UV editing mode. I disabled sync selection and sticky vertex selection. But when I select two faces in a group of joined faces, I can't separate them by pressing Y. I have blender 2.74.

How can I split a group of joined faces in the UV mode?

Hit the G key to move those faces.

After spliting the faces. You would be required to move it. The split operation does not automatically move the selected uv for you.


Is blender good for real physics simulations? I want to make some simulations which present some real physics problems like box sliding from slope with friction. Does blender use real physics rights to animate simulations or is it only approximation?

All physics simulations are approximations :-)
It just depends on how accurate you need it to be. As for your example, a box sliding on a slope is in reality quite complex. You do not only have imperfect, uneven surfaces, but they will also deform under load, maybe even be wet in places, they will possibly abrade and so on.
Depending on the level of accuracy you need, you can either use the fast but somewhat inaccurate blender physics, some third-party multibody simulation tool, or even a full FEM-analysis.
In any way, there are possibilities to use blender for visualization of the results afterwards.
Maybe just describe a little more in detail, what physical effects you want to show and then someone can point you in the right direction!


where to set Image Mapping to Extend mode in Cycles? In Blender Internal it is located here:

I can't find that anywhere in Cycles.

In my self compiled Blender from today I have Clip, Extend and Repeat in the image texture node. In 2.75 it's not present yet, though. You can try a development version from Blender buildbot, or for extend you can use the mapping node, as PGmath said, like this:


GPU rendering causes glass to become extreamly reflective Does anyone know how to get glass to be transparent. I'm using GPU render to render a bowl and cloth but the GPU and CPU final render have different results on the glass bowl

The top image is using the CPU to render

the bottom one is the GPU.

Does anyone know why this happens and how i can fix it or work around it?

thanks for any help :)

If you have this issue and you are using an AMD graphics card, you can either use CPU rendering or try and fake a glass texture.

I've found that using glossy shader and transparent shader lookes pretty good:
It takes a little longer to render but i think it looks better than the glass shader.


how to install cutout animation tools I've been trying to install the Cutout Animation Tools (COA Tools) addon I downloaded on GitHub. This is actually the first addon I'm trying to install on Blender and I just failed multiple times...

I followed the instructions which are : "Download or Clone the github repository to your local drive. If you download the ZIP File from Github, please make sure to unzip. Don't try to install the downloaded zip file directly in blender. This won't work. Once unzipped follow the installation instructions below".

In this unzipped folder there are actually different files :

In the Blender folder there is a folder named coa_tools, and inside of it we can find this :

So there are 4 .py files here and 18 more in the folder operators.

From there I go to File -> User Preferences -> Add-ons and click the “Install from file...” button (as instructed), and I select all the .py files and click on "Install from file...".

When it comes back to my User preferences window, nothing happened (I am in the category "User", which contain nothing since this the first addon I'm trying to install).

I also tried to place the folder coa_tools or the different .py files directly in : /Applications/Blender.app/Contents/Resources/2.78/scripts/addons

And still nothing. Did I do something wrong or am I missing something?

Hope you can help me!
Thanks!

With your download in the root there is a README.md this contains install instructions:

"### Blender Addon:
Zip the coa_folder.
Go to File -> User Preferences -> Add-ons and click the “Install from file...” button.
This will install and enable the Addon for Blender. Don’t forget to save the user preferences, otherwise the addon will not be activated after restart."

as it says go inside the blender folder and zip the coa_tools folder.

then install from file and select that zip folder.


Blender Arm Twists After Applying Automatic Weight Paint Upon finishing rigging my low poly model in Blender, I decided to parent the rig to the mesh and apply automatic weights. The head, spine, legs, and feet all work fine, however, the arm has an odd twist in it. I also noticed that the default pose position of the armature is different than that of the rest pose or edit mode positions of the armature. I've tried applying Alt G, Alt R, and Alt S but nothing changed, and both the odd position and twist remain. Is this an issue with my rig or topology, or will applying and adjusting weight paint manually solve the problem? This is my first time rigging a model in Blender so any help is highly appreciated.
Edit Mode/Rest Pose Position:

Default Pose Position with no transformations or rotations:

Arm twist in the mesh after applying automatic weights:

Edit: I made a comment of how I fixed this issue but TL;DR
Unparent the mesh and armature. Select all the bones in pose mode. f3 search Apply pose as rest pose. Parent them again and apply automatic weights and the issue was gone.

After searching around some more I found a related post here:
Parenting Armature to Mesh with Automatic Weights deforms Mesh
My issue was that my Pose Position and Rest Position were different, as I showed above, however, I wasn't sure if this was normal or how to go about fixing it. I found from the other post that it's actually the reason for the mesh deforming and the fix is pretty simple. Selecting all of the bones in Pose Mode and pulling up the search bar with f3 you can type "Apply pose as rest pose", hit enter, and then parent the armature to the mesh and apply automatic weights and the issue with arm twisting is gone. I'm pretty new here but I think this post may be classified as a duplicate now but I found a lot of similar posts unanswered so hopefully, this is helpful to other beginners running into similar troubles.


Ocean with mirror cube Im trying to recreate the attached effect. I have the ocean and a reflective cube down (as you can see on the attached image). But im struggling with the material of the cube and making the ocean a bit more wavy and dramatic looking.

I can fix most of the in photoshop, but I would love to learn how to fix some of these things in blender.

I tried it in Eevee and it was fun :).
I used this free HDRI to light the scene.

Cube

Metalness to 1 for highest reflectivity (just like real mirrors)
Musgrave and Noise texture for those tiny black dots
Layer Weight > Facing to control lighter/darker side.
Dark edges. Add a Bevel modifier and set Material: 1

Then add a second material slot to your object with some dark material

Ocean

Wave Modifier on a subdivided plane for large waves
Voronoi texture as a Bump map for those tiny ripples

The HDRI isn't packed, just download and put it next to the Blendfile :).


Bones Wont deform with Mesh I just started using Blender and I wanted to recreate a viral creepy pasta. I have seen many tutorials and they all say for the armature to parent the mesh with automatic weights but nothing happens.

I cant seem to solve the problem, the bones move but the mesh wont move along with it

Project File

Welcome to Blender Stack Exchange!

It looks the automatic weighting failed when you tried to parent the mesh to the rig. This is unfortunately a common occurrence in Blender. It seems to happen when you use somewhat dense meshes like you have.

There is a really easy fix though. Select both the mesh and the rig and scale them up a lot. I tested your file and it worked when I scaled them up 100 times. All this does is space things out a bit (a lot) more and the automatic weighting seems to like that better. Then apply the scale on both objects with Ctrl+A. Then parent, scale down (by .01 instead of 100 this time) and apply the scale again.


How can I actuate a different object than the one who's controller calls the script? I have a button that should make things appear and and disappear in the script. However, the actuators that make the other object disappear are on the other object.

Normally, to actuate things we cal the code something along the lines:

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

However, I clearly need the controller for the other object (or at least I think I do.)

I try the following code:

label = scene.objects['Text.001'] # our aptly named explanation text
labelcont = label.controllers

for obj in labelcont:
    print("object")
print(lablecont)

"Object" never prints, suggesting to me that there is nothing in the KX_PythonSeq object that is returned by .controllers.

I also tried to use labelcont[0], and well, that returned index out of bounds.

How can I get the controller for a different object?

Internals

A controller is not supposed to access the internals of another object. This leads to hard to investigate dependencies and should be avoided. The BGE supports you be not allowing this.

Communication

The requester object can communicate with the serving object that it active/deactivates the actuators by itself. The serving object decides how to do that.

Example: A selection object marks selected object by setting a property at the selected object.

The selected objects play an action when the property is set/not set.

The selection object does not know how the select an object but does not care how it reacts on it. The selected object does not care how it was selected, but knows what to do in this case.

Selection operation and Selection presentation are separated
One selection object is performing the selection operations
Each selectable object can perform individual selection presentation.
The game designer defines the interface between selection object and selectable objects.

Passive object

The slave object can be a passive object (no own behavior towards the current aspect). The master object performs all operations on the slaves. The build-in logic bricks do support this behavior.

Example: A selection object adds marker objects (halo) to selected objects.

Selectable objects do not need own selection presentation logic.
The selection presentation has to be exactly the same on all objects.
The game designer defines the interface between selection object and selectable objects.


Can't finish a front car bumper grille I have a problem: I model a front car bumper grille, but I can't finish it as I want. That's how this grille looks now:

That's how I want it to be:

Help me, please.

First make the rest of the bumper so that you know what shape you need to fit the grill into. Then you can use a Boolean modifier to trim away the parts of the grill that you don't want. Then move the slats of the grill forward and back to finish the shape.

It seems like you a very early in this build. Keep working at it and don't get frustrated.


How to activate the STL import/export addon from the commandline? From the commandline documentation, activating an addon should be:
$: blender --addons <list of addons to activate>

But I can't seem to find the right syntax.
Example with the STL import/export:

$: blender -b --addons io_mesh_stl
Exception in module register(): '/usr/share/blender/scripts/addons/io_mesh_stl/__init__.py'
Traceback (most recent call last):
  File "/usr/share/blender/scripts/modules/addon_utils.py", line 312, in enable
  mod.register()
  File "/usr/share/blender/scripts/addons/io_mesh_stl/__init__.py", line 260, in register
bpy.utils.register_module(__name__)
  File "/usr/share/blender/scripts/modules/bpy/utils.py", line 609, in register_module
    raise Exception("register_module(%r): defines no classes" % module)
Exception: register_module('io_mesh_stl'): defines no classes

bpy.ops.export_mesh.stl() will be present without explicitly enabling the add-on. io_mesh_stl is enabled already by default, re-enabling it seems to be the problem here.

Exactly why you get that error is not something I'd spend much time on as a user, considering the fact that it can be avoided by not re-enabling the add-on.


Tinycad addon in Blender 2.92 I use Tinycad addon operations a lot in Blender, to my surprise, in Blender 2.92, even though I have Tinycad addon activated, it's no where to be found in the context menu in 3D View, as documentation suggests.I select an object, switch to edit mode, then press F3 and search for VTX or Tinycad, but I get irrelevant results, I thought this is a bug and reported it to the developer, but my report was closed with a reply "It's W or something now, report closed because there's nothing to be done"!, Well I tried the W which "now" it just switches the active selection tool, so does anyone knows what is the "something" that the developer was talking about? In other words, How can I use Tinycad in Blender 2.92, I tried all menus in Edit Mode, but perhaps I skipped something?
Edit: If you know of a replacement to Tinycad "That actually works in Blender 2.92" please post it as a comment.

TinyCAD is available through the Right Click context menu in Edit Mode.


OpenGL error on startup - Blender 2.80 - bumblebee i can't open Blender 2.80 since it tells me that it requires OpenGL 3.3 to run.
Well, when i start it with my intel graphics adapter everything is fine, but it fails, if i want to start it via optirun / primusrun with my nvidia graphics card, although it supports OpenGL 3.3.

Output:

Read prefs: /home/daniel/.config/blender/2.80/config/userpref.blend
AL lib: (EE) GetLoadedHrtf: Invalid header in /usr/share/openal/hrtf/default-44100.mhr: "MinPHR02"
AL lib: (EE) GetLoadedHrtf: Failed to load /usr/share/openal/hrtf/default-44100.mhr
AL lib: (EE) GetLoadedHrtf: Invalid header in /usr/share/openal/hrtf/default-48000.mhr: "MinPHR02"
AL lib: (EE) GetLoadedHrtf: Failed to load /usr/share/openal/hrtf/default-48000.mhr
Error! Blender requires OpenGL 3.3 to run. Try updating your drivers.

Here are some (maybe usefull) outputs:

1.) glxinfo | grep OpenGL

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.2.2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

2.) optirun glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 840M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 410.57
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 410.57
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

3.) mhwd -l -d
    --------------------------------------------------------------------------------

  PCI Device: /devices/pci0000:00/0000:00:1c.4/0000:03:00.0 (0302:10de:1341)
      Display controller nVidia Corporation GM108M [GeForce 840M]
      --------------------------------------------------------------------------------
  INSTALLED:

NAME:   video-hybrid-intel-nvidia-bumblebee
ATTACHED:   PCI
VERSION:    2018.08.09
INFO:   Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
PRIORITY:   8
FREEDRIVER: false
DEPENDS:    -
CONFLICTS:  video-intel video-nvidia video-nvidia-304xx video-nvidia-340xx video-nvidia-390xx video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nouveau-bumblebee
CLASSIDS:   0300 0302 0300
VENDORIDS:  10de 8086

> AVAILABLE:
...

If i try to force the version to 3.3 (for whatever reason) with MESA_GL_VERSION_OVERRIDE=3.3 and MESA_GLSL_VERSION_OVERRIDE=330 it still outputs version 4.6.

A bit weird is that i was able to run blender some weeks ago, but changed some stuff in my linux configs which shouldn't have anything to do with my hardware / drivers / etc. The only difference is that i was using gnome on wayland and now i'm using i3 on Xorg.

Suggestion to fix it are welcome.
Daniel

The issue is not openGL, but OpenAL (deals with sound rendering). Looks like hrtf function is enabled and can't be loaded. Disabling it in openAL configuration file alsoft.ini might help (hrtf=false). It is probably at /usr/share/, but you can look at source https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample for details


Assigning material to every second face via python I want to do something like this with a python script and selecting the vertex in the middle:

I tried with many ideas as:

import bpy, bmesh

obj = bpy.context.object
me = obj.data
bm = bmesh.from_edit_mesh(me)

verts = [v for v in bm.verts if (v.select==True and not v.hide)]

for v in verts:
    for f in v.link_faces:

        if (f.index%2) != 0 :
            f.select = True
            obj.active_material_index = 3
            bpy.ops.object.material_slot_assign()
            f.select = False
        else:
            f.select = True
            obj.active_material_index = 4
            bpy.ops.object.material_slot_assign()
            f.select = False

bmesh.update_edit_mesh(me, True)

but this don't have good results.

I'm tried with face.index, bool and other without good result.

I almost always look for hacks when doing simple tests like these (half of the time the function you spend hours on, Blender has the functionality tucked away in some menu) so if your use case is similar meshes I would probably use bpy.ops.mesh.select_nth(offset=1) to get the selections in a checkered pattern.

import bpy

# get the object
ob = bpy.context.active_object

# get the mesh
mesh = ob.data

# create a list with all faces
face_list = [face for face in mesh.polygons]

# select all faces for offset operator
for face in face_list:
    face.select = True

# toggle to edit mode
bpy.ops.object.mode_set(mode='EDIT')

# make sure face select mode is enabled
bpy.context.tool_settings.mesh_select_mode = [False, False, True]

# select every second face
bpy.ops.mesh.select_nth(offset=1)

# use second material slot
ob.active_material_index = 1

# assign the material
bpy.ops.object.material_slot_assign()

# toggle to object mode
bpy.ops.object.mode_set(mode='OBJECT')

To get the inner vertex, select the outer edges in edge select and then switch to vertex select and invert the selection. It's far from elegant but should work for the example you are using


How to take pictures from the GE? I've seen similar questions on how to take pictures, but those questions are for the render engine, cycles, and others. I have a set of weapons, and want to take a picture from the side view. When you swap to your weapon, your newly selected weapon will show its picture on the right side of your screen, like other FPS games. In other words, I am looking for a way to take a screenshot in the GE; if you can, then can I also change the resolution? Any help is appreciated, thanks!

Pose your weapon according to the view , than run the script to take a picture using openGl render , got o the UV editor and the image will have the name of the active object :

import bpy

# path to the folder
file_path = bpy.data.filepath
file_name = bpy.path.display_name_from_filepath(file_path)
file_ext = '.blend'
file_dir = file_path.replace(file_name+file_ext, '')

mainScreen = bpy.context.screen

#current scene
scene = mainScreen.scene
#set render settings
scene.render.resolution_x = 128
scene.render.resolution_y = 128
scene.render.resolution_percentage = 100

#render from view (set view_context = False for the camera render)
bpy.ops.render.opengl(view_context = True)

#save and load the render (you can't keep the render result)
img_name = bpy.context.object.name+".png"
bpy.data.images['Render Result'].save_render(file_dir+img_name)
bpy.ops.image.open(filepath = file_dir+img_name)
bpy.data.images[img_name].pack()

you can change the render size in the script

For screenshots while playing the BGE has a function for that :
bge.render.makeScreenshot(filename)    see the DOC


Composition is not working (no render, no file) I need a setup, where I render an object with transparent background but with reflection.

This is my setup (composition). The picture in the viewer is like expected. If I press F12 I get no file in the tmp folder and a "wrong" picture will be renderd (with plane). Compostion is activated, but its somehow ignored. Does someone has a tip?

To see result of compositing switch Layer viewer to Composite in Image Editor


Why it takes too long to make simple cuts in blender VSE? Basically I have a gameplay video that I made it is 37 minutes.
I want to store minutes 0-26 and throw out the rest.
I did that using blender.
Then I saved the edit by pressing animate. It took 2 hours.

Of course I have tried to activate GPU rendering. It still takes a long time.

To add insult, this is not really "rendering". I only make simple cuts for the video. So basically render will simply copy and paste the first 20 minutes of the video and remove 17 minutes of the rest.

For comparison, AZScreen, an app in android, can do the same thing within seconds.

I made a video to show you what the problem is.
https://youtu.be/bcX4MPp0txI

What am I doing wrong?

Update:

The result is of poor quality. Far worse than the original that is produced while playing video games within 37 minutes.

I tried cycle render to see if it's faster because of using GPU.

The old video is overwritten. I am mad. I do not tell blender to overwrite existing video. I thought it'll make another video.

When "rendering" a video from the VSE, blender essentially plays all of the source videos frame by frame that will be used to make up the current frame, it then merges each video frame with any effect strips to get the final image for the frame and sends that final frame to ffmpeg to be compressed using the encoding options. These steps will always be performed even if only one unaltered video stream is in the VSE and you want it saved using the same compression settings as the original video.

If you only want to cut a part of a video and keep the same video compression settings, you will find other software better suited. The ffmpeg cli command is one fast option, when you specify that the video and audio is to be copied, it will not decode/encode the video which makes it almost as fast as just copying the file. -c:v copy will copy the video track and -c:a copy does the same for audio with -ss 00:10:00 specifying the start time and -t 00:36:25 being the duration.

ffmpeg -i source.mp4 -c:v copy -c:a copy -ss 00:10:00 -t 00:36:25 cut.mp4


Sun illuminates tall objects I'm making a site model as part of an architecture project, and currently the tip of the cathedral is illuminated when the time for the sun is set to midnight. I'm not sure why this is happening or how to fix it.
Here is the model rendered at 12pm:

Here is the model rendered at 12am:

A quick solution I found was to keyframe the sun strength to 0 at sunrise and sunset, and to 1000 at mid day. This works however I'm not sure if it is 100% realistic to how the sun would really work.

This could be happening because there is no geometry to block the light.
At 12AM, the sun is below the horizon, so the Earth should cast a large shadow on the city. In your case, however, there is no geometry to block this light, and so the sun is able to shine on your tower from below.
You could create a huge plane at z=0 to emulate the Earth's shadow. Alternatively, as you suggested, you can animate the sun's strength to make it dark at night.


What is wrong with my rigging here? For those who monitored questions in this site, I read this one: Rigging character, mesh not following bones
I doesnt solve my problem. Many similar question posted on the internet doesnt solve the problem.
I cant rig my character here, I followed the tutorial from the official blender channel in here https://www.youtube.com/watch?v=cZ3o5tjO51s&list=PLa1F2ddGya_-UvuAqHAksYnB0qL9yWDO6&index=30
I did exactly what he did, go to object, select mesh, select armature, ctrl p, with automatic weight
in pose mode, the mesh wont follow the bones
Also edit mode is sometimes inaccessible, for some reason
here is my file: https://www.mediafire.com/file/fw7ppz5aewtcj4b/failed_rigging.blend/file

The blend file already contains the enough instances of mesh object and the armature (RIG-Sky), but the instances are not registered to any scene collection. Therefore delete armature and empty(GRP-Sky) objects and then run the following script to link the instances to a collection.
import bpy

for obj in bpy.data.objects:
    if obj.name not in bpy.context.scene.objects.keys():
        bpy.context.scene.collection.objects.link(obj)

Another way: Use Shift M key in the outliner


Environment choice for a color-only objects My question will definitely sound incredibly noobish, but I started to play with 3D graphics and Blender just a few days ago (after a month-lasting struggle with OpenGL basics) and I've run into trouble.

I have "created" a nice small bunch of models for a 3D game, determined that I wouldn't use a single texture for the appearence of the objects. This is what they look like:

Right now I'm trying to create some environment (terrain, lights...), but all of my previous attempts have failed.

I tried to create a hill without modifying it´s color. Result: the hill is unrecognizable, it has just the same color as everything else.

I played with Z-transparency. Result: better, but nothing delighting.

Instead of trying and experiencing failure again, I want to ask: is there any way I could create (a visible) terrain consisting of hills and valleys without using textures? Are there any specific ways of doing things when doing "cartoon graphics"?

enable Ambient occlusion to get better lighting " you should lower the light source intensity "
move the light source to get the shadows where you want
use proportional editing to create hills
add decimate modifier to get the LOW POLY look


get normal vector at a specific point in a curve in animation nodes Is it posible to get the exact normal vector from a control point inside a curve? I know the evaluate node gives you the normal vector at a certain range of the curve length, but what if I want the normal vector at the precise location of the  control point?

You can evaluate n points using the Resolution Parameter Type where n is the number of points your spline have. Now, get the normal at the index of the point you want as follows:


howto create glass test tubes with semi-transparent fluid content I want to create some glass test tubes with semi transparent fluid content of some different colors. I'd like to see through test tubes on ones behind. There should be no scene background (transparent) and glass should be semi-transparent. Output is RGBA PNG

I know I have to set Transparent checkbox in Render -> Film.
I found this for glass:
how to render semi-transparent objects with transparent background as a png with cycles

I don't know how to make fluid content to be as realistic as possible.

It should be in cycles.

Is there any solution for light not only as world surface to have effect on objects?

I've tried to composite three layers:

Glass material:

Fluid material:

Not ideal, but the best output I achieved for now:

I don't know how to make glass material brighter.


How to get rid of subsurf overhangs? Here is the shape I want to achieve, sharp square hole in the cylinder:

I did inset, extrude and beveled edges to keep square form.

The problem is when I am applying subsurf modifier, it distorts hole edges with weird overhangs:

Here is my blender file:

And here is modifier settings:

The issue is cause by the beveling of the edges that you did. When you applied the bevel operation, a small triangle was created in each corner.

Triangles are notorious for having issues like this when being subdivided. In this case, it may be difficult (although not impossible) to remove the triangle completely though. If you restructure the mesh so that the triangle is located on a section that isn't a corner the smoothing will look much nicer. Here is a way you could do that.

Here is a comparison between the corners when subdivided:


My baked normals only appear in material view but not rendered view? My baked normals seem to only be appearing in material view and not rendered view. I have no idea why it would be set to this. Unless its something simpler than I'm making it. Please help!

<<< with render attempt
<<< in material view
not sure whats going on here. Would appreciate some sage wisdom

I fixed it, not sure what was going wrong but i loaded to an earlier saved file and it works just fine. Not super happy with how it turned out...but such is life!


How do I access a Rigify Control by name (Grouped and linked into scene) with python in 2.79 I used rigify to generate a control rig over a Basic human Armature.
I then grouped the Armature+Control rig so I could link it into a scene.
In the Scene where it is linked I made the rig a proxy so I could access the controls in pose mode.
Now I want to use a Python script to access specific controls by name and do things to them...

I couldn't figure out how to get to the controls. When I have a control selected say the 'torso', and use the bpy.context.object.name script to print out the name, I just get the name of the rig, not the name of the torso control.
What gives access to the controls inside the group inside the rig ?

Thank you !

Got it. I used this formula:

bpy.data.objects['group_proxy'].pose.bones['torso'].bone.select = True


Creating a specular map using point lights? Im following a tutorial online (can't post it here its paid) and ive got myself stuck.

In the tutorial she says you need to create a secular map by making a black materiel then shining a point light and then baking the light information.

Hers looks something like this

I tried replicating the same effect, I have a Principled BSDF with black but I don't know how to bake it out so its just black and white. The only thing I can get working that exports the light information is Glossy but it leaves these purple and brown artifacts and I have no idea where its getting that.

Any help on how to fix this or get the same type of render results using a similar method?

I checked on youtube, and so far, I found this one :

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


How to track an unknown number of objects in a multi-module add-on Trying to initialize an empty list that will later be manipulated by  operators on button click (add, remove, get). The list can either be populated with objects or object location tuples.

Pseudocode

Ideally the code would look something like this:

# __init__.py
bpy.types.Scene.prop_name = bpy.props.list(
    items = []
)

# some_operator.py
bpy.types.Scene.prop_name.append(obj.location)

Likely Solutions

Unless there's some methodology outside of bpy.props, EnumProperty or CollectionProperty are likely places to start, but no luck so far. Worst case scenario, I could use a string, then convert it later into tuples - but that seems excessively abstracted from the original goal.

@batFINGER suggested using a custom object property instead of maintaining a list - which is a good alternative for my use case and avoids bpy.props entirely. Below are implementations written with the help of devtalk.

Adding is fairly straightforward.

# add an object to list
obj["prop_name"] = 1

Getting a list can be done in a couple different ways depending on how unassignment is handled - adjusting the prop's value...

# remove an object from list
obj["prop_name"] = 0
# get list of objects
objs_list = [
    obj for obj in bpy.data.objects
    if "prop_name" in obj and obj["prop_name"] == 1
]

... or deleting it entirely.

# remove an object from list
del obj["prop_name"]

# get list of objects
objs_list = [
    obj for obj in bpy.data.objects
    if "prop_name" in obj
]

Either way, these 'get list' implementations avoid iterating through the full list of objects.


Is it possible to have a particle randomly rotate around a single axis? I'm creating a particle system with particles set to display as a plane with an image on it. I'm trying to get the particles to rotate randomly, as in some rotate clockwise and some rotate counterclockwise, while still being able to face the camera, as they are duplicating a plane. All my attempts to understand the rotation system are in vain, I can get them to rotate to a single direction, but both "Random" sliders aren't constrained to the axis I want. They don't seem to obey the initial orientation I set. Any ideas?

It it possible to modify certain properties of particles with Python.

I only managed to modify particles that are alive as their properties seem to be overwritten as they are born. But if the properties are set after a frame change, i.e. as soon as new particles are born, this method works.

The following script registers a handler that inverts the angular velocity of half of the new particles after every frame change. I'm not familiar with a way to trigger the handler during baking, but caching the animation and using “Current Cache to Bake” works.

import bpy
from math import floor
from random import random

ps = bpy.data.objects['Cube'].particle_systems['ParticleSystem']

def refreshNow(val):
    current_frame = bpy.context.scene.frame_current
    for p in ps.particles:
        if current_frame == floor(p.birth_time) and random() < .5:
            p.angular_velocity *= -1
            p.prev_angular_velocity *= -1
    bpy.context.scene.update()
    return val

def my_handler(scene):
    refreshNow(0)

def register():
    bpy.app.handlers.frame_change_post.append(my_handler)

if __name__ == "__main__":
    register()


Expand the selection on mac keyboard How can i expand the selection on mac keyboard ? there is no plus sign on my mac keyboard.

User Preferences > Input > Keyboard and enable Emulate Numpad.
Use cmd + = to Select more.


I hid that camera icon and the Y,Z,X axis accidentally. How do I get it back? The icons should be in the red rectangle were supposed to be.

The name of you have hid is Sidebar.

There is three ways to unhide Sidebar:

3d Viewport > Menu > View > Check Sidebar

Click Arrow at the right corner of viewport

Shortcut N


Background images not showing up at all in persp or ortho view I cannot get background images to show up. From what I understand you add the background image, then set the view it shows up in and then use numpad to set your camera view, yet this does not work for me. I've tried the 'ortho' and 'persp' views, along with the 'front', 'back' and 'sides' angles using the numpad, but cannot see any image. Also, setting which view the image shows in has no effect.

I have also tried dragging and dropping a image in, with no luck. I understand I can also add a image to a empty plane, but even this way does not work.

On the other hand, when it comes to adding materials and textures to objects, everything looks fine in edit mode and the final render, so this is not a problem.

Background images will only be displayed in:

Camera Prespective view (Numpad 0)
Any of the preset Orthographic views:

Front/Back (Numpad 1 or Ctrl Numpad 1)

Right /Left (Numpad 3 or Ctrl Numpad 3)

Top/Bottom (Numpad 7 or Ctrl Numpad 7)

To toggle between Prespective and orthogonal view use Numpad 5


How to fix a 3D scanned object with texture in Blender? I have 3d scanned an object and imported it into Blender. The model has a texture as well as the mesh. The 3D scanner is not perfect, some holes and imperfections in the mesh have occurred.

How do I edit the mesh of the obj file and preserve the texture? I haven't found any videos or instructions on how to fix a mesh that already has texture.

Please let me know if anyone has done this before and has some advice.
Thank you!

If you want a clean mesh out of your 3D scan you should first

Do a retopology of your 3D scan. Basicly treat it as if it were sculpted.
https://www.youtube.com/watch?v=k9NAv_q_wfU

If you plan of doing this more often think about buying Blender Retopo Tools: https://www.youtube.com/watch?v=0ZH8RJDr6pg

Here is a quick and dirty retopo guide for 3d scans:
https://www.youtube.com/watch?v=LbtWoJXbytM

Lastly transfer UV coordinates from your 3D scan to the new (retopo) mesh.
Can I transfer an already made UV to another object?


Shade smooth problems in Blender 2.8 I have some issues in my model:

I was asking about this issue on other forums, but no one helped me.

One person said that I have to learn what is topology first, before starting modeling. I did that, but I didn't find any new information. I have topology without N-gons and even with quads only:

Another person said: "Learn how to work with this instrument".
But I didn't find any options in "Shade smooth" option. I only found how to make no smoothing on edges that we need.

Another person said: "Add subdivision Surface".
But it will add some extra vertices that don't need for geometry shapes. They will just overload my model. I can use bevels instead if I need some smooth shapes on edges. Am I right?

Someone said that my vertices are too over stretched in this place. But I have the grip and the rear part of my gun and other parts that have stretching too, but there aren't any artefacts:

I was trying Shift+N, but nope. So I enabled the 'auto smooth' option with values under 50 degrees (because over this value there are some artefacts appearing again):

Is this the right way to solve this problem? Or where is my mistake? What did I do wrong?

Adding an edge split modifier might help. Set the split angle roundabout 15° or a similar value...
This modifier splits all edges, which form a sharp boundary (which shouldn't look smooth).
Often this also solves some surrounding smooth errors which are caused by smoothed edges which are quite sharp.


pipe which has non-uniform cross-section I want to create a shape like a pipe, like below image and blend file.

I created the mesh below in Houdini, but I could deal with it only in simple case, and I couldn't improve it any more in Houdini. So I am trying blender.

.blend file: http://pasteall.org/blend/index.php?id=51832

What "non-uniform cross-section" means both 1. and 2.

scaling independently on each axis of cross section
changing the cross section shape.

I tested the below but I have trouble in all of them.

I can't use "Curve Bevel Function"
(Make a 3D tube with a Bézier curve?, Curve Bevel function, scale?)
because this can use only one cross section. Even if I use Bevel Object, Alt+S, Proportional Editing and Taper Object, We can't use multiple different cross section shapes and We can't scale independently on each axis of cross section.
I also tried vertex group + proportional editing
(Is it possible to use proportional editing without affecting or hiding nearby vertices)
but failed.
I tried addons https://blendermarket.com/products/bezier-mesh-shaper and
https://github.com/mifth/mifthtools/wiki/Mira-Tools#curve-stretch-tool.
These may be solution, but I have trouble when pipe length is long like this case.

Could you tell me effective way to create a pipe which has non-uniform cross-section ?

I don't think my question is duplicate of Curve Bevel function, scale? because my question emphasises the non-uniform cross section and mentioned that Curve Bevel function doesn't allow us to use non-uniform cross section.

You can certainly extrude a cross section along a curve and rotate that cross section, change its size and change the end cap.

Try using a curve modifier with an array modifier and change the start/end caps:

You can also experiment with bevel curves and tapers:

In the old days we used to be able to transition between cross sections by using dupliframes to create multiple copies of a mesh along a curve at frame intervals (e.g. one every 10 frames) and then loft them together. Something like this: old Blenderartists thread but I'm not sure how you do that now. Maybe using the animation nodes add on. It's a starting point at least.

Hopefully somebody will have a better answer for you, but in the meantime this gives you something to work with.


How to get Blender's temp directory via the Python API? How do I get blenders temp folder via python (bpy).

I want to store temporary cache files while running Blender and when closing Blender I want them to be removed on exit.

Python's tempfile module.

First of all, Python has its own tempfile module, which is quite comprehensive and can likely do what you need(handles creating, temp files, directories and optionally - cleaning up when you're done).

Blender's User Preference

If you want to access the temp user preference, you can do so via.bpy.context.user_preferences.filepaths.temporary_directory
... which is initialized based on environment variables (See Environment Variables in the manual).

Blender's 'session' Temp Directory

However Blender crease a sub-directory within the temp directory, for each session, which is cleared on exit (even in the case of a crash).

And this is accessed via bpy.app.tempdir, in the case you describe, this sounds like it may be a good option.

Note that it may work well to use the tempfile module, even if you access Blender's temp directory using Blender's API.


How to separate environment in Compositor without black cutouts Nice people of Blender SE.

I'm using Compositor to blur my HDRi (as suggested by others on BSE).
Cycles render engine.

However, the environment behind objects isn't rendered, there's just a black cutout.
Therefore any applied blur results in an annoying black halo around objects.

Black halo occuring when combining blurred environment with objects.

Sure, I can render the environment separately, but it's not very practical when handling multiple scenes or animation.

Question
How can i separate the environment without these black cutouts?

I was just curious :)
Because render View Layers doubles rendering if I'm right.

You can use existing setup, just ...

add Set Alpha node and plug inverted Alpha to create transparency in BG
and use InPaint node to recreate missing environment

Note:
because of alpha antialiased edge, I added Delete/Erode node with value -1 to get rid of one pixel that did InPaint node job slightly darker


Camera facing backwards when exported as FBX and imported to Fusion 7 Similar to this question: I exported a motion tracked camera and some geometry from blender to be opened in Fusion 7. I used the FBX exporter using the default settings (-Z Forward, Y up).

Scene in Blender

When I opened in Fusion, the geometry came in fine but the camera was facing backwards.

Scene in Fusion

I tried playing with the settings for Forward and Up on the blender exporter, that changes the orientation of the geometry, but not that of the camera's orientation in regards to the scene.

How can I get my camera facing the right way?

To get the right settings for the camera into Fusion7 I found I had to use version 6.1 ASCII of the FBX exporter.

Now my tracked camera and geometry match the blender file :)


How to get the angular position of a the rotating object of a motor constraint in python scripting during animation play ? (Blender 2.78) I have a simple scene with a motor and its shaft on which a spool is attached.
The animation works, the shaft is rotating and I can control its value from python using :

bpy.data.objects['Constraint.motor'].rigid_body_constraint.motor_ang_target_velocity = 0.5

It must be possible to get the actual rotation (angular position) of the shaft, but when I do :

bpy.data.objects['Spool'].rotation_euler

it only gives me the Euler angles at keyframe 0, but not the actual value as the animation is being played.
Is their a way to access this value ?

The final goal is to simulate a motor encoder for a robotics simulation.
Thanks !

The Object's matrix_world is what you're after. Call to_euler(...) to get the Euler angles.

bpy.data.objects['Spool'].matrix_world.to_euler('XYZ')


Weird artifacts when baking normals I have been trying to bake a normal map from multires modifier. Here is my sculpt:

Here are the settings for the baking operator and the texture I used for baking:

Here is the normal map I got:

If you look closely at the last image where I applied the normal map, there are artifacts in form of small islands on the mesh. And they are all over the mesh.

What could this be caused by?

Edit:

Another artifact along the seams:

It's because of the bit depth you're using in your file.
For short, you're using a 8bit depth picture, which is limited to 256 levels of shade for each red, green and blue channel. It's enough data for display on internet, but it's quickly limited in CGI.

When you create a picture in blender to bake your normal map in, make sure to check the "32 bit Float".

Then when you save your picture, you need also to use a format that supports all this data. You can check this in detail in this Blender manual page, but just keep in mind that usually internet-friendly picture formats like jpeg or png don't support that and the best option in Blender will be Open EXR with full color depth.

Then, you can use this as-is. It's heavier though, so if storage usage is a concern, there's a little trick you can do: convert that 32bit into a 8bit dithered. Basically, you would still be in 8bit with not enough data to make correct normals, but the dithering of values will make it less perceptible. If used well, it might not even be noticed.

More detailed infos and how-to's in this CG Cookie video:
https://www.youtube.com/watch?v=6D5tBEjS-N0


My STL format export is only 1KB in size? Any idea what went wrong? I created a simple model and exported the file as an STL. However, when I go to the folder the file is a Certificate Trust List and is only 1KB in size. I don't know what I did wrong.

When exporting to stl format in blender make sure to select your objects, or it will export an empty object instead.

The .stl file on windows system will be recognized as a "Certificate Trust List" so instead of double click to open it , RMB and choose open with then your software