How do i animate a group rotating as one object? When i tryied to animate a group rotating (2 rotation keyframes), all of the objects rotated at thier pivot points insted of the "whole group" pivot point. How do i make the whole group rotate as one object?

Here i've recoreded a gif of my problem. GIF

When you rotate multiple selected objects and they all rotate about their own axis it is probable that your pivot point is set to 'Individual Origins'. This would mean exactly as you describe that each object selected will rotate about their own origin.

https://www.blender.org/manual/getting_started/basics/transformations/transform_control/pivot_point/index.html

If you don't really care about where they rotate about, you can just use the 'Median Point' as the pivot point, but if you want to make a precise rotation around a specific point, an easy way to do this would be creating an empty at the point of rotation and parenting all the objects you want to that empty. Then, you can simply rotate that empty and all of the parented objects will rotate around that empty. There are other ways to do this but from personal experience I think that if you are just doing a 2 key frame animation then using an empty as a center of rotation is one of easiest ways to rotate about a specific point.

Here is your .blend edited with the group parented to an empty cube and with the correct rotations.


Microdisplacement and Adaptive Subdivision is not working This is my Node Setup. I have a Subsurf Modifier that's set to adaptive with a dicing scale of 1 pixel and the displacement settings on "True". Despite all of that there's no displacement in both the rendered viewport and rendered image.

No need for a bump node there, I would rather substitute it with a "math -> multiply" node, with which you can change the displacement height.
In fact, what you are doing is taking a greyscale image, making a normal map out of it and plugging it into the displacement slot, which needs a greyscale image. But now you have wrong shades of grey because of that.

You also need correct render settings:
In the render tab, in the render pane, you need to change the feature set to "experimental" and in the material tab, in the settings pane, the displacement to "both". (And obviously you need your mesh to be unwrapped properly.)


Background image shows in front of 3D objects, not behind them. I've done a quick 3D track in blender and I'm trying to render my output, but the plate I used to track is showing up over my 3d objects.

I want to render the objects in the scene with an alpha channel and comp them over the plate I tracked. My renders however, are covered by the aforementioned plate.

Un-checking "Background Images" in the camera properties (only removes it from the viewport) isn't doing it for my render outputs.

Working on some production tests and am not really proficient with the software yet, my apologies in advance.

Using the compositor, the most basic setup to combine a 3D scene with an image (still or a video file) is mixing the movie clip and the render layers using an Alpha Over node.
The node sockets to which the images are connected determines the result:
The background image should be connected to the top socket
The foreground image or scene to the bottom socket.

The foreground's alpha channel is used to overlay the foreground on to the background.

If both images had an alpha channel, both alphas are combined for the final image.


How to flip the face of a closed 2D curve (similar to normal flip for mesh)? I use Blender 2.69. When I create a closed curve (for example, a circle) and make it 2D with the properties editor, it becomes filled.

Since I work with backface culling on (because of the application of the objects I make), only one of the sides is visible. In the case of a just created circle or a figure imported from SVG, it's the bottom side. In the latter case, it is especially annoying, because the figure appears mirrored.

Is there a simple way to flip the face (similar to flipping the normal for a mesh face) so that it shows on the opposite side of the curve?

You can swap the normal of the face by flipping the directions of the curve.

Select the curve
In edit mode go to Curve -> Segments -> Switch Direction. You can also do this via the space menu be searching for "switch direction"


How can I fix this Armature? i need help, how can i change them to bones?

Thanks for your reply,
but it looks like the FBX exporter has exported the asset wrong.
I have an project in Unity where my fbx of original asset is broken, i was trying to export the asset object as fbx but if i import it in blender it shows like upper. BTW the Armature list shown as here, any idea how i can change this?:

Oh after fbx export i used fbx converter from autodesk to convert them to binary fbx file.


ReBake a fluid Simulation? Following problem: I have a fluid animation which works after being baked. Now I  change some detail, the inflow velocity or the inflow type for example, but when I hit the bake button again the status bar runs from 0-100% really fast, but my fluid-animation does nothing at all afterwards. The "old animation" has gone, but no new one appeared.
The only solution I found so far is to completely delete the domain, add a new one, make all settings again and bake then...

Is anyone able to help me finding an easier solution?

Thanks a lot in advance!

This is most likely because you did not change the location of the fluid bake. Set the fluid bake location to an empty file on your computer separate from the other bake, and try again.


Can't find MPEG in the output settings I am using the latest version 2.79 for windows, and I made a short video. Now I tried to render it as MPEG and it doesn't show up in the options and after a lot of research I can't find a solution to this problem.

In version 2.79 Video encoding settings have been simplified.
Read:https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.79/More_Features

Choose FFmpeg video in the output panel.

A new set of options appear in the Encoding panel

There you can choose the flavor of Mpeg that you want to use:


Cycles smoke not responding to wind I made some dense smoke in cycles with the Quick Smoke simulation. I want the smoke to be blown to the left of the scene as if it's coming out of a smokestack, so I added a wind force field. No effect. I turned up the strength, still no effect. I even added another wind force field, yet the smoke still stubbornly rises straight up.

How can I get the smoke to respond to wind?

Wind Falloff

The force field in the scene is being affected by a high dampening due to the simulation of gravity introduced by the Falloff settings you are using. The wind is now acting as if it was dragged down by a strong force that is currently erasing its influence on the smoke.

If it is suitable for your project, my suggestion would be to simply come back to the default value of Falloff Power = 0.


Are the color swatches in Blender linearized? I would like to know if the color swatches are linearized automatically in Blender (in the 3D viewport as well as in the render viewport) or if I need to apply some correction? Thank you.

You shouldn't need to, no. The RGB values (that is, the actual numbers) in the RGB tab of the picker are linear, but the displayed swatch is a display-space version of that input. The HSV and hex-code tabs of the color picker are also converted to display space, so you can use those if you need to input a specific display-space color.

So if you're expecting stuff like in older versions of Maya where you have to fix the swatch, that's not necessary. What you see in the swatch is what you get in the end. Do keep in mind the RGB value tab is already linear though, that can throw off some people used to other software where you type in display-space values and they are converted at render time.


what is the default code for the operator.modal method? So I'm working on an export script and need to implement some extra data...
I want to add the extra data when the file browser is open and remove the data when the browser is closed on cancel or export.

The problem is I don't know how the default modal method works, I want to keep the default code, but extend it with the .append and .clear methods for my added data.

So what is the default code for the modal method?

Well I managed to make something work with the ExportHelper.invoke source...
This is coming from not knowing about the invoke method because the example doesn't provide it let alone explain where to look for more info.

what I did to access the data was simply to use the invoke method and integrate and modify the code from ExportHelper into my class rather than inherit from it.

to supply the needed data, all I did was create a dedicated PropertyGroup initialized in the scene context, and when invoke was called, clear and update the CollectionProperty items with their associated index IntProperty items in the group.

there may be a better method than this, but it works for me:

I did the dialog with this at the end of invoke before returning {'RUNNING_MODAL'}:

context.window_manager.invoke_props_dialog( this, width=900 )

Would be nice if blender's api was documented as well as they claim it to be...


Can delay sensor be use for a distance? Can the "delay sensor" be use for a distance and not for a number of frames?

No. Unless you want to multiply the number of frames with the speed per frame of the object.

You can, however, use the Near sensor for this effect. For more details on how to do this, please add some more info on what you want to do.


Does any one know how to fix Hidden Vertices With Subsurf modifier? I added a picture to be more specific when I use the (on cage Function on the modifier) it fixes the problem but when I turn it off it makes the mesh extremely messy

This is a setting within the subdivision surface modifier. It currently displays the vertices as they are. If you want them to be displayed as if they are changed by the modifier you just have to turn on 'On cage' in the subsurf modifier:
Off:

On:

Hope this helps!


Is the Mesh deform modifier supported in BGE? I'm trying to make a cube squish (like a slime) when pressing a key but Lattice is not supported in BGE, so I've used the Mesh Deform modifier using another cube as the deforming object, then I've created a shape key for the squishing animation.
But when I start the game and press the key that should start the animation, only the deforming object squishes. If the Mesh deform  is not supported as well, how can I make the cube squish?

The Mesh Deform modifier is not supported by the BGE.

You can play deforming via armature actions or shapekey actions.


how can I apply 3 shader by coordinates instead of unwrap UV? how can I apply 3 shaders by coordinates instead of unwrap UV?

for example, 3 shaders for top, bevel and side faces.

You could test the normal of the surface against (0,0,1) in Object Space.

Assuming 'Top' and 'Bottom' faces are normal to Z in object space..

.. take the absolute dot product of the shading point normal (given
in World Space, so converted to Object Space,) with (0,0,1).
Use ranges of that value as factors in the mixes between your shaders.

EDIT: This tree discriminates by the normal of the underlying geometry. If you want the interpolated (smooth) normal, use 'Normal' instead of 'True Normal' in the Geometry Node.


How can I compare normals in AN with python I am trying to create a script that assigns a differente rotation to polys according to their normals but I can´t figure out how to do it. This is my script so far.

import math
import mathutils

mirando_arriba = mathutils.Vector((0.0000,0.0000,1.0000))
mirando_derecha = mathutils.Vector((0.0000,1.0000,0.0000))
mirando_izquierda = mathutils.Vector((-0.0000,-1.0000,-0.0000))
mirando_abajo = mathutils.Vector((0.0000,0.0000,-1.0000))
mirando_fondo = mathutils.Vector((1.0000,0.0000,0.0000))
mirando_trasera = mathutils.Vector((-1.0000,0.0000,-0.0000))
if (Normal == mirando_arriba):
    result = rotateY
    TextBlock = "Mira hacia arriba"
elif (Normal ==  mirando_derecha):
    result = rotateX
    TextBlock = "Mira hacia derecha"
elif (Normal ==  mirando_abajo):
    result = rotateX
    TextBlock = "Mira hacia abajo"
elif (Normal ==  mirando_fondo):
    result = rotateX
    TextBlock = "Mira hacia fondo"
elif (Normal ==  mirando_izquierda):
    result = rotateX
    TextBlock = "Mira hacia izquierda"
elif (Normal ==  mirando_trasera):
    result = rotateY
    TextBlock = "Mira hacia trasera"
else:
    result = rotateY
    TextBlock = "No mira"

