text:
Which deform modifier, if any, would do this?
I need to perform the following transformation: an arbitrary flat geometric figure needs to be rotated around a circle, so to speak. The circle lies in the same plane as the figure, and its diameter is fixed. Rotation angle is also fixed.
If a point of the figure lies on the circle, it does not change. If a point does not lie on the circle, it is rotated around the closest point on the circle in a plane that passes through the point and the circle axis. The following images illustrate this transformation. The circle is shown in red, the original figure in green, and the target figure in blue.

Is there is ready modifier for this? I thought Shrinkwrap would fit the bill but no luck as it distorts the figure.
Thanks in advance.
== DC Dweller

There is more of an indirect approach using the curve deform modifier.
Suppose I want o apply it a jagged circular line,I don't model it as a circular line,I model it as a normal line then deform it on a circle to become circular.
Here is the original object:

Select the circle(curve) and the object as the circle the active.
Press Ctrl+P then Curve deform
Now you have the circular shape (you can make it taller to completely fit).

To the main answer of the question:
All you have to do is changing the tilt of the curve.

Note:If the rotation of the object is nor deformed right,you have yo change the axis of deformation from the curve deform modifier.

Omar, Thanks a lot. It would not have occurred to me to use curve tilt in a million years, truly brilliant! However converting my original figure to something that could be transformed into a curve without losing all the details would be too much trouble. I ended up using Python scripting to implement this transformation. The math is quite simple: Cartesian to polar, do the rotation, then back to Cartesian.

@DCDweller , Oh,that make sense,Thanks for the tip.


text:
Using Compositing for Semi-transparent object effect
I am new to compositing and find the whole thing thoroughly confusing.
I wanted to create the animation of a planetary gear mechanism and make the outer rings semi-transparent so that the inner workings would be better visible. As you can see from the following image I have been partially successful:

I placed the inner gears on physical layer 1 and the outer rings on physical later 2, then created two render layers: RenderLayer1 incorporates physical layer 1 and RenderLayer2 physical layer 2. The image above was rendered while both layer 1 and layer 2 were highlighted. The compositing layout is as follows:

Frankly I don't fully understand this layout myself, it was created through trial and error. As you can see, the inner and outer wheels are rendered as a single scene: they cast shadows on each other. This is apparently because I have highlighted both layers. I would prefer, however, that each layer be rendered independently and and then combined but in such a way that the Z-index is taken into account, just like it is now.
Any hints how to do it?
Thanks in advance.
-- Peter

you can use the four layer sections under the renderlayer tab to your advantage. there is scene layers, render layers, exclude and mask layers. using exclude layers you can determine what objects should not interact with each other

Set up the Exclude layers section on each renderlayer so that layers you don't want included in the renderlayer are explicitly excluded:

