Exporting poses in blender I am having issues with exporting a model from blender.

I have a model and an animation linked together and I want to export an .obj or .stl model of the last frame of the animation (preferably in high detail).

The issues is that when I change the pose of the last frame (which I need to do to fix the model so that it looks right), the edit I do to the pose goes away as soon as I change keyframe or export as an .obj.

I read that I might have to change the rest pose but I couldn't manage to do that. Also how can I export the final .obj file in higher quality, as at the moment it exports as a very low-poly model and looks like rubbish.

Any ideas?

I think you should apply all the modifiers in the properties panel before exporting (starting from the upper, down to the lower).

If you want to export also the armature, after you applied the armature modifier to the mesh, go to pose mode and "apply pose as rest pose". Notice that this operation will destroy your animation (except for the last frame, that becomes the new "rest pose".


Digits of precision of vertices coordinates Vertices coordinates are float or double values ?
Is it possible to see them with full precision and not only with the limited precision of the text fields ?
Or better is it possible to see the bit representation ?

I ask this because I want to match 2 vertices without using the snap (for study purpose).

vertices are stored as 32bit floats (as with all other geometry storage in Blender).

There are no really good ways to see exact floating point values of a vertex in the user interface, Your best option is to print the value in Python.

This behavior is intentional, lots of common values like 0.1 will end up displaying as 0.100000000002,see: https://stackoverflow.com/questions/13345334/strange-behaviour-with-floats-and-string-conversion

For typical usage this isn't helpful.

As a workaround you could scale the object up 100.0x and then set 'Global' in the transform panel, so there is more floating point precision shown though this is not an ideal solution, it may be handy in a few cases.

See also: Video explaining floating point precision - gives some insights as to why this isn't as trivial as you might want/expect.


Creating Realistic Close up Sand Material I am trying to create a scene of a close up realistic sand. Here are a couple of photos I found online of real sand, and I would like to create similar result in Blender.

http://flashwallpapers.com/beach-sand-dunes-closeup-wallpapers.html

For the lighting, I will be using a HDRI Environmental Texture. I have tried different ways of creating such a result, but none of them seem to give me a realistic result or a result close to as the photos provided. I tried, using a sand texture with Displacement , Normal, and Gloss Textures. For this case, I got a result that was ok, but it was not good for a close up, which is what I need.I also tried doing it with a particle system, but was unable to achieve the required result.

Could somebody try to help me, and show me how I can create a sand similar to the pictures, close up, and as realistic as possible. Please feel free to use an HDRI environmental texture, since this is what I want to use for my result.

Particle system

You can use a particle system to spread a big number of small objects across the surface.

In the following scene there are a bunch of planes that sketches the overall surface of the terrain. They were made with A.N.T. landscape add-on with the "Dunes" preset and stacked one after the other to fill the camera frame:

The planes have a simple pbr monocolor shader with high rougness and it's lit by an HDRI.

Then several pebble-like objects have been created and assigned to a common group. Note that each one has a slightly different shader assigned. Some are brown, some are white, some are glossy, some are rough... just to give variation.

Thw workflow consist in creating a hair particle system for the object in front of the camera (the other are to far to be seen) that pick a random object from the group. The distribution of the particles is driven by weight paint layer in order to optimize the rendertime.

Particle size has been lowered, while particles number and interpolated children numeber has been increased.

Here's the rendered result of the previous scene with camera depth of field enabled and glare node in post processing.


Error messge: Generation has thrown an exception: list index out of range when wanting to generate rig i know this question was asked before but there was never an answer. I used a human meta-rig and wanted to use generate rig. But no mater what I do the error message:

Generation has thrown an exception: list index out of range
apears.

Does anyone know how to fix the issue?

My best guess: you tried to partially delete the face.
Unfortunately you can't selectively delete parts of the face (as of 2.82a, later versions may provide more flexibility).
Either keep the whole face or delete all bones that belong to it.

Some info may be found here:
https://developer.blender.org/T53842


How to display tool names? Hello I'm watching a tutorial and the person has the names of their tools in sculpting mode which is very useful for quick selecting since I'm new to sculpting but I don't have them.
Left side is my screen, right screen is his. I'm on 2.83, he's on 2.80. I've already looked in the preferences and view settings unless there's something I missed. Thanks.

Just enlarge the toolbar from its right:

As you can see rapidly in the gif above, there are three display modes:

Icons in one column (scrollable)

Compact two columns (see picture below)

Icons and names in one column (scrollable also)


Particle hair colour Let's say I have a carpet with a picture of an ornament as a texture. The carpet is black and the  ornament white. I want the carpet to be with hair particles. My question is how can I colour the hair particles that form the ornament.

Okay, I tried to see if it was possible to model the pattern and got this result. I took a plane in top down mode and modelled it on top of the referance picture, and via array modifier and mirror came up with this result. I dont know if it is useable, as the computer I am currently using have some troubles, and crashes during hair simulation. Try it out and let me know if you can get some good results. You can add two seperate hair modifiers as it is 2 different meshes. So it should be possible. I am uncertain if the resolution of the mesh is high enough, or if the scene become too system heavy. Also there might be an issue with the hair modifier clutching the same amount of hair on the small faces as on the large faces.

The file is spread on 3 layers, so you can see some of the progress, and also contain the meshes before the modifiers are applied.


How to I combine 2 curve points to create a mesh I'm trying to combine these two end points of curve so I could create a whole new mesh;
which would look like a platform with a curve and whole faces.

Assuming you just want a plane the same shape as your current mesh:

In Edit mode, select Edge mode. Click one edge and shift-click the opposite one to create the outer edge. 'P' to separate the selection then go back to Object mode, select the edge, and back to Edit mode. 'A' to select all and 'F' to Fill. You then have a plane the shape of your original object.


Is it possible to constraint an object on a vertice? Is it possible to contraint an object on a vertice instead of the entire object? Like an arrow on a body. Or to a face, so that the constraint object would move according to the face's normal?

I'm going on memory here but basically you do the parent procedure, select the child, and with shift held select the parent.  Press Tab and you'll be in edit mode for the parent model.  Select a vertice and choose that option in the pop-up.  Press Tab again to return to object mode.  If the vertice is at the model's origin point, when the object rotates, the child shouldn't because the vertice won't be moving in any axis.  It's an ideal way to attach a camera to models.


best low poly workflow without decimate I've been playing around with low poly as a design style lately and after watching a talk from GDC about low poly design I had a quick question. It was stated in the talk to avoid using the decimate modifier but I can't find many other workflow tutorials that don't use it.

What are the best techniques to start learning to avoid decimating or is decimate generally an actual acceptable practice?

Well, another option would be to use limited dissolve in edit mode. What this does is find subdivided faces that are relative to one another, and share the same position (i.e. a subdivided plane), and merge them into a single face. This would make a subdivided face a normal face once again.

Do this by going to edit mode mesh > clean up > limited dissolve. This function has been useful for me, and I hope it will help you!


Bevel not working corectly Ik I already asked a lot of questions today, but im trying to make a 3d model from scratch and running into a lot of problems, I'm trying to do this:

This is from a youtube tutorial but this happens when i try to use the bevel tool on mine

anyone know why? Please help if you could. I can't seem to find this anywhere else

here is my blender file:

and here is the YouTube tutorial I was following: https://www.youtube.com/watch?v=6BANJc53Eik

What you need to do, is remove doubles. You have 36 doubled vertices in your model, and that is what is giving you problems it seems. After doing this, bevel gives no issues. Tab into edit mode, then select all, and press W>remove doubles.
Then proceed to bevel, and you shouldn't have any problems.


Combining denoise node with other nodes in compositor? I'm rendering a thing in cycles and I think I put the Intel denoise node in the wrong spot, because it won't mix with the rest of my nodes in the composite. I've been using Blender for a couple of weeks so I'm pretty new, and also my brain just...has trouble wrapping itself around nodes. What do I need to change about this node set-up so that the denoising node works with the other ones? Thanks in advance!

Instead of using Render Layers' Image output, use the output of Denoise Image in the add node. Remember, the denoised output substitutes for the standard render layer output.


How to view python error messages? I'm following a tutorial and I can´t go forward and finish the tutorial. My problem is that when i click on run script it gives me a problem saying "Python script fail, look in the console for now..."

I use the recent blender and blender 2.69 and both of them give an error.

The problem is in the top red line. The tutorial I'm following is https://www.youtube.com/watch?v=jipaKhQWDeg Can't pass from the 15:00 minute.

On Windows you can toggle the console windows using the Menu: Window / Toggle System Console

Documentation


Automatically picking high-poly / low-poly model based on distance to camera? I'm trying to model a city, and I was wondering if Blender somehow supports "level of detail", i.e. something like this:

I create multiple versions of the same buildings that differ by
polygon count (low-poly model, medium-poly, high-poly...).
When I hit render, Blender will automatically choose between these
versions based on distance to the camera, so that far away buildings
use low-poly models, and nearby buildings high-poly models.

Does Blender support this directly? If not, can it be done via scripting?

For further clarification, I'm not trying to build a game, I just want to render some scenes in different parts of the city. Thanks in advance!

The Level Of Detail  settings in Blender 2.7 will be only available in the game engine.

Someone else had an approach to control the subdivisions of a multires modifier using a driver and use the distance from cam to an object.

See this Blog post detailed information and demo file.

It does not support switching different meshes only subdivision nor LoD for different textures.

My approach would be to have different Objects / Meshes parented and calculate the distance from camera to each object. For a quick test I parented a lores version to a higher mesh version of a model.

Like so:

Depending on a distance threshold the visibility of the lores or the hires parent is easily controlled by a script:

import bpy

threshold = 9

scene = bpy.context.scene
camera = scene.objects["Camera"]
cam_pos = camera.location
print(cam_pos)
for ob in scene.objects:
    print( ob.name )
    if ob.name.startswith("Cube.LowRes"):
        d = cam_pos - ob.parent.location
        dist = d.length

        if dist > threshold:
            ob.hide = False
            ob.parent.hide = True
            ob.hide_render = False
            ob.parent.hide_render = True

        else:
            ob.hide = True
            ob.parent.hide = False
            ob.hide_render = True
            ob.parent.hide_render = False
        print( ob.location )
        print( dist )

If you plan to use this with for an animated camera you could consider adding a bpy.app.handlers.frame_change_pre and call the script before each frame.

Demo file here


Spheres facing to camera I need those spheres facing to camera so I can see the letters all the time. I guess I need to use constraints but not sure how (I'm a newbie, yes)
EDIT: I know Damped track do it but I need it in all the axys. I tried to add a Damped track to x, y and z but it doesn't work
Thanks

Copy Rotation Constraint.
Possibly a simple way to do this is via a copy rotation constraint, to ensure the object faces the camera plane normal.

The camera looks down its -Z axis. For example sake if I put the number or some pattern on top of the default cube and make it copy the camera rotation.
(Rotate your spheres in edit mode such that the number is aligned in top view.)

Note, to reiterate the cubes are not facing the camera, rather the opposite direction to the camera.  A track to constraint will target the camera directly
Related
Make an object Always face the camera, and always be upright?
How to put rotation- and scale invariant labels to three dimensional objects (motion-tracked insert effect)?


Fracture part of the object How would one fracture only part of the object with cell fracture add-on?
I have this object:

Can I only fracture center of the object, so that the top and the bottom are completely unfractured? I can't just make constraints since the object is glass in cycles and unwanted fractures are clearly seen... I tried using cursor close, I tried fracturing with child object, but regardless of what I do, I can't get only the center to fracture...

You could do this with a slight work-around.

In Edit mode select the top half of the object

Separate it from the bottom using , P -> Selection

In Object mode select the object you wish to fracture and run the cell fracture command

If you want to you can join them back together afterwards with Ctrl J


Is there a way to scale circular faces individually? I've tried setting the pivot point to "individual origins" and changing the orientation of scale tool to normal but neither worked. It seems that those methods only work when the face is actually separated. I don't want the faces go towards the center so I manually scaled edges so that it works kinda like the "inset" feature, but is there a more effieicnt way to do this? I believe this feature was called Extrude > offset in Maya so I'm hoping for something like that.

Scale radial edges around individual origins.
Rather than a face selection, suggest in this case using edges.  Scaling  the radial edges about their individual origins will have the desired effect

Select a radial edge to be scaled.
Select edge ring to get all radials of inner ring
With pivot point set to individual origin scale.


All the objects are visible through others I added eyebrows on his head but its also visible from through his head.

You have probably enabled X-Ray mode ...


When I render, only some emissions and some gloss render, while others doesn't I've worked in blender for a bit over 2 years now, and I've never encountered something like this before. I was modeling a stage (for performances, etc) and when I tried to render, some of the emissions wouldn't render at ALL. Some would, which is very weird. I'd be really grateful if anyone knew what I could do, because I'm completely lost... :/

.blend :

I think I found your problem.

You had certain objects set to NOT render by turning off the camera icon.
Just turn them all back on and it should render fine.


How do I add custom property to object in bpy? How do I add a new custom property to a material of an object in my Python script? In an earlier version it was possible to use

bpy.context.object.active_material.gltf_double_sided = True

but I guess in Blender 2.81a it is not supported, the script fails on this line.
Unfortunately, the API documentation is very, confusing. Is there something like, e.g.

bpy.context.object.active_material.data['gltf_double_sided'] = True

(btw, the line above does not work)

The answer is:

bpy.types.Material.gltf_double_sided = bpy.props.BoolProperty()
bpy.context.object.active_material.gltf_double_sided = True

And it works.


Why are these textures diagonally tiled? Context

I am attempting to modify a model of a house that was first made by another user of a transport simulation game, Simutrans. My modified .blend file of the model is here (distributed under the Artistic Licence). Note that it will eventually be rendered as 128 x 128 pixel images for the game, so it doesn't need very fine details.

I would like to change the replace the original textures of snow on the house with JPGs of a slate roof and bricks on the walls. These JPGs were supplied by the original modeller and are available (under the Artistic Licence??) from a Simutrans repository.

The Question

I have changed the roof texture to the slate JPG, but the image appears as a series of diagonal tiles. The brick texture for the walls has the same problem. These diagonals appear completely unrelated to the meshes.

Why are the textures diagonally tiled? How can I have one image on each roof and wall? If the (2D) JPG was mapped onto the relevant (2D) faces, that would probably be sufficient. Ideally, I would like to have the slate image repeat three times, once for each of the terraced houses.

These are the texture settings as the previous modeller left them (I have not intentionally changed them except for the filepath to the JPGs):

A Failed Attempt to Solve This

I guessed that the answer lay in the Mapping tab. By changing the 'Coordinates' setting from 'UV' to 'Global' and the 'Projection' setting to 'Flat' I was able to get one slate image on each roof - success! However, the tiles are now displayed at 90° from the desired orientation on the roofs of the houses behind the terrace (on the left of the view). By swapping the 'X' and 'Y' settings for one another, I was able to correct the error on one set of roofs...and re-create it on the other. And repeating those same settings for the walls only shows a very blurred image of the bricks.

Almost everything I know about Blender has come from the excellent Wikibook, Blender 3D: Noob to Pro. Unfortunately, its chapter on UV mapping, which I suspect is where the answer to this lies, uses the example of a 3D sphere. My walls and roofs are 2D faces, and when I try to open the UV Image Editor I get images of other textures used by the original modeller, but not the ones I'm using. If I am to use the Image Editor, I would need to understand what it means to mark seams on a 2D face when I'm hoping to avoid tiling on most of the faces.

If you go into edit mode you will see that the faces have odd edged subdivisions on it.
so if you go back to the UV image editor select all or A then press u and instead of unwrapping go to project from view. This will unwrap the project from view.


Is it possible in blender to change the dimensions of a downloaded 3d model in .blend format or .obj format in blender using python scripting? I am totally new to blender, I have downloaded a 3D model of a humanoid and am able to see it in blender. I want to change its dimensions and size in all perform editing on by changing its size, height, arm width, length, etc.
In a more clear picture of the question, suppose i have 5 persons whose 3D model I have to make automatically, so I want to change the dimensions of that humanoid to match the body measurements of these people. If I can mark those points manually on the humanoid and define parameters of shoulder width, arm length, height, etc and just input the values then my project can go a little forward.
The model I am using is attached in this link,
https://free3d.com/3d-model/rigged-male-human-442626.html
Please if anyone can tell me if it is possible to edit the model by defining certain parameters through python scripting. I need it as an add on for my project. And i just need to know how can i do that rest i shall experiment and do.

I will be waiting for the clarification of the question and will do my best to edit my answer accordingly because the question is really poorly formed, however if you need a way to generate different human characters quickly defining properties and measurements of their body parts, you will definitely find ManuelBastioniLAB add-on interesting. It is a free and very well designed tool for parametric human character modeling.


How to insert a PNG as a plane in the scene, but make it so it's ALWAYS in front (and never clips into the other objects)? I'm trying to experiment with mixing 2d and 3d. I have my scene all set up:

I want the camera to move, and I want the characters in the scene to be 2D images. I want to add the characters in as a PNG with an alpha channel in the scene itself and not composited on top, so I don't have to worry about making the image move perfectly with the camera, if that makes sense.

When I add in my character as an image-as-a-plane, parts of her are clipping into the other objects in the scene. Like this (you can see her arm clipping into the couch):

I don't want to draw the characters in with Grease Pencil because of the lack of brush variety. And I don't want to composite the characters in after rendering because I want the camera to be moving, and compositing afterward would be harder to keep everything in perspective.

I want to be able to put the PNG in the scene, but have it always on top and never clipping into the other objects of the scene. I can do it with reference images, but they don't show up in the render. I'd really appreciate the help.

Thanks.

Okay, I think I know something that will work (It seems so obvious now, but I'll leave the question up in case someone else has the same problem).

I'll put the PNG's in the scene and just deal with the clipping while I'm animating, then render them separately from the background, and composite them on top afterwards. I honestly kind of feel silly for not thinking of it sooner.


Animation nodes control for keyframes I have a box that moves from point A to point B, by keyframes inserted. the same object has a AN applied for the rotation. I have conected the Combine Euler to a Time Info. I need help to find a way to start and stop the rotation on certain keyframes that i can choose. How do i do that?

The Delay Time node can be used to make the animation starts at a certain frame while the Duration input in the Animate Euler node can be used to define the end frame such that the end frame is equal to the start frame plus the duration.


How to change the model via python in blender? I found a project on github at https://github.com/eFFeeMMe/bge-traffic. I can run this model on the blender game engine successfully.
There are city.py,cityengine.py and makecity.py in the project.I guess the makecity.py is the main code to grnerate the city.blend.Here is the code:
    import bpy

def instances_from_ascii(txt):
    becomes = {' ': 'tile_Grass0',
               '-': 'tile_RoadH',
               '|': 'tile_RoadV',
               '+': 'tile_RoadX',
               '0': 'tile_Building0',
               '1': 'tile_Building1',
               '2': 'tile_Building2',
    }

    cell_w = 2.
    cell_h = 2.

    lines = txt.splitlines()
    h = len(lines)
    w = max(len(line) for line in lines)

    grid = [[None for y in range(h)] for x in range(w)]

    for y, line in enumerate(lines):
        for x, symbol in enumerate(line):
            obj_x = x * cell_w
            obj_y = - y * cell_h # So that when in default blender game projection, orientation is like text
            if symbol in becomes:
                group_name = becomes[symbol]
                bpy.ops.object.group_instance_add(group=group_name,
                                                  view_align=False,
                                                  location=(obj_x, obj_y, 0.))
                grid[x][y] = o = bpy.context.selected_objects[0]
                bpy.ops.object.game_property_new(type='STRING', name="adj_e")
                bpy.ops.object.game_property_new(type='STRING', name="adj_w")
                bpy.ops.object.game_property_new(type='STRING', name="adj_n")
                bpy.ops.object.game_property_new(type='STRING', name="adj_s")
                o.game.properties['adj_e'].value = ''
                o.game.properties['adj_w'].value = ''
                o.game.properties['adj_n'].value = ''
                o.game.properties['adj_s'].value = ''

    # Setting graph links. Sadly, grid[w-1][h-1] won't be linked.
    for x in range(w - 1):
        for y in range(h - 1):
            o = grid[x][y]
            if o:
                a = grid[x+1][y]
                b = grid[x][y+1]
                if a:
                    o.game.properties['adj_e'].value = a.name
                    a.game.properties['adj_w'].value = o.name
                if b:
                    o.game.properties['adj_s'].value = b.name
                    b.game.properties['adj_n'].value = o.name

instances_from_ascii("""
11201101201201201101210202101020121
0        |     |     |            0
2        |     |     |            1
1        |     |     +-----+      0
1   1    |     |     |     |      1
0 0   2  | 10  |  0  | 1   |      2
2    1   |  2  | 2   |  2  |      1
0      20|    1| 1   |   0 |      0
0 21 01  | 012 | 0 21|102  |0     2
1--------+-----+-----+-----+------1
0      22|     |     | 12 0       1
2        |     |     |0    21     1
1        |     |     |   1 0      1
1        |     +-----+------------1
1        |            1           0
""")

Now I change the text such as change '0' to ' ',but there had anything changed.How can I change the city?How did it generate the city.blend?

You will have to run that python code within blender's text editor.

Possible duplicate of https://stackoverflow.com/questions/11604548/running-python-script-in-blender


How to make sound waves affect values? Is it possible to make sound waves (loudness) affect another parameter such as Multiply, Saturation, Glow, etc. of other strips? It's something like a visualized sound wave, yet the result I want is glow (on a picture) to increase when the sound gets louder, and glow to decrease when it's quieter.

EDIT:
I accidentally stumbled upon a way to solve it! It's called "bake sound to f-curves".

EDIT #2:
Is it possible to adjust the levels of the baked curves? I can go as far as a value of 1 when the sound is maxed out in Audacity. I can decrease the threshold by lowering the volume in Audacity as well, but there's no way to go beyond that. Maybe there's a way to do that in Blender itself? You see, not all the Blender effect values go only from 0 to 1. Sometimes it needs a negative value, sometimes - a dozen.

EDIT #3:
Yeah, figured it out. It's done by adding a Noise modifier to an F-Curve, and selecting Multiply for the Blend Type.

First you have to add a key frame to a property. You can then proceed to use bake sound to f-curves.

See https://www.blender.org/manual/editors/graph_editor/fcurves/editing.html#bake-sound-to-f-curves


The textures on my model are too dark This may have been said already, or really simple to fix, but I've searched for 30 mins and found nothing

My issue is that every time I try to texture my model it turns nearly completely black.

Screenshot:

The only light in your scene is behind the object, in other words the face and front of the object is in the shadow. Move your light so that it shines where you need it.

Other thing that might help you is adding some environmental lighting so that the shadows are not as dark.


How to script add-on info and warnings? What is the best way to inform users of an add-on's warnings, info, or things they must do for the function to work? As it seems to be hard to add info to the main header, is it better to use (Blender dreaded) pop-ups? So what are your preferred ways and how do you do it, code-wise?

(I don't mean info view or console, because users do not have these things open - so this is not a duplicate question)

https://docs.blender.org/api/current/bpy.types.WindowManager.html#bpy.types.WindowManager.popup_menu

import bpy

def oops(self, context):
    self.layout.label("You have done something you shouldn't do!")

bpy.context.window_manager.popup_menu(oops, title="Error", icon='ERROR')


Uv lines are only visible in edit mode It's easy to paint with a guide line like that on the tutorial, but I can't.
I only get a guide line when I'm in edit mode.

Try switching the viewport shading mode to Material Preview (Top right corner of 3D view window).
Also try Texture Paint mode (Top left corner of 3D viewport window or Ctrl+Tab in the 3D viewport).


What are surfaces and metaballs used for? I use very often meshes and curves, because I know what they are used for (meshes for renders and curves for follow curves). But I actually don't use surfaces and metaballs. What are surfaces and metaballs used for?

I can't speak for metaballs, but surfaces are the geometry you would use before computers could handle smoothing polygon models. The idea of a nurbs surface is that you have a number of isoparms, which are the control points, much like a lattice. The computer interpolates smoothly between adjacent isoparms, which generates the smooth surface you see in the viewport. It was a very efficient way to render a surface with the hardware of the time.

Today, surfaces can be used for hard surface modeling, ie cars, planes and environments, although their use is fading quickly.


Movie set as image texture not playing in cycles? So, I set a .mov file as the image texture of some shapes and when I try and scroll through the timeline, the preview/render just stays as a single image. It should be changing accordingly, right?

I've been trying for hours figuring out and searching for answers—I think I did everything right setting the thing up, but surely something somewhere has gone wrong.

Here is a screenshot of the different views I have:

Thank you for your help!

Well, you should enable auto-refresh in the image texture node so the image is refreshed every frame. Other than that I have made the experience before that I additionally had to set the frame range, start frame, etc. in the image editor for the corresponding texture.


How can I get better results when doing camera motion tracking? Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.

Here are a few pointers for camera tracking (for more details follow the links in blue text):
1. Prepare your scene carefully  before shooting to make tracking and reconstruction easier
Avoid sudden camera movements to prevent blurry footage and rolling shutter artifacts. Blurry, shaky or otherwise distorted video is very hard to track and will result in inaccurate 3D reconstruction.
If your camera has a zoom lens Do Not Change the focal length during the shot. Blender cannot work with such shots yet.
Include in your scene distinctive, trackable features, and make sure they stay sharp and recognizable throughout the time they are on the screen.
Tracking markers are most effective when they are well distributed and give you a good idea of perspective. There should be some in the foreground and the background. Reconstruction is calculated by how different objects move within the frame according to their distance to the camera, objects that are close to the camera will move faster than those far away. Motion tracking works best when the difference in the tracked object's movement is clear.
If your scene has large areas of flat or homogeneous surfaces with few elements to track, or with features that repeat and might confuse the tracker, then make your own tracking markers and place them in the scene. Small pieces of tape or stickers will work wonders, for grass you can use ping pong or golf balls.
Make sure that the tracking points are not all bunched up in just one area of the frame, and that is placed on different axes, for instance, don't track the floor only but the walls as well.
A common mistake is making very large and featureless makers like these:

instead of small and widely distributed like these:

As for the texture on the tracking points, a quick google image search will give you an idea of what kind of patterns other people use:

(for more details on this topic read this link)
2. Make the Tracking process as accurate as you can
Even though blender has an option to Detect features to be tracked, you'll get better results by placing your own.
Start the tracking procedure by examining the video footage and finding what objects or features of the image are present in most of the shot. Track those First. Then go through the shot and identify features that are sharp and have good contrast or distinctive colors, track those as well.
If the tracking process stops before the object has disappeared or before the end of the shot, it means that blender cannot accurately track an element. In other words, tracking fails when the tracked element cannot be found accurately within the search box area.

(To display the search bound box enable this:

If the tracked element moves too much from frame to frame and falls outside the search area, you can resize the search box (note that this will make the process slower and use more RAM)

Read What can you do when the tracking stops? for possible solutions
Once you track some points, check that none of your markers are sliding around. Go through each one of them, maybe some are not locking properly.
You can check the accuracy of a tracker by selecting it playing back the scene while looking at the small track window on the right of the screen (if it is not visible press N to open the side panel).
This tracker for example is sliding:

Ideally, the tracked feature should stay fixed on the track window and not dance around. It should be rock solid as in the next image:

Carefully examine each and every tracked point, one by one, for accuracy.
You need at least 8 successful trackers to reconstruct a scene, but don't limit yourself to that number only.
It's better to have a few accurate markers than lots of inaccurate ones.
If your tracked points are sliding or giving large error averages, try different tracking motion models other than Loc. Use LocRotScale or Perspective for example (More info on this link)

Re-track existing markers using "Refine" to increase accuracy.

Elements that change in size or distort with perspective shifts are better tracked using Match "Previous Frame" instead of "Keyframe".

If the object you are tracking gets temporarily blocked, or goes out of the frame and comes back, you can either offset the tracker, or track to the frame where it disappears with one tracker, then track from the moment the element is visible again with a new tracker and then join the two of them together. That way blender knows that is dealing with the same object and not different ones.

3. Set up the camera data properly
Set the sensor size and focal length as best as you can using information from the camera and lenses used for the shot. If you don't know the focal length you can use the refine tools when solving. If you don't have such information, you can have blender guess the lens parameters based on tracked information by using the Refine option when you solve the camera motion.

All lenses in the real world create some kind of optical distortion. To integrate images from a real camera into a virtual 3D environment correctly, its important to determine the values for lens distortion or have blender calculate them and refine them for you

4. Set a proper range of keyframes for the camera solution

The solver can get better tracking data from some sections of the video than others. The idea is to use the section of the video that will give blender a better description of the space, based on the difference in the movement of the trackers. To do that the keyframe range should include at least 8 successfully tracked points and they should all be visible in every frame of the selected range. If you are unsure of what the best keyframe range is, let blender choose the right ones automatically, by enabling "keyframes".
One important thing to understand is that this range of keyframes is not the only section that will get solved. It only means the optimal range where there is "reliable" information (with at least 8 common markers). Blender will try to solve the rest of the scene, for example in places where the common (bundled) tracks are not present.

5. Choose the correct solver for your camera movement
The default solver in blender presumes some parallax, or perspective shift, meaning that as the camera moves, the perspective of the objects in the scene changes as well. For this to be true the camera has to have some displacement (side to side, up-down, etc). With this kind of motion, objects that are close to the camera will move at different speeds as those far away and parallel lines will converge at different points depending on where the camera is at.
Example of camera displacement:

Shots with no camera displacement, where the camera is in the same place and just rotates (panning or/and tilting), cannot be solved with the default solver.
Example of stationary Camera or Tripod shot:

These kinds of shots can only be solved as Tripod:

When using Tripod solve it's not possible to determine proper 3D information. Blender has no way to know what is closer or further away from the camera, so the tracking information gets projected from the camera in a spherical way.

Some of those shots might be easier to reconstruct using Blam or Fspy.

6. Do whatever it takes to have a low Solve Error
If your solve error is more than 0.3 or is getting "data failed to reconstruct" errors, then you really need to work on the marker accuracy and other elements outlined here. The tracking error is calculated in pixels. An error larger than one-third of a pixel is considered too high.
To find out which trackers have issues or high average errors use the graphs and dopesheet tools.

If the error is still too high, go back and revisit some of the previous steps, re-track, delete inaccurate trackers, etc.
There are times when blender will be able to solve only part of the shot, no matter how accurate the tracking process. That can happen in sections where none of the bundled tracks are present. Maybe the camera moved past them or maybe there are sections of the shot where there aren't 8 common tracking points anymore. When that happens you'll still get a "some data failed to reconstruct", and the frames where the reconstruction failed will be marked in red.
UPDATE:
To further refine your track after solving you can use the Script made by @StephenLeger. See this link for more information. It sets the tracking weight according to the reprojection error so that the information from bad trackers can also have a meaningful contribution to the camera solution.

7. Check for reprojection errors
Once you have a camera solution and further refine the optical center of your camera.

8. Correct the orientation on the scene
If after all of the pain you've been through the orientation is incorrect for the reconstructed scene. You can manually re-orient or re-scale the camera in the 3D viewport and all of the tracking points will follow:


Only one Sculpt mode brush isn't working With Blender 2.79 I'm trying to use the Smooth brush on the monkey head, nothing happens. Yet when I use the SculpDraw brush with Strength at 0 and use the Autosmooth it works as a smooth brush for now.

I'm wondering is there a setting I disabled by accident?
I already have Strength for the Smooth Brush at 1 and it does nothing. I know that in the past the brush disappeared and I had to make a new Smooth brush with Brush>Sculpt Tool>Smooth it worked once, now it doesn't do anything.

How can I get the brush to work reliably again?

I opened 2 instances of Blender, in one of them I hit in the

File>Load Factory Settings

I used the other opened Blender to copy settings and layouts and all the user preferences.

I was hoping for something less drastic but it doesn't seem to be another solution.


insetting multiple faces with continuous borders My question is associated with insetting faces on a mesh which is undivided by continuous borders.

In the example outlined with red rectangle the mesh I have selected the faces and did an inset, and it insets 3 faces as one. But on the bottom section I'm trying to do the same, but the faces don't have a gap between them. So I select the faces, and do the inset, but the inset either makes a border around all the faces, or each face becomes a square. How can I make the inset with the faces selected which don't have gaps, and get a continuous inset like in the example in red rectangle.

Thank you.

Press the i key while the inset tool is currently active. It stands for "individual," and can be toggled to switch back and forth between scaling the newly insetted face centered on the old one, versus scaling it while connected to at least one edge. You can also look at the top of your viewport while the tool is active to see which of these two modes the "individual" feature is in currently.


How can I animate the spin function? I'm trying to create the rotation of a solid around an axis and I am struggling to figure it out.

Objects will rotate around their Origin Point. So, one simple way would be to move the objects Origin Point. Move the cursor to your desired axis then in “Object Mode” select the “Set Origin” drop down menu in the tool bar (Press T to toggle on and off) then select “Origin to 3D cursor”.

Another option would be to add an “Empty” to your desired axis and then parent the object Ctrl+P to the “Empty” and then rotate the empty.


What happened to the blender UI I have found this link to a blender ui proposal:http://m.youtube.com/watch?v=UWacQrEcMHk

The link is from 2013, and it seems very convincing. I don't what happened to it, and now in 2015, I can't find any links yo what happened next.
What happened to this proposal? Are there plans to apply such UI?

I think it's worth reproducing Ton's statement on this issue here:

A lot of (really great) UI design proposals that went on the past week give quite a false impression that it’s either feasible to just replace the UI, or that its possible to pay for it – even when it takes a dozen people a year to work on.
The misconception here is that the “UI” is some kind of separated entity of a program, which can just be peeled off and replaced with another interface. However, a really good UI (and certainly Blender’s) is not just an abstract independent layer, it’s the reflection (and sometimes even the core) of the program’s design.
You can easily state that a significant part of the Blender code (more than a quarter) is “the interface”. You cannot code any tool without understanding “the UI”. You cannot work on compositing or rendering without keeping track of it. A particle system is “UI”. How animation systems relate is “UI”. How files read and write is “UI”. The way how undo works is even “UI”.
So – replacing a UI can be as impossible as trying to replace the script in a film. Let’s not go that way now. A full rewrite of Blender might happen once, but I think we have enough quality code design in Blender still – and a whole lot of open todo topics – to fill at least several years of coding time with.


Can't edit vertices on hand I'm trying to scale up the hands but the vertices aren't selectable. The hands were made separately, but it's all in one object now with an armature and all that. All the other vertices are editable.

The vertices were just hidden. I found this which worked.
process for other newbies:

Select the object
Enter edit mode
Select all with 'A' key
Show hidden using 'Option' + 'H' key


Blender Crashing When Rendering Simple Scenes I'm new to blender, only my second day, and I am following a tutorial by the Blender Guru.  I noticed something wasn't quite right when he had live render running and his blender was running just as usual, however my computer seemed to struggle running blender, and it would also cause youtube to hang up and stutter. However when I go to render a simple scene containing a plate, doughnut, and a mug it crashes. The crash makes both of my monitors go black, except for some noise in the top third of my 2k monitor, little squares of color.  Then blender closes. I tried following what other people suggested where it was applicable, making sure my sub-surf was only at 2 for everything when it was rendering and setting my memory usage to zero to allow for unlimited memory. However nothing seems to work.  Any help on this would be amazing as I'm hopping to continue using this application into the future.

EDIT: So we just tested it on my s/o's machine and we have the same monitor, ran just fine with hers all the way up to 4k, she has older generation cpu AND a step down in both gpu and memory, memory only 16gb.... what is the deal?

System Specs--------------------------------------------------------------------
OS: Windows 10 64-bit
Memory: 32gb ddr4
GPU: Nvidia 1080ti
CPU: i7 7770k(over-clocked)
Monitor: 2k dell monitor connected with display port

This is a corrupt file on preferences. I´m sorry but you´re going to start blender anew afresh, asap. :)
go to: C:\Users\3DCompositor\AppData\Local\Blender\Cache
Delete everything you got in there.

Go to: C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.79 or 2.8 whatever of the two folders you have there: delete it.

I´d assume you don´t have many new configurations or shortcuts. But even if you did, clearing out these locations will grant you a fresh copy of Blender.

Also go to: C:\tmp
And wipe out all traces of any myfile.blend you could have there.

START BLENDER and if you CAN´T and Blender still crashes, the second thing to check is a FAULTY ADDON. Do you remember having added an ADDON recently? IF so: Please uncheck it and delete it from Blender´s addon folders:
C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons

Last but not least try to run blender after all of these operations with only 1 monitor (YES ONLY ONE AFTER CLEANING) for a regular 10 minute session. IF you don´t notice anything weird, proceed with the SECOND monitor (plug your monitors with your PC OFF!)
Work for 10 more minutes using BLENDER. If you didn´t have any crashes, Turn off PC, connect 3rd monitor, and work with Blender for 10 more minutes.

If Blender crashes while you render while you have monitor A, B, or C connected you´ll know which one could possible be malfunctioning.

All right, thank you if you vote me as the answer.

BFCT_Schiller


How could a gap between array modifier created objects be closed? Repeating a segment of a tire with the Array Modifier along a curve creates a litte gap.

Are there other options besides changing the the Array Modifier's relative offset?
(This would require manually adjustment of the mesh)

Merge + First Last would destroy the mesh.

Merge + First Last will not affect anything to the gap in your case. Because:
The reason that the first/last duplicate seem to be close is because of the Curve modifier, which affect AFTER the Array modifier.

You can try to first minimize the gap by adjusting in Array modifier, then go to the Edit mode of either the unit piece or the curve, S to scale, drag mouse while holding Shift to enable the very fine presision on scale, and zoom in the view, toggle Display modifier in Edit mode and Adjust edit cage to modifier result on all modifiers (the last two icons in every modifier panel). This would be helpful to see the result directly and simutaneously. Zoom in further, then scale again... repeat above steps (if necessary) until the gap is hardly noticed.

Example 1 (adjusting curve):

Example 2 (adjusting unit piece):

P.S.:

If you really want to perfectly remove that gap, you may have to apply all modifiers first, then go to Edit mode and remove doubles.
It is indeed possible to calculate exactly how much scaling is needed, but it will involve the math, and something about the relative position on pivots. I don't think it would be of much sense in most case.

[UPDATE]

Another way to get rid of the gap by Merge is using Object Offset feature:

Example 3 (using object offset):

About how to use it, I recommend to see this simple guide from CGCookie.com.


How can I mirror bone rotations? I have a rigged character. And like most character models, I have modeled it in the "T-pose". Now I want to create an idle animation, so the arms need to be resting by the character's side. I selected both the upper arms and tried to rotate the arms simultaneously. This causes the one arm to lift and the other one to rest

Like so:

I was wondering if there's a way to mirror the rotation? Most of the material I could find regarding this simply "Flips" the armature.

Thanks in advance.

R to set rotation mode

Ctrl+M to set mirror mode

In this case X key twice

You'll see two red lines cross over your character in front view.


Make path move like snake in snake game In my game I have a Nurbs curve in the XY plane. I have a rigged car, that has a follow path constraint, so that it follows this curve.

I would like to make the Nurbs curve behave like a snake in the snake game. The snake should move by extending its head and cutting off its tail. When the player presses the 'up' arrow, the head should extend forward and the tail should be cut off. When the player presses the 'right' arrow, than the head should make a turn to the right, and idem for the 'left' arrow.

Is it possible to do that? In the pictures, the dots are the vertices of the Nurbs curve. I can give more details if necessary. Thanks :)

Examples of the curve turning to the left, the right, and moving straight:

The following code moves each point in the curve ahead one spot.
So the second point moves to where the first point is, the third to the second, and so on.

All you need to do is decide where the first point needs to be moved next.

import bpy

# Assumes your curve is the only one in the scene.
curve = bpy.data.curves[0]

items = curve.splines[0].points.items()
point_count = len(items)

for index in range(point_count - 1, 0, -1):
    current = items[index][1].co
    previous = items[index - 1][1].co
    current.x = previous.x
    current.y = previous.y
    current.z = previous.z

first = items[0][1].co
first.x -= 1

The final part moves the first point to the new position.
So you could do first.x -= 1 for left, first.x += 1 for right, and first.y -= 1 for forward.
This is making assumptions about the orientation of the scene, so you should adjust x, y, and z to suit your scene.

This code is very simple, but hopefully it is enough to get started.


How can I make it so that objects only move with widget / text entry? I constantly move objects / models in tiny increments without noticing. How can I make it so that I can only move objects deliberately! Through widgets or text entry, no accidental mouse dragging!

In order to not to grab / move objects with RMB, you should change tweak behaviour.

1. Increase the tweak threshold

To do that increase the Tweak Threshold in the User Preferences > Input:

Set it to something like 100 px. This means the mouse will need to move being right-clicked at least 100px in order this event to happen.

2. Turn off the tweak event mapping

In the User Preferences search for "tweak". In the results in 3D View section find and turn off Translate item with type of event mapping Tweak (or change keybinding for it):


How can I force mesh to remesh along a polyline? Sorry if this is a basic question, I am coming from a scientific field and have begun to use blender more and more, and it is just amazingly powerful. But, sometimes I find that to do precision type work and have precise control over meshing is a bit hard because the workflow is not really set up for that (I think?).
Basically, I have a mesh. I want to draw a polyline on this mesh, but not where any edges/vertices are currently occupying. Then I want to remesh the mesh and have edges/vertices snap to this polyline.
Is this possible in Blender?
See below schematic of what I'm attempting to do.
I have my target mesh that I'm trying to remesh, and I created a Curve>Path object t use as my snapping line.
Any advice would be appreciated.

In response to you comments:
Apart from the Knife Project and using a Shrinkwrap Modifier, the only thing i can think of, is using a Shrinkwrap Modifier with a specific Vertex Group. You would have to manually select the vertices around the edge of the polyline mesh object.

If the vertices need to stay on the same height you could also extrude the polyline mesh object and have the Shrinkwrap Mode: set to surface.
For the "more control over the spacing and remeshing" (if you were to delete any unwanted faces) the commands Grid Fill and Triangulate Faces might come in handy. And possibly Randomize to make it look more organic afterwards.
That's all i got. Hope it helps. In any case, good luck. : )


(Blender 2.9) Viewport Cycles render progress bar Since I installed the latest version (2.9) and render with cycles in the viewport, the progress-bar at the top is no longer there. Is it moved/removed or where can I find it?
Best regards
Olle

Open the Viewport Overlays popover in the upper right of 3d viewport, to the left of the Viewport Shading Mode buttons, the downward arrow next to the two overlapping circles.
Check Statistics. If it doesn't appear, try going to a different display mode (Wireframe or Solid) then back to Rendered Mode.
You should then see render progress, as well as the number of objects, vertex, edges, faces and triangles in your seen in the upper left.


How do you properly align refference images Hello everyone im quite new to blender and i have been trying to model a car for quite some time now. I have looked everywhere and didnt find an answer to my question so here it is. Every time i align thing on 2 views the 3rd is WAY off. Images are all the same scale properly aligned using the blender coordinate system(i think). How can i fix this.

edit: Here is the file

It really seems like the blueprints aren't very precise, as moonboots already mentioned.
Look:

I've used basic geometry as a guide and marked just two regions which should line up, but don't. The lower right part of the hood (where your active vertex resides) is clearly to high in front view (marked yellow).
In general, it is good practice to evaluate blueprints by doing this before you start.
Here are some rough steps to follow.

Research real world dimensions of your vehicle.
Create a simple box with those dimensions as reference.
Place the blueprints inside the box and make sure they match exactly on the bounds. (Roof, tires, side mirrors, trunk, front)
Check prominent features for alignment. I.e. by using more basic geometry.

That way, you can be aware of any issues right from the start.
--
Blueprints are very often not exact and it won't be possible to place geometry perfectly in all views.
When that happens, you can for example stick to those views that match and work with a bit of offset on the one that doesn't match. Or you can go half way.
Just maintain the shape / curvature of the misaligned view as a reference.
And you should always find good real world reference images to decide on how to proceed with areas where the blueprints are off or don't show enough detail.
--
So, as far as I can see from your blendfile, you've done nothing wrong with the blueprints.


Toggle Overlays shortcut? I used to have a shortcut to toggle 'Display Only' option in 2.7 but in 2.8 that no longer works and I have to click the 'Display Overlays' button manually which is annoying.
Does anyone know how to setup a keyboard shortcut like that?

I got it, you need to set up a hotkey manually, this is not accessible from the right-click menu:

Hit F4 to get to the Settings Menu and go to Keymap
Open 3D View > 3D View (Global)
Scroll to the bottom and hit the + Add New Button, to add a new Key-Binding
Enter wm.context_toggle in the Context Field
The Context Attribute Field will now appear. Set it to space_data.overlay.show_overlays
Don't forget to save your Hotkey Settings


What is this orb attached to my object? I have an orb that just appeared attached to my object in Object Mode. It disappears in Edit Mode. If you zoom in the orb stays the same size and you can see it is attached at a specific vertex. When I go to Edit Mode and delete the vertex the orb attaches to a nearby vertex when I go back into Object Mode. If I export to an stl it doesn't appear on the file. How do I get rid of it?

If you're talking about the big sphere it's probably a particle that you've created (if your object is very small it makes the default particle look big), go in the Properties panel > Particle, and delete ParticleSettings:


Texture not imported from obj file So i got this obj file, and when imported to blender, it loads fine but with plain white textures. when going to the materials tab, i see a lot of names with :color:222:211:211: and other rgb values. does it mean blender is not importing textures correctly? pls help

here's the link for the file, not mine btw.

https://grabcad.com/library/nvidia-gtx1080ti-1

Obj files do not transfer vertex colors.

I have read that if you can use MeshLab. Import the OBJ, then export it to PLY. Then import it into blender.

source


How to animate dynamic scaling and z offset in Array modifier I want to achieve an effect simmmilar to one in THIS video. Basically I want to animate the scale of the specific (e.g. top ones) parts of objects' "layers"  created via Array modifier as well as the z value of them, so they appear as they are not all the same distance one from another...

Using an empty as Object offset to control the array modifier will give you a lot of options.
If you play with the reltive offset you can get things like this:

Changing the distance and size of the empty you'll control the relative distance of the cloned items in the array.

You can then add keyframes:

By adding a lattice on the scene and a lattice modifier to the plane to the stack you can further control the deformation (as in the opening of the video used as reference on the question:


Is there a way to make this edge look neater without using loop cuts? I am trying to sharpen these edges without getting the overhang artifact you see in the image. I was using the bevel modifier that works for some of the edges as seen in the picture. A loop cut helps this particular edge, but it also sharpens the outside wall of the model, which I don’t want - and my topology isn’t built well at all for edge loops (I had to do a lot of things to avoid tris and n-gons)

If I need to retopologize, I will. I would use tris if I needed to and doesn’t hinder the result but n-gons are not an option. If it’s helpful to know, I am going to bake this hi-poly res model to a low poly version.

For those who may be having the same question, I figured it out. When I removed the bevel on the outer edges, but kept the bevel on the other edges, the artifacts and problems disappeared. I was able to harden the outer edge by adding loop cuts to the walls of the inside extrusions.


What is this dashed bounding box left where there is no geometry? I have created a house using a plane. Then I decided to redo the house.
I kept the old house to see the dimensions, and after re-doing the house, I deleted the old house.
However, Blender still shows the box of the old house.

Why is that so and how can I delete this artifact? There are no vertices in the old house anymore, so I am not sure why Blender still shows this box.

Those dashed lines normally represent the object's texture space when Texture Space is enabled in Properties > Object > Display:

You might have accidentally pressed ⇧ ShiftT at some point, which is used for translating the texture space. As a side effect it enables texture space display as in the screenshot above.

If you disable texture space display, then they should go away.


Gizmo is offset from vertex I'm using Blender 2.8, doing retopo for a sculpted model with Shrinkwrap modifier and sometimes enabling Snap. Some of my vertices have their pivot oddly offset and it's making the shrinkwrap modifier perform badly.

As you can see in the screenshot here, I have selected a vertice but the actual pivot to move it around is off to the side and below it. This is not the case for all of my vertices, and does not change if I switch between different pivot point "styles" (individual origins/median point/etc.)

How do I fix this and "reset" the transformation center to be right on the vertex itself?

This happens, because Gizmo doesn't take modifiers into account.

According to this developer thread and this developer thread it's a current limitation, and no way around that.


Audio/Video out of sync in rendered video, but not in VSE First let me apologize to ask this question, as this has been basically already asked, for instance here, here and here. However these answers don't seem to provide an understanding what's really going on, so I will pose my question anyway.

Every once in a while the video in a rendered video file will playback much faster than the audio, despite audio and video being perfectly in sync in the VSE. This problem seems always to pop up when then input source video is "mostly static", i.e. when the change from one frame to the next is miniscule (e.g. a screen recording). I should also add that I record the videos in question using a lossless codec (FRAPS or lagarith).

From the other questions linked above, I get the impression that this is due to Blender (or rather its version libavcodec) incorrectly decoding the compressed source video. It is also mentioned in one answer to the above questions that this is related to the use of b-frames in the encoding algorithm. However I had this problem also using the lagarith codec, which apparently uses only keyframes/i-frames.

Now in order to turn this cry for help into a question, let me ask: What the hell is going on here?

More precisely:

Why can Blender (or its version of libavcodec) apparently correctly decode and show the video in the VSE, but not render it correctly? Is the decoding in the VSE done differently than in rendering?
What version of libavcodec is used in Blender 2.74? Is the implementation of e.g. lagarith faulty in this version? If not, then why does Blender mess up the rendering?
It has been suggested that one should use "Blender-friendly" codecs for compression. Which lossless codecs are known to be so?

Edit: It seems there are several error sources here, which just makes everything much more confusing. The problem of the video playing back at twice the normal speed I had with this one particular lagarith encoded source seemed to stem from a corrupted (??) .blend file. Namely during editing Blender got stuck and I had to force it quit. When I re-opened this file Blender didn't give me any complains, but comparing its file size with the sizes of some other .blend files which were similar, I noticed that it seemed about 3 kB smaller than the rest. Opening this file and saving it to a new file ("Save as") got rid of this playback issue. However the video is still out of sync, even more subtly. Instead of the video globally playing back faster, it sometimes seems to "get stuck" and then "catching up again".

These issues are also already visible in the VSE, so it seems that my problem at least in this instance is solved. On the other hand this makes the behaviour of Blender seem even more mysterious, as I do not understand how a corrupted (was it even corrupted??) .blend file can lead to such an effect.

As I wrote, I experienced this issue with several videos, one of them being a video encoded in FRAPS. There the audio and video seemed in sync in the VSE, but wasn't in the rendered video. Strangely, after re-creating this .blend file from scratch, the audio and video now was out of sync even in the VSE. I tried transcoding it with ffmpeg, and this also gave an out of sync video. However transcoding it with Windows Movie Maker gave perfect result. So I suppose that for this particular video, the problem is that the fraps codec is implemented imperfectly in ffmpeg/libavcodec.

2nd Edit: The problem is back. Apparently it didn't have anything to do with the file being 'corrupted'. Running blender again on the very same file this time produced again an out-of-sync video. This issue seems to appear and disappear randomly.

3rd Edit: Still no clue why it only appears sometimes. But I noticed something else. The audio in the rendered video is as it should be, i.e. its start and end are as defined in the .blend file. However the last frame in the rendered video is actually way beyond the end frame. For some reason Blender consumes more video frames than it is supposed to be. I am going to file a bug report on this.

I was asked to take a look at this post. Codecs can be rather puzzling to diagnose from a distance, but it does seem that some information can be offered.

  This problem seems always to pop up when then input source video is
  "mostly static", i.e. when the change from one frame to the next is
  miniscule (e.g. a screen recording). I should also add that I record
  the videos in question using a lossless codec (FRAPS or lagarith).

The “mostly static” comment here is interesting. This does indeed sound like an I versus P / B frame issue, as the “mostly static” frames would be subject to many more instances of P / B frames. While I am unfamiliar with Lagarith or FRAPS, I would be extremely surprised if a non-GOP codec had this issue, as your solution hints toward.

  Why can Blender (or its version of libavcodec) apparently correctly
  decode and show the video in the VSE, but not render it correctly? Is
  the decoding in the VSE done differently than in rendering?

The VSE is using certain techniques to display the video that, when decoded on a shot by shot basis for rendering are different. This is why non-GOP codecs are more robust, or time code indices will yield more consistent results. This is also why most always-online NLEs will transcode upon ingestion; to avoid the codec problems as well as try to reduce the always-online image degradation issues.

  What version of libavcodec is used in Blender 2.74? Is the
  implementation of e.g. lagarith faulty in this version? If not, then
  why does Blender mess up the rendering?

FFMPEG's version was a bit nasty on some platforms as it previously used a bundled version on some while on others it used a local version. If you check the ffcompat code, you can see many version checks to support generic versions of FFMPEG.

  It has been suggested that one should use "Blender-friendly" codecs
  for compression. Which lossless codecs are known to be so?

The easiest way to avoid all of the codec mess is to rely on still frame intermediates. If you must for whatever reason rely on codecs, you are likely going to be constantly faced with these sorts of issues unless you manage to coax one of the codecs to behave under generated timecode indices. I would also speculate that FFv1 should be a reasonable choice to test and put under duress, given the nature of its design. If you try FFv1, it would be interesting if you reported your results back here for future reference.

Best of luck.


UV unwrap issue whit streching I'm currently learning Blender (as an architect i think it can be a pretty good tool) and i have a problem whit a model from a tutorial that i'm trying to unwrap. It appears to strech the texture when the UV image show me no streching...

The texture it's streching on the edge and i don't know why... on the UV image the streching option show me this part of the model are totaly blue.
After some researches on google i have tried to "apply the scale" and "rotation" but nothing changes.
Hope someone can explain me what is happening to the model or what can be the origen of the problem.

Have a good day!
(i hope my english is not to bad, i'm currently learning it too!)

If you select just the faces that are stretched, you will find that they don't have many pixels in relation to the rest of the faces on the uv map - if you can possibly give more room to them, then you will reduce that effect you see there.


Timeline navigation hotkeys When scrolling through the timeline, is there a way of locking the play head to the center whilst the strips, and other open windows, move, rather than the play head moving then having to keep manually readjusting the strip positions?

Or is there a shortcut key to center the play head if you've lost it, without pressing "home" an then zooming / re positioning / zooming / re positioning?

Iv'e just been through the blender hotkeys and cannot find anything.

Unfortunately not. The closest there currently is in official blender is follow playback, which will at least keep the playback head in the view.


"Minecraft Properties" tab is not showing up on rig where the tab is supposed to be there I found a Minecraft rig for Steve on this video from YouTube as a Blender Minecraft tutorial for Minecraft animations.

The video

The rig download

The video said and showed that this rig had a tab in the properties bar called "Minecraft Properties." However, this tab did not show up on the properties when I downloaded the rig.

The 'Minecraft Properties' panel is not a panel that appears in Blender by default and will only appear when you have run a script to enable it. You will either need to write your own Python script to create it or obtain an existing 'IK/FK UI' script.

The tutorial maker doesn't seem to have included the script for the panel in the downloads they provide, but they do link to several tutorials in the video description on how to create your own UI such as this one by CG Cookie.


How to iterate an image texture and save the iteration with python What I have so far is this, and of course doesn't work yet.

import bpy

class TestSaver(bpy.types.Operator):
    """Save Image Increment"""
    bl_idname = "image.save_increment"
    bl_label = "Save Image Increment"
    bl_options = { 'REGISTER', 'UNDO' }

    def execute(self, context):
        scene = context.scene
        original_type = bpy.context.area.type
        bpy.context.area.type = 'IMAGE_EDITOR'
        #bpy.ops.image.save_as(copy=True)
        bpy.ops.image.save_as(save_as_render=False, copy=True,
                             filepath="test_save2.png",
                             relative_path=True,
                             show_multiview=False, use_multiview=False)
        bpy.context.area.type = 'FILE_BROWSER'
        bpy.ops.file.filenum(increment=2)
        bpy.context.area.type = original_type

        return {'FINISHED'}

I recommend you compute your filepath using a function like this:

from os.path import isfile

def next_file_name(pattern):
    i=1

    if (pattern%1) == (pattern %2):
        raise Exception("bad file name pattern")

    while isfile(pattern%i):
        i=i+1
    return pattern%i

print ( next_file_name("/var/tmp/blender/voronoi-wave/%04d.png") )

( thanks, https://stackoverflow.com/questions/82831/check-whether-a-file-exists-using-python )


UV's Changing from square to rectangular texture I want to maintain the number of pixels the UV map covers. so I used smart project and unwrapped a 20 foot cube onto the default 256 space. Then I want to open a bigger rectangular texture and move the UV's to were I actually want them mapped, but I want the UV map to stay the same size (number of pixels) and not occupy the whole texture. Can I 'freeze' or 'lock' the map so it does not resize?

The texture is mapped to the UV coordinates so that the lower left corner is on 0,0 and the upper right is at 1,1.

So if you extend your image you will need to scale the UV coordinates to match the new mapping coordinates. The scaling origin depends on how you have extended the texture. Place the cursor in the uv editor based of that and use the cursor as pivot for the scaling.

You can calculate the scaling by dividing the old texture size with the new.


Whats the best way to "merge" objects like these Im new to Blender and i am having problems with trying to "merge" these objects, whats the best way to do it. Its for a game so just putting them together would waste tris if i understand everything correctly (Since there will be faces inside the object)

Cleanest way I know:

Add three loop cuts to the blocky object in both directions.
Delete the four middle faces
Snap the vertices to the octagonal object.
go to Object Mode
join the objects
Remove doubles


In Texture Paint mode, is there a way to paint a desired color over another color in ONE click/stroke? I'm new to Texture Painting and I've realized that trying to overlap one color with another in ONE click/drag will result in a shading effect that gives you a slightly weaker version of the intended color unless you overlap the color multiple times. Here is an image to better illustrate what I'm trying to achieve (the red circle).

You can mainly play with the strength of the brush and with the brush shape itself :


Catch quit blender event in addon Is there a way to catch the application quit event ?
We have a plugin that runs an xml rpc server and we would like to kill it upon application quit as it keeps running in the background after we quit the blender session.

Thank you,

-H.

one way could be by running Blender from the terminal and just add && at the end.
NB. not sure on windows though havent try it myself.

mac:

cd /Applications/Blender
./blender.app/Contents/MacOS/blender && do_something

linux:

cd <blender installation directory>
./blender && do_something

windows

cd c:\<blender installation directory>
blender -and do_something

on unix based system the && command does something if the command before has successful, so basically in this case only after you quit blender it will run the second command. on windows -and should probably do the same.

you could also probably catch it by launching blender inside python using the subprocess module. But haven't try that yet.


Landing Gear Rigging Constraints using empties So, I am working on a landing gear structure. I am using empties to connect the various parts. One in particular I am having trouble with is the "torque arm" which is supposed to move up and down (as the shock absorber) and also rotate on the Z axis (sideways like the front wheels of a car).
I have two empties in the middle of the "arm". The upper one connected to the upper part of the arm and the lower connected to the main bottom structure (Which moves up and down to simulate shock absorption) Here is how it looks. I'd really appreciate any help! Thanks

Method IK bones

Create an armature and create a bone for each object in the rig and put it in the right location. One bone for the Cylinder, one for the Piston, one for the Cylinder Arm (arm connected to the Cylinder), and one for the Piston Arm (arm connected to the Piston).
Select the armature and go into Edit mode, and go to Properties > Bone Properties > Relations. Make both the Cylinder Arm Bone and the Piston Bone children of the Cylinder Bone. But uncheck the box Connected before doing so.
Make the Piston Arm Bone a child of the Cylinder Arm Bone. In this case the Piston Arm Bone should be connected to its parent, so for this bone the box Connected should be checked.
Parent each object to the corresponding bone. In Object Mode select an object, shift select the Armature, go to Pose Mode, select the bone, press Ctrl + P and choose Bone. Repeat for each object-bone pair.

Go into Pose Mode, select the Piston Arm Bone and add an Inverse kinematics constraint. As a Target choose the Armature. Set the Chain Length to 2. As the Bone choose the Cylinder Bone. Now the Piston Arm Bone should snap to the Cylinder Bone (So the starting angle of the arm bones does not matter. But it does matter where you position the Cylinder Bone; its base should be where you want the end of the Piston Arm Bone to rotate around).

You're done. In Pose Mode, move the Piston Bone along the Z-axis to move the Piston and the arms. Rotate the Cylinder Bone around the Z-axis to rotate the whole rig around the Z-axis.

Method Damped Track (does not allow for rotation around the Z axis)
It can also be done by using Constraints. However it does not allow for rotation around the Z axis, but I didn't realize that at first. I'll keep this part of the (initial) answer, just in case. : )
It is best before you active a Damped Track constraint (note the eye icon and how it is inactive), that the object that has the constraint is aligned with one of the main three dimensional axis.

It is also wise not to use the object you want to be the Damped Track target, but to use an Empty object parented to the intended target object and use that empty as the actual target instead. This can help focus the Damped Track at the right point, but will also limit unexpected and unwanted behavior due to the Damped Track recalculating positions.

However, with this simple setup there is limited control of the position of the joint where the arms meet. But it might suffice for small movements.


Blender + ctypes = segmentation fault I'd like to use Blender as a modeling environment for engineering stuff.
Blender = python - that is obvious, however I have plenty of functionality for my modeling written in c++ but exported as a c with extern "C".
In order to use my c++ functionality in python, I wrap it using ctypes, which works well with python2.7 and python3.5.
Generally I use my c++ (with extern "C") functionality with python and ctypes with no problems, but in Blender I have a big problem - it simply crashes when I try to get any value from my c++ shared object.
The following two pieces of code recreate the problem:

==== ==== c++ functionality (compiled as libblTest.so) ==== ====

#include <stdio.h>

class KBlenderTest
{
public:
   KBlenderTest(double initVal)
   {
       _val = initVal;
       printf("obj created: initVal: %g\n", _val);  // print to prove that object was created
   }

   ~KBlenderTest()
   {
       printf("obj deleted\n");
   }

  /** function that crashes Blender, but not other instances of python interpreter */
  double get_val()
   {
       return _val;
   }
private:
   double _val;
};

extern "C"
{
    KBlenderTest *KBlenderTest_init(double initVal)
    {
        return new KBlenderTest(initVal);
    }

    void KBlenderTest_del(KBlenderTest *obj)
    {
        delete obj;
    }

    double KBlenderTest_get_val(KBlenderTest *obj)
    {
        return obj->get_val();
    }
}

==== ==== python wrapper for ctypes (blTest.py) ==== ====

import ctypes as ctp

cpp = ctp.cdll.LoadLibrary("path_to_shared_lib/libblTest.so")

cpp.KBlenderTest_get_val.restype = ctp.c_double

class KBlTest(object):
    def __init__(self, initVal):
        self.obj = cpp.KBlenderTest_init(ctp.c_double(initVal))

    def get_val(self):
        return cpp.KBlenderTest_get_val(self.obj)

    def __del__(self):
        cpp.KBlenderTest_del(self.obj)

def test(initVal):
    test = KBlTest(initVal)
    print("test=", test.get_val())

In linux shell python I run the test with:

import sys
sys.path.append("path_to_python_wrapper/")
import blTest

blTest.test(1.23)

which gives the following output:

obj created: initVal: 1.23
test= 1.23
obj deleted

Exactly the same action in Blender's python console, crashes Blender with segmentation fault. Currently I use Blender 2.79, but the situation was exactly the same with a few versions back.

Has anyone had similar problem?
The functionality I have in mind is much more complex, but I've tracked it  down to a relatively simple case.
I would be grateful for some clues how deal with this.

Best wishes,
Jerzy

You also need to specify the arg types, e.g.

cpp.KBlenderTest_get_val.argtypes = (ctp.c_void_p,)

otherwise I think they default to int, which is the wrong size for a pointer on 64-bit architectures.

Also, I would recommend opening the .so file with its full name including version number, e.g.

cpp = ctp.cdll.LoadLibrary("path_to_shared_lib/libblTest.so.1")

This is because it is usual to increment the version suffix if/when the ABI changes in some backward-incompatible way, so you want to make sure you stay with the right version, at least until your Python wrapper gets updated to the newer version in future.


Can I import multiple strips of different fps into Video Sequence Editor? I have a few video strips with audio that I want to import to the Video Sequence Editor (VSE), but they are of different fps... examples are 23.97, 24, 29.97 and 30 fps. Let's say I want to select an fps of 30 in my project, is there a way to import the video clips and converting them to 30 fps?

Making every 4 frames into 5 frames, for example for 24 to 30 fps conversion. I am not sure what it's terminology in the video editing area.

There is actually an effect strip "Speed Control" which can sort of change the fps of a video strip. If converting from 24 to 30 fps, you can set the Multiply Speed to 0.8.

However there isn't any interpolation at all, it's like every 5 frames there are two frames exactly the same, thus creating a not so smooth resulting video.


hide mesh parts using mask texture I downloaded some 3d assets from synty store, this asset pack specifically: https://syntystore.com/products/polygon-nature-pack and i'm trying to get the trees to look like the example but i see the trees with black parts and I can't figure out how to use the mask texture to hide the black parts. any help is appreciated

how nodes are set up:

and this is what the texture files look like in file explorer:

updated node setup:

and how it looks

turns out i needed to use the alpha of the main texture (not the mask texture) to the alpha of the principled BSDF. I think the suggestion from @blunder to use alpha mix also helped (but i had to use alpha clip)


MakeHuman character not appearing when rendered I'm am fairly new to using Blender (version 2.77). This is also the first time I've imported a character using MakeHuman. I've looked through a ton of youtube video tutorials as well as previously posted questions and nothing has worked yet. My problem is that when I try to render, the character is not visible.

I've uploaded my file here:

Thanks for your help!

Properties Editor->Material->Transparency

You have to do that to every texture you can select them one by one in the Outliner Editor

Plus it looks like the Specular Hardness is set too high
Properties Editor->Material->Spectacular->Hardness

Basically the textures need alot of work.
Was probably imported from a different program.


Blender 2.8 view material transparency and textures at the sametime with Workbench I am using Blender 2.8 Workbench and trying to visualize some materials which have transparency and others which use an image texture. I can see transparent materials when I use material rendering and image textures when I render the texture, however is there a way to view both at the same time?
One way I have been able to achieve this is to render the textures independently and overlay them afterwards in gimp over the material render pass. However, is there perhaps another way to see both in the viewport? If not, is there a way to automate both render passes and use the compositor to combine them?
many thanks in advance!
Jesse

for future readers:

this is no longer an issue and has been resolved https://developer.blender.org/T63077

happy blending

Jesse


How to make a "soft-textured emission" (example provided) I'm trying to copy this

So far I've got this

My material nodes look like this Material Nodes (yellow cube material is the same, just new colour)

My Composite nodes look like this Compositing Nodes (it's just a glare node for the 'glow')

My focus is on the cubes, not the foggy coloured background.

Here's what i think i'm missing:

Common texture between all cube materials for "bump" on the cubes
Blueish Point Light from Above
Less harsh emissions from my materials

Here's what i'd like some help understanding:

The yellow cube has two base colours that blend together, the yellow & orange. You can see the same blend in the red & pink above it and below it. I'm thinking it might be a subsurface scatter but i can't tell.

How can I copy the look of the cubes?

Source: https://www.ordinaryfolk.co/

You can get pretty good results with Translucent BSDF and a point light inside.

Emission shader isn't best, because it's uniform across the whole surface, nad doesn't receive shadows.
Settings are the same for both engines, but Cycles uses slightly lighter translucency color
For Eevee I enabled Bloom, for Cycles I'd probably use Glare node in Compositor.


What would prevent me from selecting verticies of active object in edit mode? (v2.82 is it a bug or my ineptness) I had been modelling a part by applying a mirror modifier to a box and doing extrusions and such without problems. The problem appeared shortly after adding a sphere object inside edit mode and moving that into place so the two surfaces intersect... Now the project is in some state that no matter what I do I cannot select vertices anywhere within the object in edit mode even after restarting blender.

Overlays were disabled. Click on the overlay button to make selection and other things reappear.


Messed up textures, can't paint most of model I'm fairly new to texturing and have some experience with blender so I'm wondering if anyone knows what's wrong with this picture and what I can do about it.

As this picture shows I can't paint the rest of the model, and I have no idea why. I projected the UV using "Smart Project" and it looks alright to me on the left side. It's also VERY laggy when trying to paint things.

And also one more thing which is probably an easy fix, when I paint the 2D map on the left side, it doesn't appear on the model.

You have to recalculate the normals first. When you check the Display normals as lines option in Mesh Display panel you may see that there are some parts, where normals are directed in a wrong way.

Enter the Edit Mode, select the whole object (press A), and then press CTRL+N to recalculate normals. You can also do the same thing from the tool shelf on the left.

Now all the normals are heading the right direction, as you can see in the picture below.

With the normals recalculated you can easily paint on the model entering the Texture Paint mode in 3d view, or Paint mode in UV/Image Editor.

Remember that after you paint a texture, you have to save it, in other case it won't be visible after opening a blender file next time. When you see the 'star' symbol by the Image option it means that the image is not saved.

Hope I helped you.


Get current scene on Blender 2.74 using python In this simple code below, named "example.py" I want to get the current scene and create a sphere.
I am using bge.logic.getCurrentScene() but there is an error named:

  name 'bge' is not defined.

I need to run this example on cmd, for example: "Blender Path" -P example.py

I have a blender big program, but there is a problem in this specific part, so I need be sure that this part will work.

import bpy
import bge

mej = bpy.ops.mesh.primitive_plane_add(1)
scj = bge.logic.getCurrentScene()
obj = scj.objects.new(mej,'sphere')

The issue with creating an object is where you are doing it, the scene's list of objects doesn't allow you to create new objects, only to link objects to the scene. To create a new object you use bpy.data.objects.new()

An example of manually creating a mesh object would be -

import bpy

# get the current scene
scn = bpy.context.scene

# create a mesh data block
mymesh = bpy.data.meshes.new('mymesh')

# define some vertices
verts = [Vector((-1,  1, 0)),
         Vector(( 1,  1, 0)),
         Vector(( 1, -1, 0)),
         Vector((-1, -1, 0)),
        ]

edges = []
faces = [[0, 1, 2, 3]]
# add the vertices to the mesh
mymesh.from_pydata(verts, edges, faces)

# create an object that uses the mesh data
myobj = bpy.data.objects.new('myobject', mymesh)

# link the object to the scene
scn.objects.link(myobj)


How Do I Keep These Pants From Acting Like A Dress? Im trying to figure out how to make pants, I dont want them to be skin tight but kinda poofy like this, but when I added the texture and material and added the rigging it formed like a dress.

you have to fix the weights of those bones of those legs, just like i show you here...
so as can you see the green weight there, there are green areas influenced in the other leg because the other legs weight, this will always happen when you parent your armature with automatic weights.

so you have to change the paint mode to subtract and increase or decrease the strenght of the brush and then start brushing the undesired weights.

other more quicker way to do this is to enter to edit mode and go and select the vertex group that you want to fix and you will notice that both legs thighs are selected so unselect one of them (the left one in this case) and then click in the button remove and then press A to unselect everything and press the select button again to the vertex group and will see that its not anymore selected the right leg thigh. and then repeat the same process in the other bones that have wrong assigned weights, and then if you go to pose mode again you have fixed it. happy blending!!


Bending object gives it a tilt I will ask again because I didnt get an answer last time. Im trying to bend and object (for example 90 degress turn to the left). That works fine with blender spin tool. But when I try to bend it to the left 90 degress and to give it a slight incline object slightly rotates around self and I want to avoid that.

real shape:

My failed recreation that tilts:

It looks like your object is a bit tilted. You can simply correct the Axis value it in the Operator box:

Or you can create a new Transform Orientation ("+" button), to keep it selected in the panel:

Then spin the face:

But as you see it makes the shape go down on the Z axis, is it what you want? If not, you could use the CtrlE > Bridge Edge Loops instead. Duplicate the face, align it with the global axis:

Use the Bridge Edge Loops tool, tweak the parameters in the Operator box:

For the second shape you show, I would do it this way:

Create an angle:

Move up the tip:

Bevel the angle:

Extrude along normals, etc...


How to fix clipping knee joint with ik bones? I created a quadruped character, and added ik bones to the legs, but the problem is the knees start clipping when it bends. i tried to see if changing the weight paint would help, but it just got worse. How can i make the knees bend softly, without clipping?

I've tried the following things and it seems to work:

Enable the Armature modifier's Preserve Volume option

I've added an edge loop above the joint:

I've segmented the small bone:

I've extended a bit its influence upwards in Weight Paint mode, use Mix, Substract, use also the Blur brush:

And I've extended a bit the influence of the top leg downwards:

A try with 2.79, I 've added a Pole Target to make it bend correctly:


Is a Toon Ramp material with image textures possible? Is it possible to set up a Toon Ramp Material that would use image textures instead of flat colors?

I usually do a Toon with Ramp checked, interpolation set to Constant, and input set to result to get a hard edge transition with full control over the "shadow" color.

In Maya you can plug image textures into the color slots on a ramp so you can cheat a cel shadow over an image texture by having a "normal" colored image transition to a "shadow" colored image.

Is there a node set-up for this? Is there another way to get this effect?

You need to create 3 materials:

Toon with your setup with white and black colors
A shadeless material with texture you wanna use on lit areas
A shadeless material with texture for areas in shadow

Then you will combine them in 4th material using nodes like this:


.obj-export is too dark I have a monkey had with a simple material:

I want to export this to a .obj-file.
But it looks like this (opened in g3dviewer):

Is there a way to lighten up the .obj-file?

Any help?

I think the problem here is that the light setup in Blender differs from the light setup in g3dviewer.

If you view your mesh in Solid display mode, Blender uses three directional (sun) lamps to illuminate the objects. You can find the settings of these lamps in the system tab of the user preferences:

The direction of these lamps is relative to your current view, so if you rotate your view around in the scene the lamps will rotate with you. This ensures a good illumination of all objects.

If you are in g3dviewer you have to replicate the light setup to get the same results.

If you are still in doubt about the exportet material have a look at the .mtl file that is written with the .obj. It contains the materials of the meshes.

Take this simple red material for example:

In the .mtl file it looks like this:

newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.000000 0.000000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

The line starting with Ns contains the specular exponent of the material. In Blender the range of the specular exponent (called Hardness here) is 0 to 511, while in .mtl the range is 0 to 1000. Exept for a rounding error '96/1000' is equal to '50/511'. This is how the specular exponent gets translated.

The next line Ka contains the ambient color. Blender does not have per-object ambient color. You can find the ambient color for all objects in the world settings. It is set to black by default, thus the red, green and blue component of the ambient color are zero.

The third line gets more interesting: Kd describes the diffuse color. But while in Blender you can set the color value and the intensity separately, they are multiplied in the .mtl file. If you have a look at the screenshot, the red value of the color and the intensity value both are 0.8. Thus the red value in the .mtl file is 0.8*0.8 = 0.64. Green and blue are 0 in blender, so they are also zero in the .mtl file.

Next is the specular color Ks. It works similarly to the diffuse color. The specular color in blender is white (1.0 in all channels) and the specular intensity in Blender is 0.5, so the resulting color in the .mtl file is 0.5 for red, green and blue.

The value Ni is the so-called 'Index of refraction' (IOR). It is set in the transparency settings of the Blender material and describes how strongly light is bent when it passes through the boundary between transparent materials (i.e. air and glass). Since I have not touched the transparency it contains the default value of 1.0.

d is short for dissolve. This value is called Alpha in Blender and represents the opacity of the object. A value of 1.0 means that the object is completely opaque, a value of 0.0 would mean that it is completely transparent.

The number after illum encodes the illumination model used for the current material. You can find a list of all illumination models and their corresponding numbers in the link at the end of my answer.

With this information you should be able to verify if Blender exports your materials correctly.

You can find a complete description of the .mtl format here.


Python UI: How to load an image from drive and select it? I am trying to create below UI panel to open the file browser and load / select the image into this field. Here is what I got so far, this opens the image and I can then select it from the available images, but I would like to turn it into a single step. So, click file browser, select image and it automatically populates the necessary areas.

import bpy

class OBJECT_PT_my_UI(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_label = "MY_PANEL"
    bl_idname = 'OBJECT_myUI'
    bl_context = 'object'

    def draw(self, context):
        layout = self.layout
        col = layout.column()
        row = col.row(align=True)
        row.prop_search(context.scene, 'image_name', bpy.data, 'images')
        row.operator("image.open", icon="FILE_FOLDER", text="")

def register():
    bpy.types.Scene.image_name = bpy.props.StringProperty(name = '')

    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

Blender already does it in the texture Panel, but I could not extract just the part I need from the python script:

Either option above does what I need.

You can use the updated PointerProperty from Blender 2.79a RC1 onward.
However, take a look at the issues surrounding them first and decide if these drawbacks (mostly related to compatibility) are acceptable in your usage scenario: https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.79/PythonAPI
(Section Data-block Pointer Properties)

This is how you use them:

In your register() function:

Remove the StringProperty, instead use this:

# (Import Scene and Image just so the line is shorter)
from bpy.types import Scene, Image
Scene.my_image = bpy.props.PointerProperty(name="Image", type=Image)

In your draw() method:

Remove the prop_search and operator, instead use template_ID:

layout.template_ID(self, "my_image", open="image.open")


Satellite Terrain Mapping I use a utlity called TERRALAND in Unity that will pull in a digital elevation map (DEM) of a selected area and overlay it with satellite imagery of that area.  I've used a similar utility in Cinema 4D called DEMearth. I have two questions: (1) Is there a similar addon for Blender 2.8x?  (2) How would I export the TERRALAND terrain object from Unity into Blender.  I've researched but found little information.

blendergis is an excellent free addon for adding terrain and satellite found on github. easy to use a little tricky to install