The only issue I see here is comparing vectors that are float vectors and that can give false negatives.

For vector comparison it's better to use "distance", rather than "==".
(Also, in blender precision appears to go up to 6, so use at most < 0.00001)

For more see: https://github.com/JacquesLucke/animation_nodes/issues/327

However, that means in your code:

if (Normal - mirando_arriba).length_squared < 0.0001:
    result = rotateY
    TextBlock = "Mira hacia arriba"

and same for the rest.


Change color of an object depending on camera view (cycles render) For example I have an object in my sphere. I want the part of the sphere which is behind the object (in the sphere) to be blue and the part which is in front of it to be red.

Is this possible?
Is it also possible to keep it updated if I change my camera view?

Thanks for your help!

It is possible to do that in Cycles using a Camera Data Node

You must use the output of the View Vector socket, separate it into its components with a Separate XYZ node, then pass its Z component through a Color Ramp node to control what colors you get.

The effect might be hard to see at start because the red color would always be off-camera, but tweaking the color ramp node may emphasize the effect.

Should be automatically kept in sync with the camera position


Textures disappear when the rendering engine is switched to cycles So in my graduation from blender internal to cycles, I've been experiencing numerous problems.
Now please bear with me, the answer is probably obvious but I'm new so cut me some slack.

This is how the model looks like in blender internal:

Now I transfer to cycles:

And I get this result:

The textures are there in the menu bar, but they will not show up no matter what I try.

Materials and textures work differently in cycles.

In BI, textures for the selected material are defined separately and most often in the properties editor.
In Cycles, textures are defined as part of the material itself and usually in the node editor (see Learning cycles material nodes).

Assuming a typical basic setup (one UV map, one texture, one material), then in cycles it should look something like this:

Make sure you are in the node editor
Make sure you are editing Material nodes
Add an image texture node (⇧ ShiftA> Textures > Image) and select your image.
The materials section of the properties editor will reflect what you do in the node editor. Editing the material in either the node editor or the properties editor will update the other.

If you have lots of materials you might try an automated conversion script, see How do I convert materials from Blender Internal to Cycles?


I dont fully understand about Recalculate normals I dont really get this functions without explanations or images,
"These tools will recalculate the normals of selected faces so that they point outside (respectively inside) the volume that the face belongs to. The volume does not need to be closed; inside and outside are determined by the angles with adjacent faces."
what does the volume means? and I dont get respectively inside which mentioned above.
somebody please explain the upper italic section please.

The normal of a face is the blue line, starting from the center of the face and pointing as much orthogonal as possible away from a face: it can point in two directions: one side of the face or the other.
Two connected faces, if they stay onto two different planes, can be considered as part of a "sphere". Normals are calculated  outside or inside the volume of that ipothetical sphere.
In the case of more than two faces the calculation is repeated, guessing wich is the part to be considered "inside" and which one "outside", even when the "Volume" is not closed (as with the two faces example).


Fluid in simulation disappears when from moving container I have an animation of a mug filled with a liquid moving up then turning to spill out the liquid. The problem is, when the mug lifts, the amount of fluid within the mug decreases. The loss continues when the mug rotates. When the mug stops raising, the remaining half of the liquid flies out of the mug at high speed and appears to collide with an invisible plane even though the actual ground is much further below it. The other half stays suspended in the air within the mug.

The main problem is that scale has not been applied. The domain and the obstacles should have an euler scale of 1,1,1. Just select everything and press Ctrl+A and choose scale. Otherwise the fluid will misinterpret where the obstacles are and just act weird.

Another thing is that the domain is ridiculously large, so even with a high resolution you're basically getting crap, which means that the fluid will act strangely.


saving the animation I have rendered and saved as pngs. I then try to save in the output area as any of the options, but they are always blender file that only open in blender, not avi,mpeg or any other. Using 2.8. Any ideas? Is there a save key or option other than this?

It's not clear what you did and what you are trying to achieve, so here is my best try:

If you want to render single image, you can press F12 (Top menu:Render>Render image). Then your image is displayed in Blender Render window. You can save this image by pressing Shift+S (Top menu: Image>Save as). Then you can choose filename and file type.

If you want to render image sequence, you have to go to output panel (usually located at bottom right of the screen (or right panel if you are using Rendering layout), its card has printer icon). Choose resolution, directory which should contain resulting files and file type (for example PNG). Then hit Ctrl+F12 (Top menu:Render>Render Animation). Images should appear in directory you choose, no other action is required.

If you want to render video file, you can do it similarly to prevous steps, but instead of choosing image type such as PNG, choose FFmpeg video and specify details in Encoding section. Again, after pressing Ctrl+F12, resulting file will show up in directory you have choosen in Output card.

If you render bigger project, it's good idea to render to images in case something breaks during render, or you realize you want to change something and re-render some images. If you want to make single video from image sequence, open new Blender file using File>New>Video Editing. Hover mouse over Video Sequencer and press Shift+A. Click Image/Sequence. Go to directory where you stored your image sequence, select all images (A) and press Add Image Strip. Choose render-resolution and frame-rate and render in a same way as I described above.

Pressing Ctrl+S (File>Save) or Shift+Ctrl+S (File>Save as) is reserved only for saving .blend file.


Is Blender Cycles rendering, killing my CPU? I am using blender on and off, and I just checked the cpu temperature history and its high was 108 degrees for an laptop.  I also just used a desktop that used 98.9% of the cpu when in cycles render view, and not even rendering images.

Eevee seems to keep the cpu at low levels currently. If I continue to use cycles will it kill the CPU? How can I reduce the load/damage etc, as a cooler for a laptop is not practical.  Or do I just have to stay with eevee from now on, as I would not like to replace the cpu every couple of years or so?

Cycles, by nature, is very realistic at the cost of computer power. I frequently have to click my fans into full gear when rendering Cycles, just to not go over 80˚C.
If using a cooler is simply out of the question than I suggest you reduce the number of threads Cycles uses. This may reduce the strain enough that your temperature stays within a reasonable range.
The thread count can be found under properties>render>performance>threads:

Other than that you could try baking, rendering at a lower resolution, and simplifying your geometry. As for the temperature itself, 100˚ Fahrenheit isn't hot, but I made the assumption that you are talking Celsius.
As a last note, I believe it's worth mentioning that entering render mode in the 3d viewport, is nearly as hard on your computer as just rendering images, with the main performance difference being modifiers hidden from view, and lower view samples.


How to delete greyed out Bookmarks and Recents? I had an external HD go out on me, so I switched to a new HD. However Blender is still looking for the old HD in bookmarks. I can't select it to delete it. Any ideas?

I realize the image below is recents and not bookmarks, just replicating the problem on another computer.

You can delete greyed out Bookmarks but not Recent. Recent will just go away after a while or you could delete all of them by clicking X button next to the list.

To clear bookmarks list click on arrow button next to the list and choose Cleanup.


Can blender be used for simple optical modeling? By optical modeling I mean simulating the results of an set of lens imaging a scene, so one can see how different lens (say a fisheye, or different glass) effect the imaging of a scene.

I don't expect to get some of the finer modeling details that involve wave calculations or things like chromatic aberration, I'd just like to get an overall idea of the imaging effects of certain lens combinations assuming the light is a perfect ray.

Is this possible with blender? Would one need to use cycles? Are there any guides or topics I could look up that could assist with such a task?

Cycles is relatively simple path tracer without MLT so I did not try to simulate lenses in Cycles, and do not recommend it for this purpose. LuxRender is much better choice for this, it is free and open source, and integrates with Blender very well. With LuxRender it's possible to simulate fish-eye or normal lenses focusing light (image) on film (with translucent matte material and camera behind it). You could simulate chromatic aberration too. You could model half of each aspherical (or spherical) surface profile precisely with XYZ Math Surface, then spin 360 degrees, then delete all doubles and set smooth shading. This way, it is possible to model even achromatic doublet (you will need three surfaces with properly defined interior/exterior volumes). But more lens elements you have between film and the scene, the more issues you will encounter. When done modeling lens elements, enclose them in completely black container.

Simulation of simple lenses (1-2 elements) is almost without issues, complex lenses with many elements (4-6) may have weird noisy artifacts (but result usually good enough "to get overall idea"). If number of elements is too many (for example, 18), simulation may fail (just render few fireflies on black screen). Another limitation is that LuxRender as far as I know cannot simulate AR coating yet.

You did not mention how good you are with lens modeling and underlying math describing their surface, and how many elements you plan to have in your lens simulation(s). I think there are no good tutorials about this yet. If you need one please comment, I could expand this answer with much more details (but please note that it may take few weeks because if I do this, I would like to do it with good examples, and only if somebody actually interested in more detailed answer, and if using LuxRender is acceptable option).


What has caused this f-curve to be inactive? The f-curve for the Y location is still there, but it isn't working. I must have clicked or pressed something without realizing, but I can't find what. It shows up in white with all its keyframes intact, and the object isn't moving when I scrub.

You must have accidentally pressed the 'speaker' icon next to the f-curve in the Graph Editor, which is used to temporarily disable (mute) f-curves:

Click it to enable the f-curve again:


Is it possible to use the 'Split' tool in Python? I was wondering if it is possible to activate the 'Split' tool in python. I'd like to make a script that loops through the selected objects polygons and splits them, creating an object with all its faces separated from each other. Is this possible? If not, is there a work-around? If none of this is possible, then could one make a script where it selects a face of an object, and selects the next face when the user presses the Y key (the hotkey for 'Split')? Thanks for any help in advance.

This can be done using the bmesh api.
The operator you are looking for is bmesh.ops.split.

However, the functionality you want to create is already in blender, with CtrlE> Edge split, or bpy.ops.mesh.edge_split

Note that you could also create and apply an Edge split modifier, however it's probably easier to use the edge_split operator.

As for selecting the "next face", you can select a face by setting its select value to True:

bpy.context.object > data > polygons > select

E.g. bpy.context.object.data.polygons[0].select = True will select the face with an index of 0 in the active object.

Note that you have to be in object mode for this to work:

  The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see bmesh.

You can set the mode with the mode_set operator, e.g. bpy.ops.object.mode_set(mode='OBJECT')

How you define the "next face" is up to you, as AFAIK there is no absolute definition of which face should be the "next" one.


How to simulate a gas? I am totally new to blender and 3d rendering.