By default, as you have noticed, objects outside the included layers will still affect the output through indirect lighting/shadows.
This is often very useful when compositing different parts of a scene together which should appear to integrate together seamlessly, but if you don't want this, it can be disabled via the exclude option.
"Excluded" layers will not have any affect on the output of the renderlayer.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Where have RNA datablocks gone since 2.78b?
Between Blender 2.78a and 2.78b, the RNA datablocks have disappeared from the Outliner (or been moved somewhere I don't know), and they didn't come back since then.
What's the reason for that ?
There's no precision about it in the release notes.

Are you sure you are in the same Outliner mode, and under the same category?

Yes of course, in any case RNAs were everywhere in datablocks, now they're nowhere to be seen.

I believe they were removed from the outliner display to improve the drawing speed.
I have been using the Development tools API navigator to get access to the RNA information.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
VSE : Bring audio back
After removing the audio part of a video strip, is there a way to bring it back (other than Ctrl+Z or manually re-importing and re-cutting the video)?
For example, in Kdenlive, you can right-click on a strip and click on "Restore audio".

Kdenlive might be an example where this is possible, but there is lot of NLE software where it is not. In Blender it is not possible. And after all it is foremost a 3D modeling software. Many dedicated video and audio editing softwares have some kind of media pool where you can append media files which in many editors is the only way to get the audio back by dragging it back in, Blender does not have such thing as a media pool and therefore you have to add the whole thing again. It is always best practice to simply not delete the audio (in Blender and other software) but instead mute it.

It is possible to do using Python.
As a standalone script to run from the text editor or used in the Toolshelf addon (success and error messages will be posted in Blender's console):
import bpy

if (video_strip := bpy.context.scene.sequence_editor.active_strip):
    # Check if the strip is a video strip
    if video_strip.type == 'MOVIE':
        movie_file = video_strip.filepath
        movie_name = video_strip.name
        start_frame = video_strip.frame_start
        final_duration = video_strip.frame_final_duration
        start_offset = video_strip.frame_offset_start
        end_offset = video_strip.frame_offset_end

        # Create a new sound strip using the same data block
        sound_strip = bpy.context.scene.sequence_editor.sequences.new_sound(
            name=f"{movie_name} Audio",
            filepath=movie_file,
            channel=video_strip.channel + 1,
            frame_start=int(start_frame)
        )
        sound_strip.frame_final_duration = final_duration
        sound_strip.frame_offset_start = start_offset
        sound_strip.frame_offset_end = end_offset

        print("Audio strip successfully recovered.")

    else:
        print("Selected strip is not a video strip.")
else:
    print("Please select a video strip.")

Or as an operator under the sequencer's strip menu:
import bpy

class sequencer_OT_audio_from_video(bpy.types.Operator):
    """Recreates audio strip from selected video strip"""
    bl_idname = "sequencer.simple_operator"
    bl_label = "Audio from Video strip"

    @classmethod
    def poll(cls, context):
        if context.scene.sequence_editor.active_strip == None:
            cls.poll_message_set("Please select a video strip.")
        return context.scene.sequence_editor.active_strip

    def execute(self, context):
        video_strip = bpy.context.scene.sequence_editor.active_strip
        # Check if the strip is a video strip
        if video_strip.type == 'MOVIE':
            movie_file = video_strip.filepath
            movie_name = video_strip.name
            start_frame = video_strip.frame_start
            final_duration = video_strip.frame_final_duration
            start_offset = video_strip.frame_offset_start
            end_offset = video_strip.frame_offset_end

            # Create a new sound strip using the same data block
            sound_strip = bpy.context.scene.sequence_editor.sequences.new_sound(
                name=f"{movie_name} Audio",
                filepath=movie_file,
                channel=video_strip.channel + 1,
                frame_start=int(start_frame)
            )
            sound_strip.frame_final_duration = final_duration
            sound_strip.frame_offset_start = start_offset
            sound_strip.frame_offset_end = end_offset

            self.report({"INFO"}, "Audio strip successfully recovered.")

        else:
            self.report({"WARNING"}, "Selected strip is not a video strip.")
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(sequencer_OT_audio_from_video.bl_idname, text=sequencer_OT_audio_from_video.bl_label)

def register():
    bpy.utils.register_class(sequencer_OT_audio_from_video)
    bpy.types.SEQUENCER_MT_strip.append(menu_func)

def unregister():
    bpy.utils.unregister_class(sequencer_OT_audio_from_video)
    bpy.types.SEQUENCER_MT_strip.remove(menu_func)

if __name__ == "__main__":
    register()

It will have a proper GUI. And you can save it in your Blender user directory/script/startup to always have it registered when Blender starts. But it will ask permission to be executed.

Thanks! I was hoping there was a native feature but that does the trick. There was just a little quirk in the code where the imported audio wouldn't be cut on the left side, so I fixed it.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Geometry nodes : Object borders from camera
I'm trying to find an efficient way to determine the leftmost and rightmost vertices of an object from the camera using Geometry nodes, as shown in red here :

Note that the 3D bounding box is irrelevant, as you can see from the top view here (the leftmost point from the camera is not the same as the left bound in 3D :

My goal is to get 2 vector output sockets for these 2 positions.

Ortho camera

A different *Perspective*

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Copy value with all hidden decimals
Is there a shortcut to copy an exact value with all the hidden decimals (those you see when calling the value in python) ?
I used to think that was what you were getting when hovering the value (without clicking) and hitting Ctrl+C but apparently not.
If that's not possible, can we then display more decimals in the UI without changing units ?


text:
Change topology with one click?
Is there a way to quickly change the topology of an object with one click? I found this feature very useful in 3dsMax. Now I'm searching the same in blender.
At 03:15
https://www.youtube.com/watch?v=MpsURXZvcsU

That kind of topology can be made with Poke Faces which will reorient faces as needed and then Tris to Quads will convert triangles to quads oriented as in video.


text:
Mirroring an animation accurately without creating extra keyframes
Lots of questions about the same thing but they can be solved by simply pasting the pose x-flipped or by mirroring the keyframes in the Fcurve editor. However, for an animation that crosses the global X-axis (in my case strafing with root motion), this doesn't work.
This question is the closest thing so far, but like that asker my model will be exported to game engine, so a Blender-specific hack like that doesn't work. I've also found that in object mode I can select the armature, right click and select "Mirror X", but again this doesn't actually create a new animation and is limited to within Blender.
I've also found a script that will automatically keyframe X-flipped poses, however it also fails when the animation crosses the global X-axis, and furthermore it adds more keyframes than the input has and makes a big mess of the animation data, not to mention that adding extra keyframes messes up the interpolation on the F-curves. This seems to be a bug in the 'Available' keying set; for example if only one location axis is keyed, it will create keys for all axes despite only one channel actually being available.
How can I create a new action that is an exact (EXACT, not just pose-flipped, and without adding a bunch of unnecessary keyframes and making a mess of the animation data) mirror of a different action?


text:
Only part of texture paint is pink
I have an object that has been created by joining two objects. The entire thing has been uv mapped. When I go to "texture paint" the entire model is pink, which I expect. I click "Add Texture Paint Slot" and add a blank texture, which renders a large part of the model black (and paintable). However, all of the faces of the second object (and by "second" here, I am referring to the order of the objects when they were joined) are pink. I can paint directly on the part of the texture that is black, but I can't paint on the pink part.
Any guidance or suggestions would be appreciated!

Select all faces and assign them to the same material. It is likely that your two objects had different materials on them, and that you added the texture paint slot to your first object's material. Now that all the geometry is in the same object, what previously was the second object is still using its material, which didn't get the texture.

@chainsawpenguin you can use the checkmark underneath the vote buttons (the up and down button to the left of the post) to accept this answer, and when you get enough reputation, you can also vote it up :)


text:
Modelling Realistic Paper Poster With Curl?
I am a 2D Illustrator with basic 3D skills using SketchUp, Fusion 360, an Keyshot.
I need to render some realistic images of what my poster designs will look like on a wall once they've been printed.
I am going for something like in the image below.  I'm trying for photo-realism, so I would like the curl to happen slightly on 2 axes at the same time, and not be perfectly symmetrical.  I am not familiar with Blender, but I am wondering if there's a way to weight paint and add a modifier for this effect to a plane that has the illustration mapped to it..?
Any suggestions?
Thanks!
Keith

Have you tried a Lattice modifier?

For such a slight curl, a little bit of proportional editing would do. For a more pronounced curl read this: http://blender.stackexchange.com/questions/54114/how-to-make-peeling-edges-of-a-paper

if you literally mean "like the picture below", well that paper is perfectly square and not bent in any way, it seems: it is a typical effect for 2d apps or web sites. The shadow is simulated as if the surface below was detached from the paper in the upper and lower part, but the paper is not curved as the shadow "visually suggests". It is more like if the below surface was a bit curved, like a cylinder, if you wish your image to be perfectly square and flat, as in the image, you need to curve the surface, not the paper, and use a light source not perfectly centered, to avoid shadow symmetry.

I'll expand my comment above, to post an example.
As I said, if you literally mean "like the picture below", well that paper is perfectly square and not bent in any way, imho.
This is a typical fake effect for 2d apps or web sites. The shadow is simulated as if the surface below was detached from the paper in the upper and lower part, but the paper is not curved as the shadow "visually suggests".
It is more like if the below surface was a bit curved, like a cylinder, if you wish your "paper sheet" to be perfectly square and flat, as in the image, you need to curve the surface, not the paper, and use a light source not perfectly centered, to avoid shadow symmetry.
Here is a possible setup, in the image below ( the render was with slightly grey paper, I just later changed the paper color to blue, to make it stand out in the setup on the right side).

But if you really need the paper to be curved, and the surface flat, see other answers.

I like this answer and the fact you explain how to do this without distorting the poster image, which is usually what you see on websites for products etc..

In Edit Mode Subdivide a plane many times > Press "W" > control the number of times Subdivided in the Tool Bar.

Then in Object Mode add a "Lattice". Press Shift + "A" and choose "Lattice" from the drop down menu. Make the Lattice approximately the size of the Plane by Scaling it. Increase the U, V and W options in the within the lattice.

Select your plane and add a Lattice Modifier. In the Modifier settings select the "Object" (The Lattice) with the eyedropper (Or dropdown menu).

Select the Lattice > Tab into Edit Mode > Select appropriate Vertice(s) and move them as needed.

*Add a Subsurf Modifier to to the plane and set the shading to Smooth (In Object Mode) to smooth out the plane.


text:
Animation Node Multiple Dimension Value

I can only manipulate one dimension attribute in animation node. If a single one is activated, like dimensions.x others; dimensions.y or z are just ignored.
I would like to manipulate all of them, so how can I do it?

Dimensions - is a vector value. You can get vector value from 3 different floats by using combine vector node:


text:
Cycles rendering all grey or transparent
I was rendering a fairly complex scene and cycles was rendering all grey. I tried setting up render layers and now it renders one layer, but it is all transparent.
Any help would be appreciated

Including screenshots and a .blend file will help people to answer your question. Right now, there could be any of a million answers that would work for you. A .blend  file can be uploaded to Blend Exchange.


text:
How can I view my 3D rendered 360 pictures on gear VR?
I got a gear VR with an app that lets me view pictures in 360, I have made the app able to recognice my usual 360 rendered pictures. But I have seen the same app can also show 3D 360, which means there is depth in sight in the 360 image. I have rendered a panorama picture with the stereoscopy option "spherical stereoscopy" activated. It gave me two panorama files on the output. Which are for Left and Right eye. How can I turn those into a 3D panorama file usable in Gear VR? Would love some help on this. I have gone through google about an hour with no luck on this topic, or even any information on those filetypes.

This is not a blender question, but a Samsung Gear VR question. If you can specify how to meet the requirements for Samsung Gear VR, we can see how it can be done in Blender. As a side note, owning a Samsung Gear VR, I was not able to view custom 360 3D images on my Gear VR. I resolved it by making a video of the still and viewing it in Gear VR.

This might be helpful:
How to render an environment to a Cube Map in Cycles
There is a section about rendering an "Equirectangular Map to Cube Map".
You can also download .blend files that come with the 3D camera and a compositing setup which seems to be pretty well documented.
I do not know of a way to view spherical images. You can view equirectangular images in the Samsung Internet Browser with some html biolerplate but the resolution really makes this a non-viable option.
Turning your scene into a Cube Map allows you to upload the file for viewing in the Oculus Photos app and it is the best solution in regards to quality.
The only downside is that you need to modify the cubemap image to follow the Oculus format which differs from what the Blender Internal mechanism expects.

Btw, I think I have read that some people got equirectangular 360 stereo images to show up correctly in Oculus Photos but so far that has not worked for me.


text:
Why is my model distorting when I weight paint?
After importing a .OBG file and rigging it, when I weight paint, my model deforms. I use Blender v2.77 .

Did you use IK (as mentioned in the tags) ?

yes. I mentioned Inverse kinematics in the tags. since I used inverse kinematic on the legs, the only area that is affected by the deformation. If I paint over the legs, everything deforms.

This is probably due to that : have a try. Disable the IK and test if the behaviour is the same when painting

This is because you have moved some of the bones while in pose mode. While weight painting you are changing how the vertices of the mesh are being influenced by the bones.
To fix this, select the armature and go to pose mode. Then select every bone and press alt+g and alt+r to reset the location and rotation of each bone respectively. (alt+s to reset scale)
Then with your mesh selected and in weight paint mode, you shouldn't see any more deforms while painting because the armature is in its default position.

I have already tried alt+r and alt+g many times and it has not worked.

@F.Lu can you add a .blend to your question? That would make it much easier to answer

I fixed it. The pole angle of the ik bones were at 0 degrees when it should be at 90 degrees. I changed it, so thank you for helping me


text:
Imported .obj has UV offset
Often when I import an .obj or .dae I have a UV "offset" (not sure if that is even the correct term.)

I mean the texture shows up correct in the end but I really would like to have it where it belongs. Is there an automatic way to move the uv grid into position?

The texture show up in the positive XY plane of the UV space, the unwrapped UV islands are placed where the creator of the obj positioned them. It may happens if someone is using repeated tiled textures (it's easy to lose the origin) or creating the model with another piece of software.
I think there may be lots of possible different cases, you shoul try to find the pattern that all the offsets have in common before writting a script for moving/resizing the UV islands for each one of the sources your files are coming from.
Automatic matching between rastered pixels of the texture sounds quite hard and just scaling & resizing to the UV texture space size won't work in may cases.

In the provided example, I would say the UV islands are's just shifted below by the height of the texture in pixel.
So grabbing the UV islands up by the amount of pixels your texture is high would be enough.


text:
Varying Intensity of Texture Map Over Single Mesh
I am trying to make the texturing more consistent on a lightsaber.
What I have -- I've highlighted important areas of contrast:

My issue is that the map (used to generate bump as well as coloration) produces far more bumps/dirt on the front half of the lightsaber (before the center switch/grip) as opposed to the back half. I have tried matching up the two parts' UV projections but to no avail.
My node setup:

On the .blend, I have two RenderLayers -- one for the lightsaber and one for the wood floor (this is because I use Microdisplacements and Adaptive Subdivision Surface on the wooden floor, both of which are tough on my GPU's memory). I have four UV maps for the lightsaber (for organizational purposes -- three are added together in my UVTexCoords node). I have an HDRI background and several textures (all packed save the HDRI, but you can download it from Textures.com, if you wish). Here it is:

I'm not in a position to check your file currently, but could it be the scale (or rotation) on those meshes is different? I thought it could be a problem with your Mapping node, but all three axes have the same value, so that seems to be in order.

You can use vertex paint and input the result with an attribute node:
here is a detailed mesh

Here is the vertex paint

Here is the node setup

and here is the result

This does not answer what I asked in my question. I asked about fixing an existing issue related to image textures -- nothing with vertex paint.

I missunderstood your question because i didnt look at your blend file I think your atempt to fix the problem is the right onebecause the problem is related to UV mapping


text:
Script for Placing Mesh on Sphere with Provided Latitude and Longitude
A while back, I made a planet Earth (UV Sphere, 3 Subsurf levels, and highres Earth texture with Generated Texture Coords) with various pins stuck on different geographic locations. These pins each had a plane at the bottom of them with a unique picture on them. It was for a project I did for my dad on Fathers Day this year (I made a collage of all of his colleagues and him to show that they were a company that truly covered a lot of the world).
See second link for full video:

While I was making this, I devised a system that worked decently for manually placing different pins at different latitudes and longitudes on the "planet," which included placing the 3D Cursor at the center of the planet and rotating the pins around the planet with Pivot point > 3D Cursor. However, between rotating the pins correctly, setting different images, and then making minor corrections, this understandably took a long, long time, and if I had to do something like this again, I would prefer that it not take as long.
Gif of rotation with failed text :)

I'm wondering if anyone could design a Python script/add-on that would take the inputs Latitude, Longitude, and a Path to an image, grab a preset mesh (pin and plane), position it at the "latitude and longitude," and add the image to the plane. It occurs to me that the location would only have to be relative, because one could always use a Vector > Mapping to rotate the map image.

I haven't used it but BlenderGIS might have most of what you want.

Have a look at https://en.wikipedia.org/wiki/Spherical_coordinate_system which maps to  x, y, z based on lat, long.  The radius to the point gives the normal to align z-up to.

If I have understood your video well, the difficulties (I am learning Python) here are linked to several points :

Copy of objects and materials as I have seen no way to change the pictures and colors keeping original pin and card materials
Placement of the pin and card

Copy of objects and materials
Copy of objects is base on this function that creates a new mesh and a new object based on this mesh and link it to the scene. The object is tagged 'CivicCollage' as this will be useful for a cleanup of the generated object, if needed.
def Duplicate( name, obj ):
    newMesh = obj.data.copy()
    newObj = bpy.data.objects.new( name, newMesh )
    newObj.isCivicCollage = True
    bpy.context.scene.objects.link( newObj )
    return newObj

Copy of the materials needs to preserve all the object materials and replace only the needed one (either the texture for the card, or the color for the pin). The trick here is to link these materials at the object level, as if not, this will interact badly with the original objects.
def AssignDuplicateMat( obj, copyObj, mat ):
    newMat = mat.copy()
    newMat.isCivicCollage = True

    for i in range(len(obj.material_slots)):
        copyObj.material_slots[i].link = 'OBJECT'
        if obj.material_slots[i].material.name == mat.name:
            copyObj.material_slots[i].material = newMat
        else:
            copyObj.material_slots[i].material = obj.material_slots[i].material

    return newMat

Once done, using the previous function for both card and pin, we can change either the texture of the card or the color of the pin. This is based on the name of one node of the Cycles configuration :
def AssignColorToMat( mat, nodeName, color ):
    node = mat.node_tree.nodes.get( nodeName )
    if node != None:
        node.inputs['Color'].default_value = (color.r, color.g, color.b, 1)

def AssignTextureToMat( mat, nodeName, image ):
    if image:
        node = mat.node_tree.nodes.get( nodeName )
        node.image = image

The image is previously loaded from a file. We first check if this image is already known, and if not we load it using the combination of a root path and a file name to have the full image path :
def LoadImage( imagePath, fileName ):
    try:
        return bpy.data.images[fileName]
    except:
        try:
            fullFileName = bpy.path.abspath( imagePath + fileName )
            return bpy.data.images.load( fullFileName, check_existing = False )
        except:
            return None

Objects placement
We need some conventions here :

Pin and card are Z up (we see the pin top and the card face from top view)
World sphere is orientated so that 0° in latitude and longitude is at positive X axis

From that, we convert the parameters in radians, then calculate the position and finally the needed rotation (surely that could be shorter, but...). Note that the rotation needs to be assigned in the mode of the object rotation display (here I kept the conventional Euler, but if you are not using it, this code may fail, assigning the values but with no visible results).
def PlacePin( worldLocation, radius, latDeg, lonDeg, scale, pin, card ):

    latRad, lonRad = radians( latDeg ), radians( lonDeg )

    x = cos( latRad ) * cos( lonRad )
    y = cos( latRad ) * sin( lonRad )
    z = sin( latRad )

    location = Vector( (x, y, z) ) * radius
    locationFromWorld = location + worldLocation
    scale3D = (scale, scale, scale)

    aroundZ = Quaternion( (0, 0, 1), lonRad )
    aroundY = Vector( (0, -1, 0) )
    aroundY.rotate( aroundZ )
    aroundX = Quaternion( aroundY, latRad )

    rotation = Quaternion( baseRotationQuat )
    rotation.rotate( aroundZ )
    rotation.rotate( aroundX )

    pin.scale = scale3D
    pin.location = locationFromWorld
    pin.rotation_euler = rotation.to_euler( 'XYZ' )

    card.scale = scale3D
    card.location = locationFromWorld
    card.rotation_euler = rotation.to_euler( 'XYZ' )

Other aspects
I can't detail all the script parts here.
The addon is based on a GUI with two modes.

A manual mode

These parameters are self explanatory, except maybe the nodes : you have to set here the nodes names (as they appear in the node information panel 'N').

A "from file" mode

This mode allows you to generate several pins from a file.
This file is indicated in the first parameter and the last parameter corresponds to the images folder.

For instance, I have used this text file, with fields separated by ';' and with the following columns:

Latitude
Longitude
Scale
R color component of the pin
G color component
B color component
Location name
Image file name
48.8534100;2.3488000;0.05;255;0;0;Paris;paris.jpg
51.500152;-0.126236;0.05;255;0;0;London;london.jpg
40.440624;-79.995888;0.2;0;255;0;Pittsburgh;pittsburgh.jpg
35.6895000;139.6917100;0.1;0;255;0;Tokyo;tokyo.jpg
-22.9027800;-43.2075000;0.1;0;255;0;Rio;brazil.jpg
6.465422;3.406448;0.1;0;255;0;Lagos;lagos.jpg
39.9075000;116.3972300;0.1;0;255;0;Pekin;pekin.jpg
-35.2834600;149.1280700;0.1;0;255;255;Canberra;sydney.jpg

Note about the file data : I needed to add a carriage return for the presentation of the answer, but for the real file keep the lines consecutive (the real file is packed into the blend).

Cleaning the generated objects

Last, the "clean" button allows to delete generated objects and to mark unlinked materials and textures.
This can be useful also because the script may fail if some parameters are not as expected...
Addon
To have an addon from the blend file below, simply save the Python code into a file.py. Or simply run the script directly from Blender.
Note that I have tested all that... but if you encounter some problem, please tell...

great answer going above and beyond ....  could use http://blender.stackexchange.com/questions/19533/align-object-to-vector-using-python from the surface - origin vector to align the objects. Also  bpy.props.FloatProperty(subtype='ROTATION') will remove the need for the radians conversion.

@batFINGER, thanks ! exactly what I wanted to do knowing x, y, z !!


text:
Why can't objects in Edit Mode have their own name?
I've searched so long for the answer and all I ever see is the typical "press ctr + j to join objects, switch to Edit mode, and edit as one mesh", or "make duplicates", or "download the MultiEdit addon", etc.
But even as an 'advanced newbie' I already figured out how to edit several objects in Edit mode, but the problem is, they all share the ONE and SAME NAME.
Object mode assigns each object it's own name - but not in Edit mode.
Is this just the way Blender works? Does it not allow you to add objects with their own name (in Edit mode)?
Thanks SO much for this (possibly) over-obvious answer!!
Shelton

short answer is no. Blender at its core does not let you edit multiple objects at once.

Bummer. Guess i'll have to make do, as i sure can't afford Maya. Thanks David.

If you are editing "several objects" in Edit Mode then they are not "several objects"; they are just meshes composed of separate chunks or multiple connected groups of geometry.
In Edit Mode you can't name them differently because there is nothing different to name, while in Edit Mode you are not adding new objects you are just adding more geometry to the same existing object. They may seem like separate objects but they are not, they are just a "multi part" mesh.
So short answer no you can not name them differently because they are one and the same object and names are applied by object, not mesh chunk.
If you wish you can easily separate them by pressing P while in Edit Mode and choosing By Loose Parts option.

"...because they are one and the same object and names are applied by object, not mesh chunk". - Thanks Duarte!!


text:
Is there a way to combine/flatten multiple edges together that are in a checkerboard pattern?
I've looked everywhere on this and all i see are the typical instructions on how to merge edges together that are perpendicular to each other (such as two cylinders that need to be merged together on there ends using Bridge). But what i'm referring to is two flat planes in the shape of a triangle comprised of multiple edges (that criss-cross together in a checkerboard pattern) which i need to be laid on top of each other and merged (so that it auto-creates all the vertex points proving they've indeed been merged). Does anyone know what to do to accomplish this or is it not possible in Blender. Maybe a addon somewhere?? Anyway, see attachment. Oh and thanks!
Here's the screenshot

You need to post an image, rather than describe it.

What attachment?

I know, i tried, but the page kept giving me the wrong error saying i didn't have enough characters typed in, when all along it was because i attached a pic being a new member without enough credits. Don't know why the webmaster didn't simply code a script to say something like "new users with under 10 credits can't attach pics" or whatever.  Anyway, after trying 4 - 5 times i got flustered and just hit post without the pic. I wish i could have attached it. Now i can only hope someone knows the problem i'm facing without it. I read the new users rule page btw. Thanks for the reply.

Can you post a picture on imgur.com and post the link here?

I hope the mods don't mind my linking to a pic and providing the link in my post. I surely don't deserve 2 negative marks against me when it was the webmasters fault for not having the page trigger the correct - and 'common' i may add - new user error message. Then again, it's possible it could be Firefox's new (squirrely) version that caused the wrong error message, i don't know. Anyway, will edit post soon.

If I'm understanding your question correctly, you should be able to select the 2 planes and Join so they are the one mesh. Then if you select the vertices you want merged you can click Remove Doubles and it will remove the duplicate vertices, essentially merging them together.
EDIT: Now that I understand what you were meaning, the only suggestion I have is to get rid of the vertical edges and create them within the original mesh. I tried it myself and it's a little tedious, but gets the same result I think you're after. First subdivide the bottom edge into how many segments you want, but remember that the Number of Cuts is one less than the number of segments (eg. 9 cuts for 10 segments) and then manually connect each set of vertices and pressing J. If that doesn't achieve the results you're after then I'm afraid I'm out of ideas :)

I already tried that, yet when going back into Edit mode the vertical lines (i.e. edges) still aren't melded together with the horizontal ones. Both the horizontal and vertical lines are of the same mesh, but i can't get them to 'flatten' so that.... you know! .....the little vertices are created. Here's another pic of just the vertical lines/edges selected, above the horizontal ones which are underneath. It's all one mesh. They were two meshes, so i used Ctrl + J to join them, yet after switching to Edit mode you'll notice no vertex points were created. Thanks btw! Pic link:

Wouldn't let me add the pic in the above message so here's a new comment with the pic link. Thanks for the help btw!!  Pic link: http://imgur.com/zi0xEG5

I've just updated my answer which hopefully helps. There's probably easier ways to do it, but I'm fairly new to Blender myself.

That's just it, i need an easier way, as i have about 100 of these to finish and didn't want to use J manually. It would be awesome if the BF devs or someone who knows python, to add in a script to meld large/numerous portions of mesh together. Oh well, time to wear out the J key :)  Hey much thanks for the help Danial. I really do appreciate it!


text:
ASE Export - version 2.73a
I just installed latest available addon script for ASE Export labeled for Blender version 2.56. But I have Blender version 2.73a and that script seems to do not work at all. I can't even see it in list of addons eighter enabled or disabled and it does not appear in the Import-Export list (which it should)
Looks like it is not compatible. When I try to add the ASE Export zip file (io_export_ase.zip) to the addon script installation, it does nothing :(

I'm voting to close this question as off-topic because it's an issue for the ASE Export Addon developer and not directly a Blender question.

@ToddMcIntosh I already asked the developer (or distributor to be correct), so I do not mind...


text:
How to create a object of the server in the client?
I have a server and a client.
The general idea is that the client just gets input from the user and sends it to the server, which updates the scene. Every frame the server updates the common scene according to the clients input and sends each client the current scene.
My current progress is that each client that connects has its own avatar, he can move and see the others.

I want to allow the server to send every type of object, a table for example. I think that the best way to do this is if the server will send each client a bpy script of every new object. The client will run it in a way that it will be the same as in the server.
I want the server to send for every old object everything about it relates to the world- position, rotation, scale etc.

Again, my main goal is to have clients that get input and send it to the server and a server that receives inputs from the clients, updates the common scene and send it for each client.
Any simple and deep suggestion will be great ! thanks.

Is this question for usage in Blender Game Engine?

Yes, it's not the right place to post it?

Yes, it just wasn't clear how you were intending to use Blender in the solution. Also, I think you should narrow down the question to something more specific, otherwise your post will likely be closed for being too broad. Perhaps something related to a specific script to handle client/server communication.

The answer to this question relates only to blender. the server and the client are blender game engine files, using sockets. I really tried to be specific: 1. i need a way to send an object of the server to the client and suggested bge to do it, but I don't no how to apply it. 2. I need a way to apply all the object changes- such as rotating or scaling (I'm currently sending only the world position of every object and it works). If you think that I have to be more specific than that, could you please tell me what is too general?

This is too broad because it deals with several topics each with a lot of possible solutions. It is ... networking. 1. Establish a connection. 2. extract status data from scene 3. send data. 4. apply received status data to scene.  Btw. bpy is the Blender API. You can't use it with the BGE. You need the BGE API.


text:
Boolean Problems
I'm trying to create a sort of cup for printing. I started with a sphere and then a smaller sphere and Boolean differenced to get a hollow sphere. Then I wanted to cut an off-center hole in the hollow sphere by using a sphere or cylinder. I tried to do this again with boolean difference but now it looks like this
How do I join the two together/make faces between the two layers? Or am I just going about designing this all wrong?

I think it's better do all the modelling without thickness and, once finished, apply a "solidify" modifier that will give you the needed inner face. Also the booleans operations, as they create "bad" geometry (triangles, Ngons, no edge loops) should be avoided if possible: the image illustrate a quick way to join a circle (8 vertices) to a mesh sphere (Bridge edge loops) and the result after subsurf and solidify modifier, 2 minutes of modelling.

Another shape obtained with the solidify + subsurf from an UV sphere:

This is what I understood from your response http://i.imgur.com/PBPgfqW.png I'm not sure how to get the cut out to be more or less where I had it in the original post especially as the circle that I created doesn't exactly line up with the surface of the sphere

I'm essentially looking to model this http://i.imgur.com/VrI1oLx.png

Take an UV sphere, delete  some top vertices, apply a solidify modifier, insert some additional loop cut near the edges, add a subsurf modifier, then rotate the mesh in the needed direction. If you want to make the cut in position you will need al lot more of geometry to get a similar result, and you will have to start with an icosphere and boolean cut it with a rotated cube. 10.000 vertices with the first method are smoother than 150.000 with the second. See my updated answer for references.

To flaten the bottom, once you rotated and subdivided but before solidifying, box select some bottom vertices, scale Z zero and move in the appropriate Z location.

Two methods come to mind instantly. The first is manually, where you selest one or two vertices on one loop, either the inner or outer, then select a vertex (if you want the resulting face to be a triangle) or two (if you want the resulting face to be a quad), continuing aroud the the edges until the two loops are bridged. Another may require some fiddling. Select a segment of the loop around the hole in the inner sphere and a segment of the loop around the hole in the outer one, select the two edge loops, and bridge them. The fiddling will be obligatory if the inner and outer loops do not have the same number of segments.


text:
Snapping a vertex group to another
Is it possible that the selected vertices of a mesh move at the position of the vertices of another like the image below? (the number of vertices is same.)
Thanks in advance

Is this question about Blender or Houdini? in Blender you can try Bridge Edge Loops

Destructive Method: Bridge

Duplicate the vertices of the left mesh X. Go to the target mesh, duplicate the target vertices (box select B and duplicate ⇧ ShiftD) and separate them P by selection. Join the target vertices with the original mesh.
Select the outer edges of the remaining target mesh, which are now unconnected (⎇ Alt RMB for edge loop selection). ⇧ Shift select the outer target vertices. Then bridge them with ⎈ CtrlE > Bridge Edge Loops. Recalculate the normals of the target vertices. ⎈ CtrlN

Non-Destructive Method: Shapekeys

Select the vertices in question of the left original mesh. Assign them to a group ('Group'). Create the Basis shapekey and a new shapekey. In the new shapekey, move the original vertices close to the target mesh vertices. (As close as possible.)
Set the Shapekey influence value to 1.0. Add a Shrinkwrap modifier to the original object. Set the target object as Target and the Group as Vertex Group. Set the method to Nearest Vertex. The vertices now snap to the nearest vertex of the target mesh.
Apply the modifier as shapekey. You can delete the temporary shapekey.


text:
Is there any way to save different Startup Files?
So, I like to change, create and edit the Screen Layouts according to what I am going to do in Blender. But recently I had some problems because I have to much Layouts and it is hard to change between Motion Tracking and 3D View (for example).
Is there some way to save different startup files and when I want to do some VFX I open a type of Blender with only some screen layouts that I set and when I want to just model something I open a different startup file with just screen layouts for modelling?

Could you please accept and upvote the answer if it was helpful?

Not currently natively supported, but it is planned for future 2.8 versions.
However nothing stops you from having several template files saved somewhere safe in your computer, and opening them as startup templates.
Create a "Startup Files Library" somewhere in your hard drive, and save all your desired startup files there.
You can add the folder as favorite to Blender's built in file manager, and readily open any file from there whenever you require a specific task.
If you open them frequently they may even get listed in the splash screen at startup for easier access.
One other neat trick you may use is to manually lock your recent-files.txtas read only, and manually edit it to include only your desired startup files, if you don't mind loosing the convenience of having other recently opened projects readily accessible that is.
It is just a simple plain-text file with one file path per line, so you can edit it externally with any notepad like or programmer's plain-text editor editor.
If you know how to code you can also use the Python API or create an addon for your convenience.
You may also create several desktop shortcuts (or Start Menu or saved them anywhere else you like) each with a different command line parameter, specifying a passed file for Blender to open, effectively starting it as a template. All you have to do then is Save-As to the desired location.

Well, you can write a shell script written depending on your OS to replace the startup file from one of two different startup blend files. An easier solution to avoid playing with shell scripting would be:

Download the .zip version of blender twice
Rename the folder of one of them to be "Blender VFX" and the other one "Blender Modelling"
Open the .blender in each folder then edit it to make it look like how you want it to be
Set the startup of each one to what you want it to look like by going to file-->save as startup file
Add a shortcut on Your desktop or something to both blender versions and open the one you want.

Another thing to add is you could make your own shortcut icons, could look nice in a folder of different blender versions. Only problem is if you had a lot of blender duplicates it would take up a fair bit of storage. (PS on step one you don't really need to download blender twice, just once then duplicate it.

terrible solution!


text:
How to combine proportional editing with vertex slide?
So, I am trying to do some basic facial animations with shape keys, and I would like to do most of them with proportional, but also I need most of time to use vertex slide. When I try to do vertex slide + proportional it doesnt work.
Is there any practical way to do that?

I don't think there is, edge slide isn't really meant for operating on complex selections at once, let alone with proportional edit in the mix. But why edge slide specifically? Won't any of the editing operators work for you?

Proportional editing will alter the connected edges which isn't really compatible with using it as a reference to limit the transformation.
If you change the 3D manipulator to Normal you can restrict movement to an axis relative to the starting position of your geometry which might give the result you are looking for.
If the normal of the selected edges doesn't match what you are after you can make a custom orientation from the edge you want to follow before starting to move the vertices.


text:
Rendering faster the transparent areas in Cycles
So, is there anyway to render faster the transparent areas of a 3D animation?
For example: my background is transparent and most of the image will be transparent, but for some reason Cycles takes minutes to render these transparent areas.

There is a commercial add-on that animates the render border. Maybe that will help. https://blendermarket.com/products/animated-render-border/

Branched path tracing is significantly faster on empty background areas since it limits initial samples and instead gathers multiple subsamples: What is branched path tracing and how is it useful?
Some effects such as depth of field or motion blur may need a lot of initial samples anyway though, so branched path may not always be faster. Additionally, it consumes quite a lot of extra memory when running on GPU, so it can easily put a scene over the edge of fitting in VRAM or not.


text:
Surface looks cracked with normal map
I made a sculpt of a head and then made the retopology. Then I made a normal map bake with selected (sculpt head) to active (low poly head), but the normal map looks all cracked, even with smooth shading in both high res and low res meshes... What I did wrong?

Are you using a subdivision surface modifier? If you are, check that the render value is the same as your view value before baking the normal map.

You may have parts of the high res model outside of the low res one.

May be related http://blender.stackexchange.com/questions/60285/how-to-bake-a-cavity-map-from-hi-poly-to-low-poly/60286#60286

You might want to rebake. It looks to me like your normal bake itself is the issue.

I made many bakes... With different models and different configs... But all look cracked


text:
How Split Face Normal after 'make edge' between vertex in N-gon
I just start trying to 'make edge' between vertex in n-gon. but when I select the first half of the face, it still select the whole face. How do i split the face (*green X sign) into two different normal? Thank you :)

To split the face select 2 opposite vertices on the face and use J button instead of F button, in your case you created an edge on top of the face.

Glad to know it, as simple as the answer. thank you Denis and @NovaNanite

I have had this problem before, and the solution is fairly simple. Sometimes when you create an edge on a face the edge is only connected to the two points and not the face, so the line is a separate object from the face. (I still have no clue why this happens). To fix this all you should have to do is go back in to vertex select mode and select the two vertices you want to create an edge between and then press the F key to create an edge. I hope this helps and I'm sorry if you already tried this method to fix it.


text:
Render Environment Map with Blur Effect
I have a scene with a cube inside an icosphere. the cube in the middle is my viewpoint object and i want to render a cube environment map. my environment is the textured inside of the icosphere and some other objects inside the icosphere. now my question is how can i achieve getting a blur effect on any of my objects inside the icosphere? if i put the objects i want blurred in another render layer and set up notes (blur) for it, it doesnt render the effects when i create the environment map.
is there any solution for me?

If your environment texture on the icosphere is unblurred:
Render everything into 1 equirectangular environment map. Blur it in your favourite 2d app (it is seamless so tile it before blurring) or inside cycles nodes with noising the mapping inputs with b-wide node pack.
Then render this blurred environment into the cube map.
If your environment texture on the icosphere is already blurred:
Render the objects inside the icosphere only. Lit them with the environment texture but exclude the icosphere to not reflect on the cube.
Blur this equirectangular inside 2d app to match blur of the enviro and merge them into 1 environment (you will need an alpha channel for this also).
Then render a cube map from this blurred enviro.

You can use material indexes:
select all materials - one by one - wich you want to blur and assign them a "1" index, all the rest can remain  with the default "0" index.
If a material is shared between obiects, create a copy.
You can reach material index in the material proprieties: Blender Internal - option - pass index; Cycles - settings - pass index.
In your single render layer check the "material index" button under "pass" tab.
Then you can use this simple node setup in the compositor:

Working with object indexes is quite similar, of course.

Blurring in compositor nodes will not give you a blurred cube environment map. See how the gray from the ground is bleeding into the blurred cubes? Pls. don't blur objects like this ever..

The question wasn't about blurring the environment map, but blurring objetcs inside the environment. For some purposes you may want to have the surroundings bleed into the object...

The setup the asker is talking about is used to reflect a dome environment map onto a cube and render a cube environment map from it. He also wants to include in this map some other objects inside the dome (icosphere). In realtime graphics a blurred cube map is used for lighting and unblurred for reflections. I hope its now clear. As for your blurring setup - blur the whole image and mix it through a same-amount-blurred index mask, what you did is a compositing crime.


text:
Shadows/lighting not working with image texture
I've been trying to texture a planet with a spherical image that I have. I did a UV unwrap of the sphere and created a new material, then created a new image texture and selected a UV map using map I just created. However, the backside of the planet still seems to be lit when I run the game with the textures turned on, even though without textures, the shading seems to work. These two images are from the same view. Any ideas?

What are your material settings like? Do you have shadows enabled? I do seem to remember there being a bug with image textures in the BGE . . . there was a setting I forgot to turn on, but I can't remember which.

Actually, I was able to figure it out finally. It had to do with GLSL shading settings not being quite right. Thanks though!

Go ahead and add it as an answer then :)

authors: Александр Пенно


text:
Why is my mesh moving away?
https://youtu.be/6KdnZn2Wf9M
You can see in the video that the mesh is moving down and separating from the bones when the animation is playing. I deleted the animation and made a new simple animation and the mesh is still moving down.

you probably have some physics on it

Do you have physics enabled? It looks like the object is falling due to gravity


text:
How to use a Letterpack?
I just downloaded my first letterpack, but I don't know how to use it.
Do I have to move the wanted letters to another layer or copy them to another project and if so, how?

What specifically are you stuck at?

I found it, Ctrl + C and than paste it in another one with Ctrl + V.


text:
How to straighten distorted edge
I'm using the subdivision surface modifier and noticed that on section of my mesh, the edges are very distorted. I've tried scaling along an axis, editing when subdivision modifier is off, tried pulling vertices to try and line them up properly but can't seem to get it. Lines look normal when I turn modifier off. (See 2nd image in object mode)
Sculpt mode seems to jack it up even more. But perhaps I'm not using the correct tool.
Any suggestions on how to straighten or smooth the edges so that the mesh is smoother?

Possible duplicate of Weird line in my mirrored mesh

So I may have fixed my own problem. It seems that there was a duplicate edge in there that was causing it. Removed and recreated the faces and that seems to have fixed my issue.


text:
Background Green Screen Refuses to Render
I tried a few threads already on Blender Stack Exchange:
How to render a background image in 2.8?
How to render a background image correctly?
why the background image I add not show in render?
I'm using 'Images as Background' add-on. I've tried the 'Film' 'Transparent' recommendation. The render icon is on in the outliner. I've messed with the nodes all day. Nothing seems to be working.
I made an animation in 2.79, and I opened the file in 2.83,(I checked the box to not load the UI thing) so maybe a few bugs from the old one got into the this file because I tried loading up a new 2.83 file and the background rendered just fine with no modifications.
I am using HitFilm 3 Express as my video editing program, I am more comfortable with it than Blender's internal video editing software. So I'm rendering out a greenscreen for the program to use.

Why this green backdrop? Suggest render your object (foreground) with transparent background enabled.

That would be another option, yes. This option was linked to having a background image actually render with another project of mine, however transparency would be better.

That's the only option for a nice comp, ideally rendered to openexr: https://blender.stackexchange.com/questions/106670/compositors-corner-pin-node-does-something-odd-to-input-image/106671#106671

So immediately after writing this post, I had a realization. Sometimes objects don't show up in the 3D viewer, so you increase the distance you can see by hitting 'N' and going to 'View'. However I can already see it in the 3D Viewer, but then I thought that there were different properties set to the camera than the 3D Viewport.
There is a post that deals with this, which makes my post a duplicate.
How do I increase the render distance?


text:
Reset Rotation , Translation and Scale of bones through Script
Like we do it by using shortcuts

ALT + R to reset all rotations,
ALT + G to reset all translations,
ALT + S to reset all scales.

Is there a proper way to clear the pose through script.
Below is my code, I know how to select specific bones, but am not sure about a way to reset the rotations , translations and scales of those bones.
bpy.ops.object.mode_set(mode='POSE')
arm = bpy.data.objects['Armature']
bpy.ops.pose.select_all(action='DESELECT')

for pb in arm.pose.bones:
    if "Spine" in pb.name:
        arm.data.bones[pb.name].select = True

Thanks in Advance

You can:
import bpy
from mathutils import Vector, Quaternion

arm = bpy.data.objects['Armature']

for pb in arm.pose.bones:
    #Set the rotation to 0
    identityQuaternion = Quaternion((0, 0, 0), 1 )
    pb.rotation_quaternion = identityQuaternion
    #Set the scale to 1
    pb.scale = Vector( (1, 1, 1) )
    #Set the location at rest (edit) pose bone position
    pb.location = pb.bone.head

Set matrix_basis to Identity
Following will reset transforms on all selected bones of the active object.
import bpy
from mathutils import Matrix

context = bpy.context

for pb in context.selected_pose_bones_from_active_object:
    pb.matrix_basis = Matrix() #  == Matrix.Identity(4)

Using matrices per component
The above will reset all.  What if we only want to reset one or two of the three components.
A matrix can be decomposed into its components and recomposed.
import bpy
from mathutils import Matrix

context = bpy.context
pb = context.active_pose_bone

M = pb.matrix_basis
loc, rot, scale = M.decompose()

T = Matrix.Translation(loc)
R = rot.to_matrix().to_4x4()
S = Matrix.Diagonal(scale.to_4d())
I = Matrix()

# is it the same?
assert(M == T @ R @ S)

If we wish to reset only rotation
M = T @ I @ S

and since I is the matrix equivalent of 1
M = T @ S

Perhaps set up a helper method
reset_pb(pb, reset_location=True, reset_rotation=True, reset_scale=True):

make a matrix for each component, eg
T = I if reset_location else Matrix.Translation(loc)

and set the matrix
pb.matrix_basis = T @ R @ S

Invoking These methods after selecting bones will clear Rotation , Scale and Transform
bpy.ops.pose.rot_clear() //To Clear Rotation
bpy.ops.pose.scale_clear() //To Clear Scale
bpy.ops.pose.transforms_clear() //To Clear Transform

Have the armature object of which you want to reset the pose bones selected, then run one of these two script.(work in object, edit and pose mode)
Reset all pose bones:
import bpy

for n in bpy.context.object.pose.bones:
    n.location = (0, 0, 0)
    n.rotation_quaternion = (1, 0, 0, 0)
    n.rotation_axis_angle = (0, 0, 1, 0)
    n.rotation_euler = (0, 0, 0)
    n.scale = (1, 1, 1)

Reset pose bones from a list:
import bpy

resetBoneList = [ "boneName1", "boneName2", "boneName3"]

for n in resetBoneList:
    if n in bpy.context.object.pose.bones:
        bpy.context.object.pose.bones[n].location = (0, 0, 0)
        bpy.context.object.pose.bones[n].rotation_quaternion = (1, 0, 0, 0)
        bpy.context.object.pose.bones[n].rotation_axis_angle = (0, 0, 1, 0)
        bpy.context.object.pose.bones[n].rotation_euler = (0, 0, 0)
        bpy.context.object.pose.bones[n].scale = (1, 1, 1)

One of the solution is to

go in pose mode
select all bones
clear transforms using bpy.ops.clear_transform()

Note: using ops, we need to take care of context. Ensure that you are in pose mode and active object is the armature. Else context error will come. You can ensure that by
meshname = "mesh_1"
bpy.context.view_layer.objects.active = bpy.data.objects[meshname]

Switch to Pose mode using python
 bpy.ops.object.mode_set(mode = 'POSE')

and now you can use bpy.ops...
def clear_all_transforms():
  bpy.ops.pose.select_all(action="SELECT")
  bpy.ops.pose.transforms_clear()
  bpy.ops.pose.select_all(action="DESELECT")


text:
Blender Texture Paint applying to incorrect object
I have an object in Blender, and have disabled visibility of all other objects in my scene. It is already  UV mapped and set up with a material. However, whenever I go into texture paint mode, any strokes that I place get applied to the incorrect image (one for another object), even though that object has dissapeared
Here's the interface

However, whenever I try to paint on it, it gets applied to a completely separate texture.

Go to the Slots tab of the tool shelf in texture paint mode.
Now there are two Painting Modes here Material, which I will talk about first, and Image.

When set to Material (as in the image above), all Image Texture nodes in the selected material are displayed as Available Paint Slots. All you have to do is choose the correct "slot" or texture, and paint.

Note that the Image Texture node does not have to be connected to anything, and it does not even have to be the active node anymore. (yeah!)

Now when the Painting Mode is set to Image, materials no longer matter, only the images. The image field under Canvas Image, is where you select what image to paint on. If you don't have on, there is a button to create a new one.

Having said all that, your problem is that you are no painting on the image you think you are.
Just the way you describe how it show up on other objects meas that, you are painting on an image that some other object is using.
Check the painting Slots as I explained above.


text:
Getting rid of fireflies on render
This question has been asked a few times before, but even after following tutorials such as this one
and following the settings, I've been unable to get rid of fireflies in my render. The current render looks like this:
What additional steps can I take to decrease the amount of fireflies / reduce graininess in my renders? I've tried clamping and all of the other techniques in the tutorial but it doesn't seem to help, or at best, has a minimal effect.
Here's the model itself. It's pretty simple, no textures (just shaders).

For reference, the blend file is here: https://transfer.sh/yITqe/spaceship.blend

Increasing the samples amount helps enormously in your scene.
Also, you are mixing up the terms a bit. Fireflies are those white pixels that wont go away even when rendering with a lot of samples.
What you are experiencing is just called noise.
Result with 1000 samples:

I guess I wasn't giving it enough time - when looking at the top left of the viewport now, I see how many samples it has gone through

On a side note: unshaded test renders are often noisy since the plain white clay shaders reflect a lot of light, and don't hide noise well. The darker your surface, the less energy you end up with in noisy indirect light. And noise is harder to spot on textured surfaces since the surface itself is "noisier" in a way


text:
Having troubles finding Regular Solids with blender 2.78
I am new to Blender and I have been watching a video tutorial on how to create a soccer ball. So this guy went to Addons then Add Mesh and he enabled Regular Solids. I am using blender v2.78 and I don't have this option. I am trying to create a Truncated Icosahedron shape.

I did see that answer but he didn't show how to make a Truncated Icosahedron shape. Anyways, I got my answer!

1- Go to File -> User Preferences -> Add-ons and under Categories click on Add Mesh and enable Extra Objects.

2- Click on Add -> Mesh -> Math Function -> Regular Solid.

3- Press "T" to bring up the tools (if it is not opened already) and under (Regular) solids scroll down till you see Presets and select "Truncated Icosahedron".

Good luck!


text:
How create a desert like this in Blender?
Is it possible to create this desert in Blender?

You could try something with the Ocean modifier.

It also can be done with microdisplacement but I don't know how to do one slope with wrinkles and another without them.

Certain type of layout for the texture. the yellow Squares should be the most Related to the topic. My source https://www.youtube.com/watch?v=eDuArvDdRu4

For youre purpose you could use the Landscape add-on (Preferences -> Add-ons -> Categories/Add mesh -> ANT Landscape) or the Ocean generator in Blender. The Ocean modifier might work the best because you want such sharp dune cresps and a desert is very similar to an ocean cause it is influenced by wind just like oceans. Add a plane to the scene and add the ocean modifier. Play around with the settings until you are satisfied. Use the "Choppine" slider to sharpen the cresps and the scale to adjust the height of the dunes. Leave the Resolution at a value around 10. You don't want to much detail in that scene. Now you have got the basic shape of the desert.
The secret to make it looks very realistic is the texturing. I don't know how far you are in that but you will definitely need a so called "bump map" for the shape of the small grooves on the dune slope.


text:
Creating correct proportions for Minecraft projects
I apologize if the question isn't very specific; I can't think of any other way to word it.
I'm looking to make Minecraft animations with Blender. One of the big obstacles I've run into is the proportions.
Say, how can I make a Minecraft character the right size to fit with the Minecraft build I have in an obj? This doubles for other entities, such as a creeper, a pig, etc.
I've looked up tutorials on "How to make a Minecraft animation with Blender," but they all (by "They all," I mean all the ones I've seen) tell you to download a starter .obj, which I really don't want to do.
I love being able to create anything and everything in Blender from scratch, but if I use a starter .obj, that ability isn't there at the point I'd like it to be at.
Thank you in advance!

Have you considered downloading the starter .obj anyway and loading it and making notes about the dimensions? Once you know those you can discard the starter obj. and fix your own.

I haven't, but that's a very good idea... Thank you! I'll give it a try.

I gave an answer here: https://graphicdesign.stackexchange.com/questions/82249/what-is-the-easiest-way-to-convert-2d-images-to-single-3d-model   that covers how to relate blueprints to ¾ view with specific rules. I invite you to take a look, hopefully you find it useful.

I think this is more of a 2D/drawing question so I'll keep my answer very light.
It’s all in the references. You need to find a front view and a side view that are as close to actual size as possible. In other words they have to look similar to blueprints. Then you just need to measure, like with Gimp, and see the ratios. If the vertical is 10 and the horizontal 7 from the front view and 10 and, say, 5 in depth from the side, then you obviously have a 7 to 5 ratio from top view. As a note, if the objects are at different relative sizes, you can scale one of the images until the verticals coincide. It can be done by numbers too, but I don’t think is necessary to explain.
So ideally is to make the images yourself and get the desired angles. Proportions can be extracted from a  ¾ quarter view too, but, again, I don’t think this is a Blender topic, rather a drawing one.


text:
Cannot load movie files on Ubuntu
I am starting to use Blender to edit videos on Linux.
What it's wrong if I add a movie in avi format and it only works on Windows but not on Linux? In Linux it says that file cannot be loaded. If opened by terminal, it says "not an anim: /home/matsetes/kdenlive/Minetest mod spotlight 4.avi"
I am using Ubuntu latest version and I installed Blender from the repository, but I tried also compiling it.
Perhaps it's a problem with some codec on Ubuntu? I am able to open these files on Ubuntu and also edit them with Kdenlive.
Thank you for all, guys =)