What I want to create is something similar the water filling an object except in reverse.  Meaning, I want it to simulate natural gas fumes that rise and fill up pockets above and then spill out of that and continue to rise.   This would be a constant flow. I looked at the smoke effect, but I didn't see where you can adjust the opacity or color of the smoke to make it adjust to look more fume like.  I thought if you could reverse the gravity of liquid and make it flow upwards, I could possibly adjust the material to look more like fumes.

Here is the scenario - There are CNG (compressed natural gas) gas pumps.  If there are leaks, these fumes (unlike regular petroleum fumes which sink) rise and can collect in certain pockets within the dispenser and just like a glass filling up, if you continue to pour (or gas continues to leak) it spills over.  This is the effect I would like to try and create.

Is there some sort of tutorial that I can look at that will help guide me in the right direction?

I think you are best off smoke simulation. The fluid simulator is better for liquid simulations, as you get a mesh as a result. The smoke simulator is better for gas/smoke simulations, as you get voxel data with density information (you get heat and velocity information too, but most importantly you get density).

To make a smoke simulation:

Setup

Create an object to emit the smoke (e.g. a plane):
Select the emitter/plane and press Space, then type in quick smoke. This will setup a domain object and some materials automatically.

If you want to do this manually instead:

Add a domain object (usually a cube) and scale it so that it contains the area in which you want the smoke to go. Note that the bigger it is, the more resources are required to compute the simulation.
With the domain object selected, enable smoke physics in Properties > Physics, and set the type to Domain. You might also want to enable Adaptive domain, which skips calculating areas which don't have any smoke.

Add a new material, set the type to volume, and set the density to 0:

Add a new texture, set the type to Voxel data, and select your domain object:

At the bottom of the texture settings, in the Influence panel, enable Density:

With your emitter selected, enable smoke in Properties > Physics and set the type to Flow:

That's it as far as quick smoke can do things, so the rest is manual:
Select the object you want to collide with the smoke and enable smoke physics in Properties > Physics, and set the type to Collision.
Press AltA to play the animation (and simulate the smoke):

These are just the absolute basics, there are many more settings for the materials and simulation. I recommend you look around for some tutorials on smoke simulation. Here's a list of some good resources.


Blender and three.js Exporter? I am using Blender 2.69 in Ubuntu 14.04 32-bit
and Three.js Exporter.

While exporting shapekeys and keyframe animation using three.js exporter
,the exporting works fine.But unable to animate the model.
That is using
'mesh.morphTargetInfluences[1]=value'

not working.

am using dat.gui slider to change the value so as to control the morph  manually.

Suggest a working version of three exporter for blender
or compatible Blender or Three Exporter .

Thanks in Advance .

I would suggest exporting FBX or glTF (addon) from Blender, and loading them with THREE.FBXLoader or THREE.GLTFLoader. I've tested both shapekeys and keyframe animation with GLTFLoader, and both are supported.


Combine a Mat map and a Normal map in Blender? So I have this model, which came with two maps:  that I just now learned that the colored version its the albedo map and the blue one its the normal map, now, I want to combine this two into just 1 Map, Is it possible to do it? I've read things but none of them make what I want to do.
The reason why I want to do this its because the software I'll (Pepakura Designer) use doesn't apply Normal Maps as they should.
I'm hoping someone can help me.

The answer is yes you can do that. I am assuming you are working in the Blender Render Environment and not cycles as their material workflow is quite different.
Attached is the file for your reference. The material is an old 3dsmax metallic material and the normals map has been generated using shadermap3.

For Blender Render workflow.
1. Create a new material on the material Tab on the properties panel.
2. Next go to the texture Tab on the properties panel.

Settingup Albedo/Diffuse Map
3. Select an empty texture slot and click on "New"
4. Select open and point to your Albedo map on your harddrive.
5. Under Influence Header make sure "Color" is checked.

Setting up Normals Map
6. Select another empty texture slot and click on "New" again.
7. Select open and point to your Normals map on your harddrive.
8. Under Image Sampling Header make sure "Normal map" Option is checked.
9. Under Influence Header make sure only "Normal" is checked.

Here on out you should be able to see the normals texture in the viewport in "Textured Mode". Remember to add some light source or else your scene will just be blackish and dark.

Happy Blending!


How to map a grid to a sphere I am trying to achieve this effect.

https://images.app.goo.gl/mJzaTvwhLha3MiVt6

I am only interested in the outer shell.

I want to be able to create my own grid with different colors and angles. Maybe add randomness to how the points connect. How can I create a network style grid on a sphere?

Thank you.

This question has already been answered somewhere but I don't know where, so what you should do is:

Create an icosphere and a small sphere. Give your icosphere a Particle System > Hair. Enable the Advanced option. In Render, enable Object and choose the little sphere as Dupli Object. In Emission give it the number of vertices your icosphere has and choose Emit From > Verts, deactivate Random, set the Hair Length value.

Give your icosphere a Wireframe modifier. Choose the Thickness you want. You'll have to choose an Emission shader as material.


Masked glare behind glass Reference Photo

Consider the following photograph:

No Glare

The first render resembles:

Note how the LEDs have no glare.

Glare

The second render adds glare by following Price's tutorial:

Problems

Adding glare introduces a number of problems (in no particular order):

Since the glare is added during compositing, the cabinet door glass does not affect it.
The star streaks are not pointed.
Separating the cabinet door frame and cabinet door handle for masking eliminates incorrect glare, but produces a moiré pattern for the handles (even with dithering and DoF in place).
Due to issues with alpha, the white environment background is no longer applied (this is not apparent with the glare reference image because JPEG does not support transparent backgrounds). This cascades to other problems (such as darker tiles and less window reflection).

Question

How would you produce a realistic glare (or glowing LEDs) that is behind glass and correctly masked?

Compositor Node Setup

Here is the node setup:

(Aside: does Blender have an "save node setup as image" option? A screenshot won't necessarily capture a massive node setup.)

Glass Nodes

The glass nodes have the following node setup, from chocofur's tutorial:

And the absorption:

Try adding a refraction  node to your door material, so that the light gets dispersed

Edit:
In you file the glare is there but it's almost wiped out by the white environment's brighness:

Your file on a Blue environment.


How to add thickness to a curve? How can I add thickness to a curve? I already tried with the extrude and depth options in the curve settings, but it doesn't work properly.

All you need to do is set the Fill to Full on the curve to get a complete 3D shape. It defaults to Half, which is why you only have half of you shape showing.


Cutting heart shape in a mesh I am new to blender and have been having issues with something I thought is relatively simple.

I tried looking for answers to this but could not find anything that can help me.

Basically, I followed a video to create a "simple" heart shape mesh using 2 cylinders and a cube I had combined them into a single shape, removing the overlapping part with Boolean modifier.

However, when I tried to use it to cut the shape into a cube, I can't get it to work properly.

I noticed that the heart mesh has the sides of the cube connecting to the half cylinders have multiple faces etc.  But the model appears to be air tight.

Can I get some suggestion as to the easier to go about doing this or fixing the issue I am having?

Any pointers will be very much appreciated.

p.s. I wanted to upload the heart mesh I have but I don't know how - I am new to this forum too.

Edit: Here is the example of what I am trying to do.

I wanted to create an mesh (in this case a heart) as follows:

Then use it to cut into another mesh as follows:

Boolean does not work as expected even if I tried making the cut using Boolean modifiers the cube first, then the cylinders separately one at a time.

The tried various combinations of combining the heart mesh, playing around with the mesh, applying the mesh as separate components etc but cannot get Boolean modifier to work.

What would be the best way to accomplish something like this or a cut through?  I know it works for simple shapes but not for primitive shapes.

Thanks again.

Edit:  Here is the heart mess sample for cutting.  Thanks.

Your specific problem (based on your blend file) is a faulty heart mesh. If you press z to see the wireframe mode and this will become obvious. You need to have a mesh that does not contain inner geometry or walls, or double edges/vertices, which this mesh contains both. Unfortunately the tutorial and method you were following to create the heart is "simple", but rather faulty and bound to get you into trouble in the future.

These mesh issues caused an inaccurate polygon in the cutout, which could be fixed fairly easily.

You could also clean up your cutout mesh, but it's not worth the work. I recommend making a more accurate and stable mesh, using the following steps:

Create a cylinder (shift+a).
Go to edit mode (tab).
Turn on proportional editing o, and change the mode to sharp.
Select the top, center vertices, and scroll the mouse wheel while grabbing them (g) until you have the desired result.
Do the same for the bottom.

Here is an animation demonstrating the process.

To perform the cut, use the following steps:

Add a boolean modifier and set it to difference.

Select the mesh which needs the hole in it. (not the mesh to make the hole!)
Go to the modifiers tab and add a boolean modifier.
Set the type to difference, and the object to the shape to make the hole (your heart shape).
Apply the modifier.
Select and delete the heart shape (or just move it away).

There now should be a heart shaped hole in the mesh.

If you want another option, enter edit mode (tab), add a little more geometry (ctrl+r for loop cut) and use the cut out tool (k) to manually cut out the geometry. Before doing this you will want to switch to orthographic view (numpad 5) and top view (numpad 7) to get the proper cuts. Then disable limit selection to visible (see image) so it will cut all the way through the mesh, and click where you would like to cut. When you are done, press enter to finish the cut. If you would like to cancel push esc. I hope this helps.

Here is my blend file.


How to render background footage with refractions and reflections? I've got a tracking scene with some glass and glossy materials involved. I want to render the background footage along with the glass, but no reflections or refractions are appearing. It's just gray. Im using cycles

It is not possible to render the viewport background, I've tried, and failed.

What I ended up doing is just adding in the background in post-processing, like using After Effects (Though this is possible with Blender)

If your scene uses refraction like glass or glossy layers, it might be a good idea to create a plane as the background.

So, for example purposes, I composed a scene with shards of glass, a camera, and a light.

The first thing you should do is create a plane. Then rotate the plane so that it is parallel with the camera, then move it backwards so it is behind everything else.

Then, go into the Camera by pressing 0 and go into edit mode by pressing Tab.

Then, you'll move each of the edge vertices of the plane as accurately into the corners of the camera scene as possible.

So you should end up with something like this:

Then go to the Materials tab for the plane, and add (+) a material. Change it from Diffuse BSDF to Emission. Then Press the Circle next to Color and change it to Image Texture You should get something similar to this:

If the texture appears out of scale, try changing Flat to Box.

You'll notice there is gray in the refraction of the glass. This is because it is picking up light (Or should I say, a lack of light) from the rest of the scene outside of the textured file. To fix this...

Create a sphere and scale it up so that it overlaps the entire scene. Then, add the Emission texture to it the same as with the plane. You'll notice the texture doesn't show up properly, probably is just a solid color. This is because you haven't UV unwrapped it.

To unwrap it, go into edit mode with Tab Select a ring that goes through the center of the sphere.

Then hit CTRL+E and choose mark seam. Then hit U and choose Unwrap.

Then switch the panel to the UV image editor

It should look like two ovals.

Now you'll want to scale these up and down with s. If you open 3D View and do Shift+Z to do a makeshift realtime render, you can see as you scale up and down that the texture formatting on the sphere changes. Scale it so that a single texture on the sphere is around the size of the plane, then you can close the UV editor, like this:

Click here for image, it was too big to upload

Then if we go back to the camera and render, you will see that there are no more gray spots.

This works because the aphere is providing the refraction textures. Sure, it might not be exactly realistic, but it's good use of what you have available to you.

If there are any problems, I'm willing to help. Sorry if this answer seems unorganized. I'm still new to Stack-Exchange and am currently trying to find an answer format I like.


How to add a hdr world background to its own layer? everyone. I'm have been working on this project and need the hdr background to be on its own layer. I have a bunch of layers that I have put the main objects on and they all have alphas on them so when I go into compositing I just use an alpha over to combine into a single image. The only problem is now my hdr background has turned into complete alpha as it doesn't show up on any of the layers. I would like to have it on its own separate layer so I can add some effects to it in compositing. How would I go about this? Thanks for the help!

The way I did this was to do a dummy run render of the camera's motion within the environment on an empty scene layer, with the environment set to be "visible" to camera, and saved this as a file of PNG's.  Then set up your scene proper, set the film to "transparent", check "use environment" on your render layers, and set the environment itself not to be visible to the camera.  Finally, in the compositor, bring the environment back in as an image (set to image sequence), and alpha over the rest of your scene.


i wanted to make horizontal gradient text color? I was trying to make horizontal gradient text. And I made needed nodes, but nodes didn't color of the text.

Change the Gradient Texture Node to Linear.
Edit:
After that use the Z rotation in the Mapping Node to get a vertical or horizontal gradient.


Rotate posed character around the Z axis without deformation Hello Blender Stack Exchange, please be kind to an absolute newbie.

I've rigged a very basic character and managed to move him in pose mode and insert keyframes to make him walk along a scene, but I now want him to turn around. Rotating the armature deforms him horribly, making him really flat and wide. Switching into object mode and rotating him applies the rotation to every keyframe in the animation, grr.

How can I rotate my character around his own centre in pose mode or otherwise do a rotation in an animation?

EDIT:

Dropbox link to my .blend file - excuse the goofiness, it's a video I'm trying to make for my mate Haighstrom.

The problem is that you have moved the center of the mesh and the rig several times (while in edit and pose mode). This is a big no no and would have brought about even more problems if you had continued on to do more complex transforms/animation etc.

TL;DR: Clear all your object's transforms, and update the origin points for the rig and the model.

To fix.

Select the character and the rig and hit ShiftH to hide the rest of the scene so as to work without any distractions.
Select the character HaighMan and clear all transforms, Rotation AltR, Location AltG and Scale AltS.
Select the entire rig, which is currently in pose mode with A and repeat the previous steps for clearing all transforms.
Still selecting the rig, use CtrlTab to go to object mode and repeat the steps again for clearing transforms.

Providing you followed the steps above, your scene should now look something like this.

Select the rig and Tab into edit mode and adjust it to fit the model, select the root bone and use ShiftS > Cursor to Selected and then use CtrlShiftAltC > Origin to 3D Cursor. You can then select the rig in object mode and rotate the character 90° on the Y axis to have it stand upright.

All should be well now, it is fixed but still broken as your previous animation keyframes are still on the armature. I would highly recommend clearing these and animating it again and also re-applying the model to the armature. If you now hit play, it will jump to the keyframed location and the character will start walking, you are now also able to rotate and scale each bone without any weird deformations.

More reading:

Weird Armature Deformation
How do I apply a simple armature that I made to a model?
How can I automatically generate vertex groups for an armature?


Can modifiers, in Blender 2.78, be applied as shape keys? I ask as I cannot find it. Still, it is in Blender 2.61

Yes, for modifiers that don't change the objects topology.  For example, the displacement modifier has an option to apply it as a shape key.

Other modifiers such as subdivision surface can not be applied as shape keys, presumably because the vertex count changes. Shape keys cannot interpolate between the two shapes that have different topology.


is there a way to lock everything so settings won't get changed between rendering sessions? Say you are rendering in images so you can pick up where you left off, if need be, is there a way to lock down everything that needs to be locked, like camera position so when you start again the frames settings will not be off when putting it all together into a move when finished, it will be as if one never stopped rendering until the finished product.

I've looked for locking but have not found anything this specif on it.

Transformation Locks is what you need to use to lock down everything that needs to be locked. Each object has its own LOCKS for LOCKING it down to prevent it from moving.


Blender smoke sim explosion just ends up like volumetric fog I was following a tutorial (https://www.youtube.com/watch?v=29yfS-icS3M&t=564s&ab_channel=Iridesium) on explosions in blender but i've run into a few problems. I followed it pretty much exactly, though he does go a bit fast so I may have missed a thing or two. Around 15:03 after he does the initial baking he selects a frame and goes into rendered view before adjusting the shaders, and his smoke already looks like how it should, just without the colors. However when I enter rendered view after baking, all I see is a cube of smoke filling the entire domain, rather than a frame from the explosion. Basically like how volumetric fog looks in eevee.
Also earlier when he's in solid view he turns on color mapping to see the smoke better, and it makes his smoke white, but when i do it I see a bunch of separated black globs. When I turn off color mapping I don't even see anything at all
He's on 2.82.7 and i'm on 2.9 but unless they've completely changed the way smoke sims work i don't think that is the problem.
What it should look like:

What I got:

Material nodes:

Blend File: https://drive.google.com/file/d/147q_6xxkBdWAqRlkRWM8qnoQfSP_ELbx/view?usp=sharing

You need to tell the Principled Volume node where to get it's measure of the 'density' of the domain from. You can do this by either feeding a value into the 'Density' socket or you can fill in the 'Density Attribute' to indicate it should be taken from the smoke domain 'density' attribute.
In your case you should be able to simply click on the 'Density Attribute' field and enter 'density' (all lower case).

Changing the 'Density' value (just above the Density Attribute) will adjust overall density of the smoke (it acts as a multiplier).


When is vertex painting the right choice to color a model? I am asking this question because I cannot think of any advantage to vertex painting over automatic uv unwrapping followed by texture painting.

Vertex color is faster to setup, and not needing any texture image or UV-unwrapping can be perceived as an advantage in itself. I've helped a colleague setting up his characters for an animation training DVD (cover). He uses mainly vertex color, and not resorting to complex lighting or texture tricks to convey subtly varied colors in each character.

Another project I've been involved in consumes 1.5GB of RAM when rendering, mostly for textures. This one's memory requirement would be orders of magnitude lower.

If your character design needs the detail, then using image/procedural texture would be justified. Otherwise, vertex color can be a viable alternative, especially on computers with less RAM to use.


How to bevel a flat surface? Is it possible to bevel a flat surface using the bevel tool?

Here is my object (a simple ramp):

and I want to curve this ramp object but the bevel tool doesn't work on flat surfaces:

[ the bevel tool only create new edges without curves :( ]

The way that I make the curve on the other object has no accurate measurements:

I set the edge bevel weight that be used in bevel modifier;
Configure the bevel modifier;
I try to position the edge in the exact centre making the other
adjacent edges the same length.

So, I wanted to use the bevel modifier to avoid manually manipulating the edge position, because I can't position it perfectly.

ok, as @metaphor_set said, makes sense that bevel tool wont work in flat surfaces

  It still needs an angle, because otherwise a bevel doesn't make any sense

so, i go manually:

this measure addon helps a lot (edit>preferences>addons>"measureit")

[Edit] I found a new way to do this with exactly precision:

I used an plane as a knife to obtain a vertex at the intersection of the edge that I wanted to snap and now I can use the bevel tool. Here is the workflow:

[Edit 2] I found a faster way:

Using "Connect Vertex Path" (Ctrl+J) automatically create a new vertex at the intersection of the created edge. Here is the workflow:


Mesh is gone after Bool Tool undo I've played around with the Bool Tools, but when I remove the created modifier from the stack, my object mesh is gone. Not really gone, I see Cube.002's edges there in Edit mode, but I cannot get it to display again. Also there still is this cube around my mesh, left over from Bool Tools.
How can I completely undo a not-yet-applied Bool Tool operation?

Link to Blend File

BoolTool changes the way an object is displayed in the 3D window so that you can see the effect of the Boolean operation without the object getting in the way.  It looks like when you undid the BoolTool operation the object remained displayed as "Bounds."
Here's how to check this:
In the properties editor, in the "Object Properties" tab there is a "Viewport Display" item.  Open it and it will show you a list of things that are displayed about the object:

The next to last item is "Display As". This has a drop down menu:

If you leave it as "Textured", then you get the normal behavior where the 3D menu for scene display decides whether to show the wire frame, solid, textured, or rendered view, via:

But if you set it to one of the other values, then it will display the object as no more that that form.
BoolTool does something fairly common in the Boolean based modeling workflow so as to avoid confusing you. Here's an example of a Boolean where I am using a cylinder to cut a hole in the default box:

Because the cylinder is still visible, you can't see the hole in the cube.  So BoolTool and other boolean based workflows like hardops or boxcutter set the cylinder to only display as wireframe or bounding box:


How to cut mesh along the bones? Is there a way to cut a mesh along the bones? I have attached a picture to clarify what I mean. The first picture shows a hand that I would like to cut based on the bones, like in the second picture, where I did it with Bisect(but it would take a long time cutting a whole human in pieces with Bisect)

Your Problem is labour if I understand you correctly. So you are searching for a workflow that will make your job less labour intensive. I just tried a few things and found something that works at least for me. It comes with restrictions but at least it works.

First you need to prepare your Mesh. For that I recommend duplicating it with Shift+D and moving it to a different layer (with M)

To prepare you need to follow these steps:

Go into Weight Paint Mode of your Mesh (Ctrl+TAB)
press Space and search for "Quantize Vertex Weights", then press F6 and make sure the Subset Combobox spells "All Groups"
press Space and search for "Clean Vertex Group", then press F6 and make sure the Subset Combobox spells "All Groups" again and set the Limit to 0.1 just to be sure
test your bones and look out for vertices that are not anymore in any group. Add them to one that makes sense (you can use weight paint for that but then you have to repeat this whole preparation step from the start. You should instead add them in Edit Mode)

You can find the described functions also in the Weight Tools section of the Tools Panel to the left.

If you are finished you are prepared for the splitting part.

Go into Edit Mode and make sure everything is selected (A).
Subdivide your Mesh (W -> Subdivide) with one division (default).
Then repeat the following process over and over again, until you are finished.

deselect everything (A)
select (the next) Vertex Group in the list and press the select button (found in the Properties Menu in the Object Data tab (little Triangle))
press P to separate the selection

You can use this script to do it for you in one click (just copy it into a Text Editor in Blender and press "Run Script"

import bpy
bpy.ops.mesh.select_all(action="DESELECT")
for i in range(0, len(bpy.context.selected_objects[0].vertex_groups) - 1):
    bpy.ops.object.vertex_group_set_active(group=bpy.context.selected_objects[0].vertex_groups[i].name)
    bpy.ops.object.vertex_group_select()
    bpy.ops.mesh.separate(type='SELECTED')
    bpy.ops.mesh.select_all(action="DESELECT")

To use the script go into Edit Mode of your Model
This should leave you with something like this:

I hope this helps you with your problem.


How do I export from Compositor? I've set up all my nodes and connected the last noodle to the Composite node, but how do I then export the new image? The Render Result in the UV/Image Editor hasn't changed and I can't see a Save Image option or anything. Am I missing something or do I need to re-render?

It should work as Mr. Zak says, anyway you can create a viewer node in the compositor, then choose viewer in the UV/Image window and save the image.

I connected the composite output node to the original image to have the behaviour you described, maybe that was the problem?


Dynamically create camera in the BGE? Is it possible to do this in 2.6? I'm trying to dynamically create cameras. Looking around the API reference I found KX_Camera and Camera, but they have no constructors or factories, that work at least.

In 2.4 it seems that you could do it, as I believe they have .new() methods.

You could try this:

import bge

scene = bge.logic.getCurrentScene()
owner = bge.logic.getCurrentController().owner
cam = scene.addObject("Camera.001", owner , 0)

Note that the camera object needs to be on an inactive layer.

To set the active camera in the BGE:

bge.logic.getCurrentScene().active_camera = cam


Torch not showing an emission node I have recently been working on a Minecraft animation. I wanted to use a torch to light up the inside of my house, but there is no emission node in the node editor. It works on blocks such as glowstone, but not on torches.
I have tried creating an emission node but it messes it up. I am following a tutorial from Black Plasma Studios on YouTube (12:30 seconds into the third episode). Please help. Tell me if you need more info.

This isnt the best way for this but it should work for what you need.

The problem with the set up below is the brown stick part is also illuminated not just the fire part. The best way to do that is to have 2 different materials one for the stick and one for the fire (with just the emission on the fire.) Or you could use a vertical falloff ramp but that may be overkill for what you are looking for. Hope the below set up helps you.

Or you can skip this whole step and just put a point light where your torch is.


How to draw text and shapes to a Texture? Using Python I'm trying to generate a texture with a few lines and text.

I've got a proof of concept using Pillow and a function to convert from PIL Image to Blender Image,
but I would like to avoid having the extra dependency.

Is there a built-in 2D Graphics API I could use to draw shapes and rasterise/sample pixels for a texture ?

I had a look at the Grease Pencil API which looks great for drawing.
Would it be possible to get an Image/pixels from Grease Pencil ?
If so, how ?

Unfortunately I haven't found a way to easily render text using the GreasePencil API nor a way to capture GreasePencil text/lines into a texture (Blender Image).

I ended up using PIL and copying the pixels over to a Blender Image (method described here). Other than the conversion using [:] to access pixels slightly faster the other speed up was using a bitmap font (as opposed to a true type font which was slow to rasterize):

font = ImageFont.load(os.path.join(os.path.dirname(os.path.abspath(__file__)),"fonts","haxor.pil"))


Trying to do 2D to 3D from a 3/4 view image So I've been trying to turn this image into a 3D model for about 3 days now and I've watched a lot of 2D to 3D videos to try to find a work around but no luck. To me the issue comes from the perspective that the image is drawn in, because from all the videos I've seen they've all used side and front views.

Might help to create a basic shape of the creature from spheres first, you can even connect them via booleans (BoolTools addon auto join is great) after and then sculpt from the rough shape


Is there a way to select all the objects inside a collection? Is there a way to select all the objects inside collection using shortcut?

When you are in the 3D View, select one of the collection objects and press shiftG > Collection. In the Outliner, right click on the collection name > Select Objects.


How to change a material texture per object? A simple task. I have hundreds of objects with the same material, but they must have an individual image texture on each. What is a correct way to get it done? I know the "ObjectInfo" node's "ObjectId" property. But how can I use it for choosing an image texture?
There are properties "StartFrame", "Offset" in the "ImageTexture (image sequence)" node. But they have no inputs. And I cannot put drivers there. Maybe an object's driver can change the value by changing material's '''nodes["Image Texture.001"].image_user.frame_start''', but it seems to be very unreliable hack.
Another idea is to duplicate materials for each object, but for now it seems as a nightmare.
What do you think?
Also if there is a way to get the same in Blender render, I'd be glad to know it.

So, I ended up with a script which clones all the materials, both cycles and blender internal (all the materials in the scene render ok in both engines). To set image id I used custom properties. The actual image id calculation seems complicated, but there are tiles in the scene which are parented to some hosts, and they all are duplicated within their respective parents, so it's much easier to handle only parents' properties instead of each child. When resetting materials back it just clears all the extra references, so blender will kill those orphans itself on save / revert.

Here is the script, in case somebody will face the same problem.

#----- scene-tools.py
'''Some tools to automate this very scene tasks.
   @author (c) LV A.S. Mechanic. Kharkov city
'''
import bpy
import glob

# base names of objects of interest
TILE_NAMES = ('tileCA','tileCB','tileCC')

IMAGE_PATH = r'//textures\img'          # blender notation
IMAGE_MASK = 'img_*.jpg'

PROP_ID_PARENT = 'host_id'             # custom property name for image Id calculation
PROP_ID_OBJECT = 'image_id'

# (Cycles)
TILE_MAT_NAME = 'tile-face'             # tile material (cycles)
TILE_MAT_SLOT = 0                       # material slot id to work with
NODE_IMG_NAME = 'ImgTex'                # image texture node name in the material
IMG_NAME = 'img_'                       # image base name

# (Blender Internal)
TILE_MAT_NAME_BI = ('tile-face-bi')     # tile material (BI)
NODE_MAT_BI = 'MatBi'                   # BI material input node name
TILE_TEX_SLOT_BI = 0                    # texture slot id within Bi matertial to work with

def get_my_tiles():
    ''' this returns a list of tuples for all the tiles in the scene.
        (0 - object; 1 - parent id; 2 - object id; 3 - real image id)
    '''
    _res = []
    scn = bpy.context.scene
    _maxs = {}   # here we store max obj_id within parent_id
    _pids = []   # parents' ids
    for obj in scn.objects:
        if (obj.type == 'MESH'):
            for _base in TILE_NAMES:
                if (obj.name.startswith(_base)):
                    # create descriptor and get everything (no real id yet)
                    try:
                        _pid = int(obj.parent[PROP_ID_PARENT])
                    except:
                        _pid = 0
                    try:
                        _oid = int(obj[PROP_ID_OBJECT])
                    except:
                        _oid = 0
                    # update maximums
                    _maxv = _maxs.get(_pid)
                    _maxs[_pid] = (_oid if _maxv == None else max(_maxv, _oid))
                    # update pids
                    if not (_pid in _pids): _pids.append(_pid)
                    # store values
                    _d = tuple((obj,_pid,_oid))
                    _res.append(_d)
                    #print('found object: {}'.format(obj.name))
                    break
    # now we calculate the real image id for each object
    # get sorted _pids
    _pids.sort()
    # replace _maxs values with start offset
    _offset = 0
    for _pid in _pids:
        _maxv = _maxs[_pid]
        _maxs[_pid] = _offset
        _offset += _maxv + 1
    # and calc real id with id offsets
    _res1 = []
    for _d in _res:
        _res1.append(_d+(_d[2]+_maxs[_d[1]],))
    '''
    print("--------------- final tiles")
    _n = 0
    for _d in _res1:
        print(_n," : (", _d[0], _d[1], _d[2], _d[3], ")")
        _n += 1
    '''
    return _res1

def error_stop(msg):
    ''' show message and exit with error '''
    raise Exception(msg)

def get_filenames(path, mask):
    ''' returns sorted list of files matching the mask in given path '''
    _path = bpy.path.abspath(path)
    #print('path: ', _path)
    _files = glob.glob(_path+"\\"+mask)
    if len(_files)>0:
        _files.sort()
    return _files

def name_with_id(name, id):
    ''' composes indexed name with a base name and an id (name.00N)'''
    return name + "." + "{:03d}".format(id)

def reset_tile_materials():
    """ Resets materials to defaults for all the tiles in the scene """
    # first find the defaults
    mat_default = bpy.data.materials[TILE_MAT_NAME]
    if (mat_default is None):
        error_stop('Material {} not found!'.format(TILE_MAT_NAME))
    mat_default_bi = bpy.data.materials[TILE_MAT_NAME_BI]
    if (mat_default_bi is None):
        error_stop('Material (Bi) {} not found!'.format(TILE_MAT_NAME_BI))
    tex_default = mat_default_bi.texture_slots[TILE_TEX_SLOT_BI].texture
    img_default = tex_default.image
    # get all the tiles
    my_tiles = get_my_tiles()
    if (len(my_tiles) == 0):
        print('Tiles not found. There is nothing to do.')
        return
    # set default material for all
    print('Setting defaults for {} found objects'.format(len(my_tiles)))
    for _d in my_tiles:
        obj = _d[0]
        # reset all possible references
        mat = obj.material_slots[TILE_MAT_SLOT].material
        mat_bi = mat.node_tree.nodes[NODE_MAT_BI].material
        tex = mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture
        tex.image = img_default
        mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture = tex_default
        mat.node_tree.nodes[NODE_MAT_BI].material = mat_default_bi
        mat.node_tree.nodes[NODE_IMG_NAME].image = img_default
        obj.material_slots[TILE_MAT_SLOT].material = mat_default
    print('All tile materials'' defaults set.')

def find_or_create_image(name, img_ref, filepath):
    ''' it finds the image by name. (if not found it's created by copying img_ref),
    then given path will be set as the image filepath '''
    img = bpy.data.images.get(name)
    if img == None:
        img = img_ref.copy()
        img.name = name
    img.filepath = filepath
    return img

def find_or_create_material(base_name, base_name_bi, id, mat_ref, mat_ref_bi):
    ''' it finds the material by name. (if not found ot's created by copying mat_ref),
    then the image will be set as the image material's image '''
    # image is already ok, hust find it
    img = bpy.data.images[name_with_id(IMG_NAME, id)]
    # first handle Bi material
    tex_ref = mat_ref_bi.texture_slots[TILE_TEX_SLOT_BI].texture
    # find or create a texture
    tex = bpy.data.textures.get(name_with_id(base_name_bi, id))
    if tex == None:
        tex = tex_ref.copy()
        tex.name = name_with_id(base_name_bi, id)
    # put needed image to the new texture
    tex.image = img
    # now find bi material
    mat_bi = bpy.data.materials.get(name_with_id(base_name_bi, id))
    if mat_bi == None:
        mat_bi = mat_ref_bi.copy()
        mat_bi.name = name_with_id(base_name_bi, id)
    # set new texture
    mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture = tex
    # now cycles
    mat = bpy.data.materials.get(name_with_id(base_name, id))
    if mat == None:
        mat = mat_ref.copy()
        mat.name = name_with_id(base_name, id)
    node = mat.node_tree.nodes[NODE_IMG_NAME]
    node.image = bpy.data.images[name_with_id(IMG_NAME, id)]
    # and set bi material to Bi node
    node_bi = mat.node_tree.nodes[NODE_MAT_BI]
    node_bi.material = mat_bi
    return mat

def create_tile_materials():
    ''' this creates a bunch of materials for the tiles, and sets images from the img directory '''
    # first get all the image file names available
    print("Getting available images' names")
    img_files = get_filenames(IMAGE_PATH, IMAGE_MASK)
    if (len(img_files) == 0):
        error_stop('No imahes found in '+IMAGE_PATH)
    print("Found {} images to process".format(len(img_files)))
    # find all the tiles
    my_tiles = get_my_tiles()
    if (len(my_tiles) == 0):
        print('Tiles not found. There is nothing to do.')
        return
    # count images needed (with max image id)
    _max_id = 0
    for _d in my_tiles: _max_id = max(_max_id, _d[3])
    print("It's needed {} images for {} objects".format(_max_id + 1, len(my_tiles)))
    if (len(img_files) < (_max_id + 1)):
        error_stop("There is not enough images ({} of {})!".format(len(img_files), _max_id + 1))
    # create images copying from the orignial one
    ids = []
    for _d in my_tiles:
        _id = _d[3]
        if not _id in ids:
            ids.append(_id)
    ids.sort()
    # find the original image to copy
    mat_ref = bpy.data.materials[TILE_MAT_NAME]
    img_ref = mat_ref.node_tree.nodes[NODE_IMG_NAME].image
    # Bi
    mat_ref_bi = bpy.data.materials[TILE_MAT_NAME_BI]
    # actual creation
    for id in ids:
        find_or_create_image(name_with_id(IMG_NAME, id), img_ref, img_files[id])
    # and materials creation
    for id in ids:
        #base_name, base_name_bi, id, mat_ref, mat_ref_bi):
        find_or_create_material(TILE_MAT_NAME, TILE_MAT_NAME_BI, id, mat_ref, mat_ref_bi)
    # assigning materials to the objects
    for _d in my_tiles:
        obj = _d[0]
        id = _d[3]
        # cycles
        mat = bpy.data.materials[name_with_id(TILE_MAT_NAME, id)]
        obj.material_slots[TILE_MAT_SLOT].material = mat
    print("Materials created and assigned to the objects.")

class CreateTileMaterialsOperator(bpy.types.Operator):
    """Creates new materials with different images for all the tiles in the scene"""
    bl_idname = "scene.my_create_tile_materials"
    bl_label = "Create tile materials"

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

class ResetTileMaterialsOperator(bpy.types.Operator):
    """ Resets materials to defaults for all the tiles in the scene """
    bl_idname = "scene.my_reset_tile_materials"
    bl_label = "Reset tile materials"

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

class MySceneToolsPanel(bpy.types.Panel):
    """Creates a Panel in the Scene properties window"""
    bl_label = "Scene tools"
    bl_idname = "SCENE_PT_MySceneTools"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

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

        row = layout.row()
        row.operator("scene.my_create_tile_materials")

        row = layout.row()
        row.operator("scene.my_reset_tile_materials")

def register():
    bpy.utils.register_class(ResetTileMaterialsOperator)
    bpy.utils.register_class(CreateTileMaterialsOperator)
    bpy.utils.register_class(MySceneToolsPanel)

def unregister():
    bpy.utils.unregister_class(ResetTileMaterialsOperator)
    bpy.utils.unregister_class(CreateTileMaterialsOperator)
    bpy.utils.unregister_class(MySceneToolsPanel)

register()
#-----/scene-tools.py


UPBGE - setting a Rigid Body Joint to 'breakable' with Python? I'm trying to create breakable RBJ constraints in-game. I can make a regular 'Generic 6DOF' just fine, I'm just not sure how to enable the 'use_breaking' tickbox from Python.

Here's the code I have so far:

import bge
from bge import logic
from bge import constraints
cont = bge.logic.getCurrentController()
obj = bge.logic.getCurrentScene().objects
own = cont.owner
near = cont.sensors['Near']
constraint_type = 2

objects = logic.getCurrentScene().objects

edge_position_x = 0
edge_position_y = 0
edge_position_z = 0

edge_angle_x = 0
edge_angle_y = 0
edge_angle_z = 0

for i in near.hitObjectList:
    object_1 = own
    object_2 = i
    physics_id_1 = object_1.getPhysicsId()
    physics_id_2 = object_2.getPhysicsId()
    constraints.createConstraint(physics_id_1, physics_id_2,
                                constraint_type,
                                edge_position_x, edge_position_y,
                                edge_position_z,
                                edge_angle_x, edge_angle_y, edge_angle_z)

    #breakable = True ??????

Thanks in advance!

got it

https://shuvit.org/python_api/bge.types.KX_ConstraintWrapper.html#KX_ConstraintWrapper.breakingThreshold

you create the constraint -> set the breaking threshold

constraint = constraints.createConstraint(#args)
force = 10
constraint.breakingThreshold = force

etc


Select Vert under move gizmo If I have the move gizmo on it restricts me from selecting a vertex that is below one of its axis lines. Also if I have a vertex selected and I want to drag around another vertex then it is interpreted as a move on the vertex that is selected.

I checked the preferences but could not find anything that would do the trick.

thank you

You can either rotate the view so the vert is easily selected, or you can disable the gizmo while you select the vert.

In 2.79 the shortcut is ⎈ CtrlSpace or you can turn it on/off in the header.

In 2.80 the shortcut is ⎈ Ctrl` and is also available in the header.


Mechanical modeling: placing a bar between two ball joints Background:
I need to place a bar (cylinder) between two ball joints (roundcubes).
You might think "Uh! Such an easy task deserves a post here?"

Well, the task is less easy than you could think at first:
As you can see, these joints are positioned really weird in the space.

So, I thought to a quick solution: I could position a bone, with the head centered on a joint, the tail on the other one and finally parent the bar to the bone.

This way I'd get the bar located, scaled and rotated to match the ball joints. NOPE.

Positioning a bone EXACTLY is really trivial.
You set the cursor where you want the bone's head to be and set the head to the cursor position.
Repeat for the bone's tail. DONE.

What I tried:
I tried parenting the object to the bone, but the cylinder went to some random position in the space.
I also tried using the eSnap addon, to no avail.
I tried using hooks, but I couldn't make them work as I expected to.

All complicated by the fact that my right arm is currently enveloped in chalk...

Something like this:

Place the origin of the cylinder at one end.
Parent the cylinder to the first sphere.  Reset the cylinders origin (Alt+O) to position the end of the cylinder at the first sphere.
Add a Track To constraint (Ctrl+T) to the cylinder with the target as the second sphere.  Adjust the track axes until the cylinder is aligned towards the second sphere.
Apply the visual transformation (Ctrl+A) and delete the Track To constraint.
Scale the cylinder along the local Z axis (S,Z,Z) until it intersects with the second sphere.


Best way to make a face simple question, I would like to know that is the best solution for cleaning my mesh?

Maybe the knife?
https://framapic.org/5XTvfkM6DXRk/FxI8lQx6iRTd.gif

Select the grid loop, key Space, type Grid Fill, and select the option.

Example on a cylinder:


How to limit how far an object can move in Blender Game Engine? First of all, I have an empty that is constantly being tracked to the cursor. I have a situation where I can select an object with left-click, and upon right-clicking, it is parented to the empty, meaning I can move it by my mouse. When I left-click again, it places it down.

Is there a way I can limit how far it will move while parented to the empty before it stops like it's hit a wall that's a certain distance from its starting point? Also, after I place it down, that "wall" resets to be equidistant from its new position.

What I want (but without the wall):

And then the empty can move further but the model can't.

Is there a way of doing this in logic bricks? I'm sure it's possible in Python but I'm trying to do it all in bricks for this project.

You can make the wall invisible. Then make the cursor object a sensor physics type, and when it collides with the wall, have it send a message to the player to unparent. This method isn't fool proof (if you move the mouse too quickly, then the guy can clip through the wall.) but it's very simple to understand and I'm sure you can make the most of it.


PBR painting directly Is it possible to use Blender to paint PBR textures?
I mean painting like in specialized programms, where you paint with a setup material over normal map, metallness, roughness and color simultaneously, defining surface look and feel with single stroke.

Yes,Thise is possible using a new branch under developing right now (Not officially).

All you have to do is to create images in the image editor and use them in your nodetree,and you can paint in the viewport of in the image editor.

You can see PBR painting at the end of this video

And you can download the branch from here.

Edit for the question in the comments:

Yes you can in the viewport painting,just check cavity mask and edit the curve to get what you need,
But I love doing it procedurally using nodes and pointiness feature.


Blender 2.8 Wireframe Mode: show only visible Vertices As you see the back vertices are visible. I want them to be hidden as you would expect.

In wireframe mode they used to be all visible but the "Show whole scene transparent" button changes between selecting visible only and selecting all. It's similar to the button I outlined in solid mode.


Can blender separate a sculpt mesh like zbrush? I want to seperate a sculpted mesh and sculpt the on it without effecting the other mesh.

You can Mask the part of the mesh you want to separate

and then choose the Mask -> Mask Slice to New Object menu option

Which will give you two new objects (the Blender pseudo-equivalent of SubTools).


Is it possible to invert normal maps in cycles I have a normal map which is 'looking in a wrong direction' and I would like to get exactly opposite effect that this map gives in my Cycles render. Is it possible?

Bump map

For a bump map you can just drop in a invert node between the bump image and the bump node.

Normal map

For a normal map you can separate the RGB color channels and invert just the red and the green channels. Like in the image below.
click image for full size


Creating a polygon plane with different sections / components I'm trying to build a polygon plane exactely as in this video at 5:28, but in Blender, not Maya.

I haven't found any convinient way to do that. I select the edges and extrude it, but I don't think that's a good way.

Could somebody suggest me an efficient way to do that?

Thank you very much!

I suppose you want the extrude part to be strict squares. Here are some ways to do it (among others):

1)

Create a plane and create an edge loop in its middle with a ctrl R.
Scale your plane on the same axis, for example 3 times (S Y 3).
ctrl Rand + to create as many edge loops as necessary on the orthogonal axis.

2)

Create a plane and Subdivide it for example 5 times (use the parameters on the bottom of the left menu).
Delete a part of the plane so that you have the length you want.

3)

Create a plane, subdivide it, enable the Snap option and its options.
Duplicate the first subdivided plane as many time as you want, the Snap option allows you to stick to the previous copy and to merge the vertices.

4)

Subdivide a plane
Add an Array modifier and choose the Count you want
Apply the modifier in Object mode


Face wont scale in proportion So I've been working on this arch and I have decided that I want the bottom 50cm a little thicker, a skirting type effect. My idea was to take the bottom face, extrude it (z), scale it out to the thickness I want, level it with the original vertices and then extrude to the ground

When I select the bottom face (Screenshot 1) to scale it out, the software is deciding that the median point is off centre, I think.

This causes the scaled face to deform (Screenshots 2 & 3).

I've scaled a lot bigger than I want in the screenshots just to show better what is happening.

Can anyone help me figure out where I'm going wrong? Or let me know of a better method of adding the skirting?

using inset, like the answer in the possible duplicate question, is not a solution here

There are many vertices in the bend and just a few at the wall side, so it seems Blender calculates the median of all vertices correctly.

Don't scale the bottom face, but the ring of newly created faces after extrusion! Set your pivot point to Individual Origins, select the ring of faces, press Shift+Z and scale them as desired.


How to delete all faces with distance to other object I want to delete all faces (of "Mesh") with a distance > 0.5 to the nearest point of an other object ("Sphere").
Unfortunately it deletes the whole object.

Thanks for helping!

import bpy
import bmesh
from math import sqrt

# Get the active mesh

obj_sphere = bpy.data.objects['Sphere']
obj = bpy.context.edit_object
me = obj.data

# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)

for face in bm.faces:

    # select face and Sphere
    bpy.ops.mesh.select_all(action='TOGGLE')
    face.select = True
    obj_sphere.select = True

    # get distance for selected objects
    l = []
    for item in bpy.context.selected_objects:
        l.append(item.location)

    distance = sqrt( (l[0][0] - l[1][0])**2 + (l[0][1] - l[1][1])**2 + (l[0][2] - l[1][2])**2)

    # check distance > 0.5 and delete
    if distance > 0.5:
        bpy.ops.mesh.delete(type='FACE')

bmesh.update_edit_mesh(me, True)

This code does the trick, and uses some nice built in functions to make things simpler:

import bpy, bmesh

s = bpy.data.objects['Sphere']
o = bpy.context.object

bpy.ops.object.mode_set(  mode   = 'EDIT'     )
bpy.ops.mesh.select_all(  action = 'DESELECT' )
bpy.ops.mesh.select_mode( type   = 'FACE'     )

bm = bmesh.from_edit_mesh( o.data )

for f in bm.faces:
    # Calculate the global location of the current face's median point
    gCenterMedian = o.matrix_world * f.calc_center_median()

    # Find the closest point on the Sphere to the current face's median
    loc = s.closest_point_on_mesh( gCenterMedian )[0]

    # Find the distance by calculating the length of the vector between the two points
    distance = ( loc - gCenterMedian).length

    if distance < 0.5: f.select = True

bm.select_flush( True )

# Delete all selected faces
bpy.ops.mesh.delete( type = 'FACE' )

bpy.ops.object.mode_set( mode = 'OBJECT' )

As the gif shows, reverse the sign to delete far away faces


How to run Blender from server? I am familiar with running Blender via SSH and that is not what I am searching for. Is it possible to run Blender off my uni's server like an online service? so that it completely runs and renders on it while clients can access it similar to Google Slides

As with any X11 based program you can run blender on a remote server and have it's windows displayed locally by using X11 forwarding. Over a local network this can work but won't give the same performance as a local copy of blender.

If you want to create a web based solution, I would start with building blender as a module and use webgl to draw in the browser. I doubt you could get full functionality this way but you may be able to setup a simple 3d editor using blender as the backend.


Does anyone else have this problem when trying to open a .BLEND file? Whenever I try to open a .BLEND file, instead of opening the file like it should be doing, It instead just opens a new scene? For example, you save a large cave scene, but when you open it by clicking on the file it just opens the default 'New Scene'.
Edit: Ok this just happened,

I went into regedit to make sure things are correct and they are, so I have absolutely no idea what's going on.
Edit again: for some reason the program became unknown in the associated file types. So that is fixed, but it is still just opening a new scene.

I have the same issue, and I suspect that your notion that you downloaded the zip file rather than the installer is, in fact, the cause of the problem. It appears to me, that you are using a recent version of Windows. In which case, you can try clicking on "start", and in the menu interface, click on "Default Programs" (in my installation, in the right hand column, directly above "Help and Support"). In the resulting menu, click on "Associate a file type or protocol with a program", which will bring up a list of most of the file types present on your system, perhaps after a period of time to load. In the list, right-click on the Blend extension, and in the upper right hand corner, click on the "change program"

In my installation, when I do this, there is no option to associate the file with Blender, despite the fact that I have about a dozen versions of Blender present on my machine. But each of these is in a separate folder on the desktop of one particular user (I have a half dozen set up, each associated with a particular activity), so that it might be that Windows apparently does not see that the executable programs in those files. It might be that if the unzipped folders containing the various Blender versions were in the root directory of the drive on which they are located, instead of the desktop folder of a particular user, that Windows might be able to see them.

My workaround is to open an instance of Blender, and open new projects from there, and use "open" from the Blender menu to open existing files, and if it's a project I have previously worked on, to use the "open recent" option.


Switching between UV maps on a single object I have looked everywhere and cannot find the answer to my question:

Let's say I have a sofa, and I want multiple textures on the entire mesh (not separate faces, but the whole mesh). I then want to switch between these textures (e.g. switch from a red sofa to a black sofa)

How can I do this?

I have made multiple materials, and multiple UV maps for the object. Yet I can't figure out how to assign a specific material to a specific UV map, and then switch between them to change the colour of the object.

Editing anything on one UV map changes the placement and texture on the other UV maps for the object.

Any help is appreciated!

I find it's easiest to do this in Blender Render. (Green oval).

You only need one material and one texture, but a UV map for each couch pattern. Here I have 3 couch patterns so I'm using 3 UV maps. (Magenta circles).

Unwrap the couch for each pattern. For the red, I've used project from view. You can then scale and manipulate the mesh (in UV/Image editor) to reflect how you'd it displayed. (Red ovals).

Do this this for each couch pattern, but make sure the correct UV Map is selected and the corresponding image is loaded in the UV/Image editor. (Purple ovals). For the pink couch pattern, I've used "Sphere Projection" unwrap.

Switching between the UV Maps in the properties window (magenta circle) will switch between the patterns and how you've set them up.

In Cycles:

Add the following nodes (You can easily do this by hitting spacebar and typing in the node name): UV Map (so blender knows what mesh coordinates to use), Image Texture (so blender knows what image to use), Diffuse (so there's actually light to see the image) and then Material Output.

Then follow the steps in red to switch between couch patterns.


Duplicate a mesh via python I'd like to improve my duplicator script.
bpy.ops.object.duplicate() seems to require me to select the object first.
I'd like to just feed the object straight to it instead.

Is there a smarter way to handle it than I did so far?

def duplicator(name):
    # select the object
    obj = bpy.data.objects.get(name)
    obj.select_set(True)

    # Loop 3 times, duplicate it, name it
    for i in range(1,4):
        # duplicate selected object
        bpy.ops.object.duplicate()

        # name new object with a string and number
        newObj = bpy.context.selected_objects[0]
        newName = 'Plane_' + str ( i )
        newObj.name = newName

duplicator('Plane_0')

Another take

Before closing as dupe, thought I would put together another take on this for example sake.

Added a method that simply yields n copies of the given object with a new name and suffix.  If linked is False the object copies all share the same mesh.

import bpy
from bpy import context

def object_duper(ob, name, n=1, linked=False):
    assert(ob)
    for i in range(n):
        copy = ob.copy()
        if ob.data and linked:
            copy.data = copy.data.copy()
        copy.name = f"{name}_{i + 1}"
        yield copy

# testing

ob = context.object

for o in object_duper(ob, ob.name, 5):
    context.scene.collection.objects.link(o)

This method simply dupes the objects which will naturally be added to bpy.data.objects collection. I have not put in the link to collection.  Could emulate your answer method with, and pass the collection

def dupe_n_link(collection, ob, name, n=1, linked=False):
    for o in object_duper(ob, name, n=n, linked=linked):
        collection.objects.link(o)

Can think of many reasons to create multiple duplicates, may not always wish  to add all dupes to same collection, may wish to add one to each collection

ob = context.object

colls = bpy.data.collections

for c, o in zip(colls, object_duper(ob, "Basis", n=len(colls))):
    c.objects.link(o)


How do I use Blender's built-in stereoscopic features? I followed instructions I found online. It was pretty straightforward. Just enable "Views" in the scene tab. But it doesn't seem to work for me. When I render, it just renders both left and right and then layers it on top of each other as a flat image.

I'm unable to preview or render the images correctly. Here's a video of what I did.

Is my Blender buggy or am I just doing it wrong?

It seems that the render result will always be either anaglyphic or both images overlaid. You can toggle it with one of the icons at the bottom.

Whatever stereoscopic format you choose when rendering doesn't seem to do any difference. It's when saving the result that you can choose the format. The same (or similar) panel is shown when choosing a name to save it as.
(This actually makes more sense since you may want to try out or save to different formats and it would be a shame if you had to render it again.)


Manually assigning mirror pairs? Is it possible to set bones as the X-axis mirror of each other other than with the .L and .R suffixes?

For example, is there some option where I could manually convince Blender that "Left_Thigh" and "Right_Thigh" are a pair (and thus mirror any edits on one to the other)?

I have to export to an engine that doesn't like periods/full-stops in bone names, and I'd really rather not have to keep swapping the names back-and-forth every time I export for testing.

Any answer is appreciated, even if it's "No". (At least it'll save me time barking up the wrong tree).

Yes bones are mirrored if you enable x-axis mirror and as long as everything in the name is the same except 'Left' and 'Right' and can even be directly next to a letter if you use it as suffix. If you use 'Left' and 'Right' as prefix, then separate with '.' (period) or '_' (underscore)

But if you use 'L' and 'R' it cannot be next to a letter, but has to be separated with '.' (period) or '_' (underscore)

For example prefixes:

L.Bone and R.Bone
Left.Bone and Right.Bone
L_Bone and R_Bone
Left_Bone and Right_Bone

or suffixes:

Bone.L and Bone.R
Bone.Left and Bone.Right
Bone_L and Bone_R
Bone_Left and Bone_Right
BoneLeft and BoneRight


Blender crash on Open/Save/Import/Export but app works as normal Sorry to ask this nooby question here but I've not had any luck elsewhere.
I'd love to get stuck into using Blender and was doing fine for a few days but then I opened Blender 2.79 portable so I could export some 3ds files and since then I've not been able to open, save, import or export anything from Blender 2.83.
I can use 2.83 in a single session and everything works fine but as soon as I do any of the above Blender immediately crashes, even for example trying to save the default Blender scene.
I've tried deleting the prefs folder, uninstalling everything and starting again but still the same.  I've also updated my graphics drivers.
W10, i7, GTX 1070, 48GB RAM.
Please could someone help me get to the bottom of this.
Thank you

Start blender from a terminal.  And see if any errors show up.
https://docs.blender.org/manual/en/2.79/render/workflows/command_line.html
Platforms
How to actually execute Blender from the command line depends on the platform and where you have installed Blender. Here are basic instructions for the different platforms.
Linux
Open a terminal, then go to the directory where Blender is installed, and run Blender like this:
cd <blender installation directory>
./blender

If you have Blender installed in your PATH (usually when Blender is installed through a distribution package), you can simply run:
blender

macOS
Open the terminal application, go to the directory where Blender is installed, and run the executable within the app bundle, with commands like this:
cd /Applications/Blender
./blender.app/Contents/MacOS/blender

If you need to do this often, you can make an alias so that typing just blender in the terminal works. For that you can run a command like this in the terminal (with the appropriate path).
echo "alias blender=/Applications/Blender/blender.app/Contents/MacOS/blender" >> ~/.bash_profile

If you then open a new terminal, the following command will work:
blender
MS-Windows
Open the Command Prompt, go to the directory where Blender is installed, and then run Blender:
cd c:\<blender installation directory>
blender

You can also add the Blender folder to your system PATH so that do you do not have to cd to it each time.
You can also try to reset user preferences (this will reset blender to stock)
https://www.katsbits.com/codex/userpref/


how do I permanently change the mesh and armature position? I designed this character with his arms along his sides.  I gave him bones and put a lot of detail work into getting everything right.  I now want to add clothes and am running into issues because his arms are along his side and not spread out so the shirt wants to go through itself. I was wondering if there is a easy way to make his arms rotate up and the bones follow with.  I want everything to stay in exactly the same position relative to each other because some of the bones are in fingers and a little shift will be bad.

This is actually two questions (probably more): The first is using weights to connect the bones to the mesh.  This is done in Weight Paint mode.
Here's a link to several answers which would help: https://blender.stackexchange.com/search?q=Use+Weight+paint+mode

The second is moving bones; which really just consists of selecting a bone, and moving it in a pose.  However, this is related to parenting the bones and weight paint:
https://blender.stackexchange.com/search?q=Parenting+bones

Possibly a third question regarding adding clothes; but, you should try to ask only one question at a time.  I realize with moving bones, this doesn't appear to be a multi-question problem.  Hopefully these links will help.

I've never had to reset the pose like you mention, but, I searched for information on how to change the pose and make this and the deformed mesh the default.  It says here that this presumes the weights are properly set and the deformations on the mesh work properly.  Credit goes to NixArt for this information.

"This procedure supposes that you have already rigged and weight-painted your object so that it deforms correctly. At this point, you simply want a different rest pose for your object. However, when selecting “Apply Pose as Rest Pose”, you do not want to waste your time correcting your mesh and redo the weight painting for your new rest pose. Here is how you can do it:

Select your armature and go in “Pose Mode”.
Pose your object in your new rest pose.
Go in “Object Mode” and select your deformed object.
In the object’s “Object Modifiers” stack, copy the “Armature Modifier” by pressing the “Copy” button. You should have two “Armature Modifiers”, one above the other in the stack, with the same parameters. This will deform your object twice, but it is ok. If you go in “Edit Mode”, you will see that the mesh has been deformed in your new rest pose.
Apply the first “Armature Modifier” (the top one), but keep the bottom one. The latter will replace the old “Armature Modifier” and will allow to pose your object with respect to your new rest pose. At this point, the object will still be deformed twice. That is because we need to apply the current pose as the new rest pose.
Select your armature and go in “Pose Mode”.
“Apply Pose as Rest Pose” in the “Pose” menu. This will clear the double deformation and put your object in your new rest pose." - NixArt

https://nixart.wordpress.com/2013/03/28/modifying-the-rest-pose-in-blender/

and possibly this tutorial

https://www.youtube.com/watch?v=r1AkueG7zpY&ab_channel=MakeHuman


I cannot render an animation with CUDA I cannot render a animation with CUDA. This is my script and the commandline order:

import bpy

bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = 'CUDA' bpy.context.user_preferences.addons['cycles'].preferences.devices[1].use = False bpy.context.scene.cycles.device = 'GPU'
bpy.context.scene.render.tile_x = 256 bpy.context.scene.render.tile_y = 256
bpy.ops.render.render(write_still=True)

This is the command:

blender -b mainfile.blend -E CYCLES -t -a //file -P script.py

Sometimes says "error there is no //file " and sometimes begin the render but using the cpu..

HELP

The -t option is to specify how many threads are used for rendering, this should be followed by a number but the -a you have following it will give you an error.

The main issue you have with your command is that blender executes the arguments in the order they are given. Following it through means that blender starts in background mode, loads mainfile.blend, sets the engine to cycles, incorrectly sets the threads, renders an animation, opens the file //file then runs the script script.py.

What should work for you is -

blender -b mainfile.blend -E CYCLES -P script.py

If you are adding //file to specify the output file for the render, then you need to put -o in front of it (and add a file extension) and if it is a folder then also add a trailing slash -o //test_renders/.

You may also want to remove the render line from your script and use -f <frame number>. Note that using -f to render a specific frame from the command line will save the image to file so you don't need the render step in your script.

blender -b mainfile.blend -E CYCLES -P script.py -o //file.jpg -f 1


Are there any special considerations for using Blender on Linux? Are there any special considerations to be made when using Blender in Linux over Windows? Specifically Ubuntu?

The question is vague, but off hand here are some things to consider.

Compatibility

Make sure your hardware is supported,some hardware has poor support or is completely unsupported.Note: at the time of writing, NVIDIA has much better support for GPU rendering then any other hardware, but this may change with newer drivers & hardware.
Path names are case sensitive (if you share projects with ms-windows systems you need to take care of this, since ms-windows is case insensitive).
Unlike OSX, Linux doesn't support Quicktime codecs. This means some formats (such as gif) can't be loaded. Though Blender uses FFMPEG which supports many video formats (input & output).

Performance

Linux (and associated tool-chain) has been proven to be faster in some areas (many users report faster render times with Cycles for example). But this depends on your exact configuration.The ability to run Blender with no graphical desktop to use all available memory can be an advantage too (especially for render farms).
Blender for Linux takes advantage of a high performance memory allocator (jemalloc), which is less prone to memory fragmentation, see:

jemalloc home page
Sintel, Blender Jemalloc benchmarks
how-does-jemalloc-work-what-are-the-benefits

Some of Blender's code takes advantage of compiler optimizations which aren't available in Microsoft's compiler (MSVC): (explicit branch reordering with __builtin_expect and more efficient macros with statement expressions).
Greater choice for compilers (GCC, Clang, IntelC++) are supported on Linux, but only MSVC is supported on ms-windows.

With the ability to boot of an external drive, you can test how well Linux runs and that it supports your hardware, before installing onto your system.

Notes:

some of the advantages I've listed for Linux are also advantages for MacOSX, FreeBSD
MS-Windows+MSVC are also advanced technologies and undoubtedly have some advantages over Linux+GCC..or other compilers... (your-mileage-may-vary).
The questioner askes about Ubuntu, however this is not really an important detail, (pros/cons apply to other popular distros too).