Sounds like perhaps the version of ffmpeg you have doesn't have a required codec (ffmpeg is the encoding library blender uses). See the ubuntu docs for info on installing more codecs.

I have installed all the codecs that I know and that I can find. The file open with every program but not with blender

Hm.. Is it possible you could upload a file that exhibits this behavior?

You mean one file that cannot be opened?

I solved, after two months from when the problem occurred. I used the irc chat and three or four forums and, of course, Google.
The page that helped me a lot is https://developer.blender.org/T28790
where it says that is a problem of ffmpeg with the compiling of GCC. You can solve that downloading the precompiled version here https://builder.blender.org/download/
It doesn't work if you compile the version and also the repository one does not work.
I answered my question to help all the people that will have the same problem =)

Each person is only allowed to have 1 (one) account on any given StackExchange site. Duplicate accounts will be dealt with accordingly. You can always answer your own question, using the same account.

@NoviceInDisguise No, you can have as many accounts as you want and that is perfectly legitimate. However, when you start inter-voting between your accounts, then it is considered reputation fraud and "will be dealt with accordingly"

@X-27 True, very good distinction to make

Sorry, I didn't noticed that in the first one was from google and the second one with an official account, my fault...

@Matsetes No worries, I'll let one of the moderators know and they can merge the two :)

"It doesn't work if you compile the version and also the repository one does not work." --- This isn't true, Of course you can compile working builds with ffmpeg, otherwise - how would we do our releases? You just have to make sure you have the right ffmpeg package and enable ffmpeg in the build option. (See own answer)

Just as a rule of thumb, unless you're extremely confident in your compiling abilities, always use the precompiled builds from Blender.org. Most of the time, they're most stable, they also have basically everything enabled and working, so if you're having codec issues or something of that nature, it's likely that it will work in an official build.

If you're building from source make sure the CMake option WITH_CODEC_FFMPEG is enabled.
This will use your system's ffmpeg library. Supporting codec's its built with.


text:
Applying displacement to complicated face
I have a wall with windows, like this:

I would like to apply a displacement map to the wall. However, this would require some form of subdivision of the face, which would be kind of messy. Is there a more elegant solution?

you can fake the displacement with a Normal map or Bump map

That's the method I'm using right now. I was just curious as to how I would get displacement on a surface like this if I really wanted to.

I'm not sure what you mean, normal or bump maps plugged into normal or bump nodes don't need any subdivisions, so are you not confusing things? Or please give some precisions...

I'm talking about displacement maps, the ones which actually modify the geometry of the mesh. I am aware of bump and normal maps.

I talked about Normal and Bump because it would have been "a more elegant solution", other than Normal, Bump and Displacement I don't know, but again you don't give enough informations, for example what your wall is supposed to look like at the end, why don't Normal, Bump or Displacement fit your needs, etc... ?

Sorry for not being clear enough. I am currently using a bump map for the wall, but I was wondering (purely out of curiosity) how I would neatly prepare a mesh like this for displacement. I've since determined that using a boolean modifier for the windows (instead of having them a part of the mesh) makes it easier to subdivide the wall. Thanks for helping, though.

I don't see any relation between the windows and displacement, you could't not create window with displacement, maybe give more precisions because in my opinion your question is too vague


text:
How do I Paint on has an Image that is used as Texture?
(I don't have any access to external programs, nor the patience or time to learn them. I want my Blender problems to stay in Blender.)
I have a Picture inside my UV Editor, and I wanted to know a way to apply a material, color, or paint to affect this image, or my mesh.
'This picture wraps around my barrel. I have cracks in the wood itself, and separating the individual planks. I want to apply 'black' to those cracks.'
I wish I could provide visuals, but apparently the 'Blender Forums' doesn't allow 2 images.

To paint on a mesh in Texture Paint Mode you need a UV unwrapped mesh.
Then, there are a couple of options:

Paint on a texture using the UV editor.
Enable Paint Mode and press T to bring up tools for painting
The image below shows where you toggle paint mode on

Choose the tool you want to use, and paint directly on the image.

(Please see this link for more info)

Paint using the 3D viewport.
Enable paint mode, select your tool and paint directly over the mesh.

IMPORTANT: After you've painted on the texture you need to save the image on the UV/Image Editor. Use Save Image on the menu or AltS to overwrite the original image with the changes or use F3 to save as a different file)

If you don't save the image and close blender, all of your painted texures will disappear forever
You might also find this pages from the blender manual useful:
Texture Painting
UV Unwrapping a Mesh

Added picture for find texture paint mode on 3D view now.

So cegaton... you edited pretty much my whole answer instead of making your own... nice one

I saw your previous comment Ari. Yeah, that was a dick move by his part. But unfortunately I can't do anything about that. Thanks for the help.

authors: Андрей Киндратко


text:
3D Manipulator/Origin behaviour issues due to 'Displayer Modifier'
https://youtu.be/lXeRm33Xi8E
The 3D Manipular/Origin of the individual vertices are not correctly visually displayed.
After the 'Display Modifier' is checked in an Armature Modifier to display the pose of a object in edit mode. The data for the 'origins' of the vertices remain the same, acting as if I am still looking at the 'Rest Position' instead of the 'Pose Position'
Their is some variable I am unaware of that makes it so the data, matches up with the visual aid.

No, there is no variable that allows you to do that.  But what you should look into is the Corrective Shapekeys addon, which basically makes a mesh from your pose for editing, then restores the models original pose when you're done editing.  It's bundled with Blender, you just have to enable it.


text:
How to increase the decimal length for edge info
When I enable my mesh display, and click on the edge info. The only information I get back is a whole number, and a decimal point to the nearest tenths place. This is because the length is past the 100 mark, if it was 99, it would have the decimal increase to the hundredths place.

This is a brand new file, no extra information is added except the default cube.
There has to be somewhere to increase the length of the decimal places to be shown through edge info.

A temporary fix to this, is to make the whole number, and then add the smaller length at the end, then once you are done. You can just dissolve the middle edges.


text:
rendered game doesn't work properly
I created a game in blender game and rendered it. About 10 renders worked as expected, but since then every time I am trying to render it by: "Save as blender game engine" it doesn't. I have a menu which works perfect, when I press play The scene is being displayed as expected- all the meshes and the materials. The problem is that when I shoot on a door and it suppose to get opened- nothing happens. I can move, but only that method doesn't work. In blender (where I press 'p') it works. I have no idea what I did that caused this to happen. I assume it relates to the render settings because everything works properly in blender but I really have no idea how a render setting can affect something in the game. "Automatically pack into .blend" is checked, and there is a script I'm sure to be working.

I suggest to ask something like that in a forum, such as blenderartists.org. This question is too broad and belongs to your specific game.

OMG thanks!! ;) i opened blenderartists.org searched for save as blender game engine, then found this http://blenderartists.org/forum/showthread.php?394370-White-screen-of-doom&highlight=save+as+blener+game+engine and run the game via cmd- I had an error, "import bpy" which cannot be imported. Now it works :)


text:
Move edges closer to origin
Basic example I've got a cylinder and I want to move half the edges closer to the centre of the cylinder. I thought selecting every second edge and scaling constraining X & Y (Not Z) axis only would work. But it doesn't seem to have any visible effect.
I am using 2.8 if it makes any difference.

Make a note of your Pivot center, and include it in your question.. also look out for the 'Manipulate Center Points Only' setting.

In Blender 2.80 (Beta) it works still the same as in Blender 2.7x
With the edges selected, hit S, then Shift+Z to scale the vertices along the X and Y axis.

Thats what I did. It didn't work. I tried changing the scaling mode too but no avail. Okay its not working in that particular file. I must have changed some option somewhere.

Yet it is still working for me. Hit S, then Shift+Z at the same time.

Okay in a brand new blend file. It works for me. In the existing file it doesn't

The reason it wasn't working is that I had my piviot point set wrong.


text:
Fix symmetry before retopology
Given a model that was symmetrical but who now no longer is. Is there a way to delete half the model and remirror or to straighten the symmetry out.

You can see in orthographic mode that the top (and front) of the model now no longer aligns with the z axis but the middle does.
There is a multi res modifier on it at the moment in case that makes any difference.

Idk if this can work for you, but there's also an edit mode "symmetrize" tool that can help to make a mesh symmetric in another way:
eg: from this

you get this

Thanks I tried that it seemed to mirror on top of itself.

Try this:

This will almost certainly screw up your Multires modifier, so apply it.
Select a vertex on the one half—say the left one—and hit Ctrl+L to select everything connected to it.
Delete it with X.
Move the boundary of the top section to align with the Z-axis.

You can try SX0 and then setting X to 0 in the transform properties, you'll probably still have some cleanup to do even if you use proportional editing.

Go out of edit mode and use a mirror modifier. (If I remember correctly, there's a Remove Doubles option you should use.)

Applying the multires modifier crashes my laptop or when it doesn't it makes it unusably slow.  :(

Hm. Are you sculpting? Try the Apply Base button and then either just removing the modifier, or stepping down the resolution and then applying it. (The reason I said to apply it in the answer was because I didn't want you to lose all your sculpting work.)

Thanks seaturtle I've voted you up but i'm just simply not going to be able to remove half after the modifier is applied. Theres 5 levels of subdiv here. I can remove the edges in edit mode like the top pic anything above that and its hard to even see what the central vertx loop is.

Hm. Does stepping it down before applying it help? How about orthographic mode (Num1 then Num5)?

Wireframe just displays as a solid outline thats how dense the subdiv was.  I've removed half in edit mode for the moment but accidently saved over origional file.

Blender saves backups (by default, only one), named .blend1, .blend2, etc. Hopefully one of those will be the original file you need.


text:
Going from an area of low information density to high density
Consider the following, I've got a mesh already that is in the general shape of my model. However I want to add detail like adding an eye to the general shape.
Example (attempt at modeling bullet bill)

What I'm attempting to do is keeping quads somehow split the edges around the eye area (marked red) and join the two seperate pieces of mesh.
How would I about attemting something like this. I assume I need to split the edges to add in poles at the front and back of the eye area. but then how do I insert quads so that they all match?
In this image its been brought a bit forward from the model just to show the example.
But in general how do I add detail to a portion of a model without adding loop cuts everywhere?

https://topologyguides.com/post/140479921825/cutting-custom-shapes also https://topologyguides.com/post/152907366360/cutting-circular-holes-in-curved-surfaces

I think there's no scientific way to learn how to do it, at least in my case I'm still learning day after day how to do it, I guess you just need to try how to join, merge vertices, use the knife to create edges, etc... and keep quads as much as possible, then tris if you don't have choice. Actually each case is a particular puzzle.
Duarte has given you links and it explains how to go from 3 edges to 1, etc... I guess it worth a look.
Anyway, to begin I've separated the eye mesh, then I've used the Knife Project tool to print the eye shape on the rocket mesh.

Looks good. Are you using concave quads oround the lower area though? Actually I guess it just looks like this from the sub serf modifier

concave quads? I'm not sure what you mean. Of course you have to be sure that your modifications won't affect the whole profile. You can use a trick if you want to keep a good round shape: keep the original rocket (without the eye topology) and shrinkwrap the new mesh (with the eye) on this original object.


text:
Fakery: High Resolution Fluid Sim
I want to make an animation of an arrow (like from a bow and arrow) piercing a raindrop. Pretty quickly, it occurred to me that if I want to make a rain scene straight up, I would have to use a gigantic domain and extraordinary resolution. In addition to being probably not the best idea, I'm working on an 8-year-old computer which can't do that kind of hard core simulating.
What I'm asking is what is the best way to make a rain scene that can be interacted with? I'm fine with any sort of fakery as long as it looks decently realistic.

I don't know a whole lot about this sort of stuff, but it seems like you could simulate most of the rain with a particle system and then only do a fluid simulation for the raindrops that the arrow pierces.

You definitely don't want to use a fluid simulation for rain. I'd use a particles system for the general rain in the scene. You can use Dynamic paint to make the particles interact with a "water" surface to make ripples (without actually using fluid sim).
For the arrow piercing a raindrop, that's more like a hero shot, up close in the foreground. I'd probably use soft body physics on the raindrop as it will be large in the shot (possibly), and at that size the surface tension of the water drop will be more like a gel object instead of flowing water (until it bursts). The trick is once the arrow pierces through and breaks the surface tension. At that point you do want something more like a fluid sim effect to show the displaced water splashing out around the arrow.
Here's a quick mockup of the fluid sim for the hero rain drop. Note I went for a slow motion look and decreased the gravity to -1m/s2.


text:
Question from a AutoCAD drafter / aspiring Blender 3D modeler. Is there any draw tools in Blender that are similar to AutoCad?
As the title says I use AutoCad on a daily basis and a novice Blender user. Mainly 2D drafting is what I work with in AutoCad. I got to thinking about if Blender has any mesh modeling tools that can do stuff like in AutoCad with mesh models.
Offset tool
Is there any type of offset tool in Blender? In AutoCad, the offset tool can copy a line or arc and displace the copy to a specified dimension away from the original making them parallel to each other.
From Base point tools
In AutoCad, tools like copy, mirror, scale, rotate, etc. let you select a base point to work from. For example if you were to scale a circle up in size, AutoCad lets you pick a base point from a snap point or empty space and it will scale from there.
If you know any other tools that are similar that I havn't mentioned and would like to share, it would be very helpful.
Thanks

I don't have any experience with AutoCad but I can tell you that these all sound perfectly possible.
Offsetting sounds like simple duplication. Shift-D the object or part of the mesh you want to copy and then move it, restricting to an axis (via X, Y, or Z hotkeys) to keep it parallel. If you want the new mesh to always resemble the old you can make a linked duplicate with alt-d. The new mesh will mirror the old one any time you edit it.
As a 'base point' blender has the '3D cursor', that red and white circle you always see. Left clicking places the cursor and then by pressing the period key (not on the numpad but on the keypad) your transformations will use it as a 'pivot point' (blender lingo). If left clicking isn't accurate enough you can make the cursor snap to the grid or to any vertex or object center you select (shift-s to bring up the snapping menu).
Blender is extremely capable, but probably has different names for most tools. It has less of a focus on precision and more on artistry than CAD programs from what I understand, but you can make it work. I've watched interviews wherein car engineers and designers started their visualization with blender and then brought it into AutoCad to tweak later.

I think HowToBlend has done a pretty good job of answering the specific questions in your post. Two things I would note: although I am not facile in Autocad, either, I suspect that most of the Autocad funtionality is present in Blender, perhaps not under differently named tools, but some functionality may be spread across different tools, including modifiers and add-ons. Also that Blender has import or export capabilities for a lot of file formats, including Autocad's ~.DXF format, so you may be able to export from Blender (and back) if you find some tool you need that isn't yet in Blender.

I am an autocad user myself, all I can say is that blender have it personal touch in workflow. Blender will never have the precision that autocad is required to have. But if you work with blender long enough , you will find that the tools that blender offer are pretty comprehensive and sufficient in a regular architecture modeling environment. In fact I personally like blender over 3d studio max , the latter which I have used for over 12 years.

While I can't compare with autocad some things that may interest you -
The manual page on numeric input can expand on moving/scaling/rotating by exact amounts, you can also enter expressions which can include unit measurements (mm, cm, ft, yards) to calculate the value, which can also be used during a viewport transform after pressing numpad * or =
There is a ruler and protractor included with blender.
You can display edge lengths and angles while you are editing.
Antonyioya has a measureit addon.
You might find tinyCad to be a useful addon.
Maybe a little further out there is sverchok which provides node based parametric mesh creation, with animation nodes providing some of the same functionality but more focused on object manipulation.


text:
Under what conditions does "select non-manifold not show up in the select menu?
I use blender to create designs for 3d printing.   I use select non-manifold a lot to look for problems as I work on a design.   I see that sometimes select non-manifld doesn't show up in the select menu.
I don't know if it's just for the more complicated designs or not, so I'm wondering if anyone knows under what conditions select non-manifold is not available.

You must be in vertex-edit mode in order to have that option.
Edit: orrrr edge-edit mode, confirmed.

It also works in edge mode. as stated in the other answer it is now under the  "Select all by trait" menu and will only show up if you are currently in Edge or Vertex selection mode

yes.   I recently switched to the latest version.  I think a combination of not always being in the right edit mode (under the old version) and the new version moving it cause my confusion.

The latest version of Blender moved "select non-maifold" to a sub-menu under "Select All by Trait"


text:
Pack instances of object on surface of mesh
I'm trying to achieve something like this (https://www.instagram.com/p/B9E5hH-oKi8/) with blender.
Is there any way I can achieve something similar? Maybe by using a force field and a particle system?
I've been fiddling around with hair partlce systems but I couldn't figure out a way to not have instances overlapping, and the tests I've been doing with force fields seem not to nail it either. THe best thing I could achieve was particles sticking to the closest section of the target object, but not flowing evenly like in the shown video.
Thanks in advance :)

I'm not sure it exists in Blender but you can use the Tissue addon as explained here: https://blender.stackexchange.com/questions/194667/how-i-could-replicate-this-bumpy-texture/194677#194677 ... as Tesselat uses the faces of your object, make sure that your quads are even, if they are not, duplicate your object and Remesh with the Voxel method

I need the faces to be all the same size in order to achieve something like in the video, and both tesselate+voxel and dual meshes don't really nail it. Moreover I'm aiming at something that doesn't destructively predetermine the faces' size

yes but you could duplicate your object, remesh the duplication and make it invisible, it's just a trick in case you don't find the solution  ;)   it would be better to have an option that prevents particle overlapping and allows a perfect even emission but I'm not sure it exists yet


text:
Python: Calculate angle between vertices
What should I do to determine the angle on XYZ between two vertices?
I then have to rotate a mesh accordingly, but I guess that's a basic task to achieve.
I'm new to bpy and I should have payed more attention during my maths classes, i suppose.
Here's a graphical representation

I need to know the angle of that orange segment
Thanks in advance :)

The angle in relation to what?

Global x, y and z. Sorry for the omission

You describe an edge by declaring two vertices. You now need to declare another edge - the x, y, or z unit vectors (only one) - or a plane - the xy, yz, or zx (only one) plane.

why should I do this? How could it help me with the script?

Because you can only calculate an angle between two vectors / edges. You might wanna take a vector math course.

You can get two selected vertices via bm.select_history and calculate a direction vector, then measure the angle between this angle and the up vector (0, 0, 1) in radians and convert it to degrees (below script prints the smaller angle):
import bpy
import bmesh
from math import degrees, pi
from mathutils import Vector

ob = bpy.context.object
assert ob.type == 'MESH'
me = ob.data

bm = bmesh.from_edit_mesh(me)
verts_sel = [el for el in bm.select_history if isinstance(el, bmesh.types.BMVert)]
assert len(verts_sel) == 2

v1 = verts_sel[1].co - verts_sel[0].co
v2 = Vector((0, 0, 1))

a1 = v1.angle(v2)
if a1 > pi * 0.5:
    a1 = pi - a1
print("{:.2f} degrees".format(degrees(a1)))


text:
BGE place object on 3D graph based on user input?
I'm putting together a simple political graph for a friend of mine. For example, the x-axis represents economic freedom, while the y-axis represents political freedom, and the z-axis represents personal freedom. What I'm struggling with is having BGE ask the user three questions(or more in the future) for determining their political position on each axis, and then have an empty navigate there and spawn a sphere.
Here's a link to the file so far:
https://drive.google.com/open?id=0B6_5f6jmSaHOQ0g5RWxhRDBkWG8

I do not think the BGE is sufficient for text interaction or diagrams. It is possible, but not easy.
I suggest you look at something like presentation and/or table calculation applications.


text:
Can a surface reflect in black and white?
So I have a gold glossy surface above a plane, and I want the plane to have a black and white reflection of the gold surface. I'm using Cycles Render and the latest version of Blender.
Here's a diagram to show you what I mean:

Glossy object right here -> O
< <- Camera
_______________________ <- Glossy plane

I want the object to be gold, and I want its reflection on the plane to be black and white.

related to this : http://blender.stackexchange.com/questions/52586/how-to-change-color-of-glossy-highlights/55834#55834. If I understand well, you'll need to use the compositor for the effect you want

You can use the light path node. This node allows you to use different materials for each incoming ray type.

However, this approach is not ideal, since you have to modify the object's material and not the glossy material itself, which becomes almost unmanageable quickly.


text:
Blender Game Engine python loop issue
I have a python script that moves a sphere around. This is basically the start of a snake game. The problem is that the ball stops moving if the keys aren't constantly held down. What I need is for the ball to keep moving in the last direction given by the keys. I think it has something to do with the fact that the script is restarted and the variables reset each tick...
This is the code I'm using:
import bge
U = False
D = False
L = False
R = False
def main():
    global U
    global D
    global L
    global R
    cont = bge.logic.getCurrentController()
    own = cont.owner
    keyboard = bge.logic.keyboard

    wKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]
    sKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]
    aKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]
    dKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]

    if wKey and (D == False):
        U = True
        D = False
        L = False
        R = False
    elif sKey and (U == False):
        U = False
        D = True
        L = False
        R = False
    elif aKey and (R == False):
        U = False
        D = False
        L = True
        R = False
    elif dKey and (L == False):
        U = False
        D = False
        L = False
        R = True
    if U:
        own.applyMovement([0,0.2,0],True)
    if D:
        own.applyMovement([0,-0.2,0],True)
    if L:
        own.applyMovement([-0.2,0,0],True)
    if R:
        own.applyMovement([0.2,0,0],True)
main()

This is a link to the file on my Google Drive:
https://drive.google.com/open?id=0B6_5f6jmSaHOUW1wTGVlRXFkVUE

I'd suggest if  you are going to use global variables, then run script as a module, otherwise would need set up Boolean properties on object and use them to keep tabs on U, D, L, R.

Slight change to code, the controller is automatically passed to the module, which needs to have the .py extension.
import bge
U = False
D = False
L = False
R = False
def main(cont):
    global U
    global D
    global L
    global R

    own = cont.owner

    keyboard = bge.logic.keyboard

    wKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]
    sKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]
    aKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]
    dKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]

    if wKey and (D == False):
        U = True
        D = False
        L = False
        R = False
    elif sKey and (U == False):
        U = False
        D = True
        L = False
        R = False
    elif aKey and (R == False):
        U = False
        D = False
        L = True
        R = False
    elif dKey and (L == False):
        U = False
        D = False
        L = False
        R = True
    # test print
    print(U, D, L, R)
    if U:
        own.applyMovement([0,0.2,0],True)
    if D:
        own.applyMovement([0,-0.2,0],True)
    if L:
        own.applyMovement([-0.2,0,0],True)
    if R:
        own.applyMovement([0.2,0,0],True)

Thank you for the help! I used your code and instructions, and it works, but the ball still stops when the keys aren't being pressed. I don't want the ball to be able to stop once it has started moving, only change directions.

Here is the file http://www.pasteall.org/blend/42712 It keeps moving for me.... ???

Oh... Oops, I accidentally unchecked the always sensor... Never mind! Thanks again for the help!