text:
Why would I use the "Film Emulation" feature?
From what I can tell, this setting alters the exposure and other parameters to simulate a specific film, however why is this any better than exporting a file format that supports high dynamic range (.exr or .hdr) and then editing in post?
It would seem that using a raw file format would give you much greater flexibility.

Good question! I think the big thing is that you can edit it while looking in the viewport. So you could build your lighting off of it.

I've often wondered why we don't have a film emulation node in the compositor..

Can the two be combined?

There are a number of reasons, as @tardis-maker suggested in the other answer.
Here are a few more:

Grading. As stated, it can be beneficial to be looking at a display referred view of your final output that covers any number of stops above middle range, properly mapped to the display referred viewing transform
Proper desaturation. Rendering in a scene referred model extends primaries off to infinity. This means that they do not desaturate nor reach the display referred white in any way that is familiar nor correct. Consider the case of RGB 0.001 0.001 and 3.6. In this case, the only means to have blue blow out to diffuse white is via a forced intensity shift of 1000x to bring the other primaries up past the display referred ceiling of 1.0. Consider the following demonstration of primaries, that exacerbates the issue:

In both instances, the render of intensities is identical, but only in the latter does it resemble a "photorealistic" result because of the response of the display referred view transform. Notice how the pure primaries never desaturate / converge toward the hull established by the display referred primaries limitation, and instead carry on extending toward infinity, at their identical primaries chromaticity. While the above images show the flaws of a strictly 1D viewing transform, every colour is mangled in precisely the same way, to lessening degrees as a colour's luminance draws near achromatic. If you examine the achromatic cubes, it is clear how adjacent colours should converge to display referred white.

Related to the above point, the default sRGB output view transform captures a mere two and a bit stops of light above middle grey from a Cycles render. This is entirely unnatural when compared to our learned response of examining photographic-like reproductions, which maps anywhere from six or more stops of light above middle grey to the display / output referred transform. The above images encode approximately six and a half stops of light to the display referred view, and as such, the scene properly reflects the lighting with respect to influence of bounces and other radiometric responses without cheats or hacks to bring the result into the display referred domain.
Congruent with what @tardis-maker states above, all View transforms operate strictly on the one-way output of the viewing transform. That is, it is a means of viewing a baseline look without adversely impacting your scene referred internal values. It is entirely non-destructive in terms of evaluating an image as compared against a node chain, which corrupts and mangles values as the data flows along the chain.

It should be noted that the film emulations in Blender, although based off of solid data, are not implemented in a manner that makes them useful in the terms above. The breadth of why is beyond this post. Instead, they should be considered as nothing more than Instagram filters as a random creative dice roll.
Further viewing:
https://youtu.be/vKtF2S7WEv0
Further reading:
http://cinematiccolor.com
http://www.oscars.org/aces/spotlight-aces-vfx Pay attention to where he discusses cheating values.

This is very interesting but also pretty technical. Sorry I didn't understand a good part of it. Can you clarify some things for me :
• what intensity do you shift by 1000x ?
• Does the second image have film emulation enabled ? If not, do you mean that with film emulation, you wouldn't need to do this intensity shift ?
• does "view transform" mean the same thing as "color space conversion" ?
• does the RRT mode (which apparently uses ACES) offer the same advantages ?

@Gamnamno Many questions. Better served by another question. I can try to answer each if you ask it.

I found some answers myself. The only 2 left are too related to your answer to be independant questions : what intensity do you shift by 1000 and does the second image have film emulation enabled ?

@Gamnamno Regarding 1000x, it relates to how a non desaturate transform would artificially desaturate; the lower values aren't converging on the display referred maximum, but rather relying on the ratios being cut. You can spot it typically in sRGB EOTF scenes on hot walls etc. where you see a very odd blue posterization band. The second image was the demo transform that evolved into the Filmic Blender set. Try them.

The key advantage is that it works real-time in the view-port.
Of course all color manipulation could be done once the file is saved.
However having this apply to previews while you're setting up your scene means you can setup a a rough grade, and then build the lighting off of that. This allows you to get a really good idea of where you need more detail in the render, and also gives you a more accurate representation of how your lighting will look once everything is color graded.
The look settings can also help give a rough grade without much work. There's also the plus that they're based off of real life film types.
There's also a log setting. According to the manual, this is intended more as a way to trouble shoot the image, but it can also be used to get a nice flat image for use when grading.

Could you add a little more depth to your answer please? I think you have a good point.


text:
What are the hotkeys to navigate the timeline?
I am looking for a way to move the timeline a specific amount, scroll, etc. even if the Timeline window is not open. Is this possible?

→ 1 frame forward
← 1 frame backward
Shift+→ end frame
Shift+← start frame
↑ next keyframe
↓ previous keyframe
⎈ Ctrl⇧ Shift→ next marker
⎈ Ctrl⇧ Shift←  previous marker
Ctrl+→ 10 frames forward
Ctrl+← 10 frames back

Alt+A play/pause animation.

play/pause I use space key.

Hold down the Alt button and start scrolling the Mouse Wheel.
Scrolling down will let you go forward in a Timeline, scrolling up works vice versa.
You can do it in almost every window type you want and it works even if the Timeline window is not open.
Note: this shortcut works well in the Video Sequence, NLA, Dope Sheet and Graph editors also.

(I know this is an old question, but I got here while looking for an answer. So, just for the record...)
You can change the size of "steps" (or "jumps") Blender does (when pressing Left/Right, Shift + Up/Down, and even Alt + Wheel/Scroll) by changing the "Delta" parameter in the shortcuts "Frame Offset".
Path: Blender User Preferences > Input > search for a shortcut named "Frame Offset".
Then change the "Delta" value to whatever you want (default is 10).

And remember to set Shift Down Arrow Delta value to negative!

Being inspired by Paul Gonet's answer and Ricardo Roehe's answer I realized that if you like the mouse scroll method you can use the mouse for the other frame navigation methods too!
Here are some examples... (customize to your liking)
Location: Preferences → Keymap → Frames
Jump 10 frames forward / backward
ShiftAltWheel Down / ShiftAltWheel Up

Jump to next / previous keyframe
CtrlAltWheel Down / CtrlAltWheel Up

Jump to end / start of playback range
ShiftCtrlAltWheel Down / ShiftCtrlAltWheel Up

Note: I could not find commands in the Keymap Preferences for Next / Previous Marker. I'm not sure if they still exist in 2.8+
Hopefully some will find this useful, as you can leave your hand on the modifier keys instead of having to move it over to the arrow keys each time you want to move along the timeline. A configuration like this seems to allow the shortest keyboard travel time.
Note: When configuring shortcuts, checkboxes for "Next Keyframe" or "Last Frame" etc. are greyed out by default. You must click to interact with them to make them active, otherwise these shortcuts won't register. In other words, greyed out does not mean FALSE.

source: Stack Exchange

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

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

sort: votes


text:
How to rotate (roll) the 3D view like I'm tilting my head?
How would I rotate the view port along the axis from my forehead to the monitor, like as if I was tilting my head (but more like tilting the viewport)

Related - http://blender.stackexchange.com/questions/15049/how-to-roll-the-viewport ?

It looks like you'd like to avoid viewport rotation lock around Z axis and to have possibility to rotate freely with RMB.
Option 1 - switch to Trackball rotating method
By default, Blender uses Turntable rotation method for manipulating view. It means the rotation in 3D Viewport will be locked to Z axis. See what the difference between Trackball and Turntable orbit styles.
To change that in File > User Preferences (or press Ctrl+Alt+U) choose Input page and find Orbit Style part.

After toggling it to Trackball the 3D Viewport will rotate freely.

Option 2 - use View Roll
Without changing anything in preferences it's possible to roll the view to change its angle. Hold Ctrl+Shift and rotate the mouse wheel(or by using the key shortcuts Shift+Pad4  / Shift+Pad6) to rotate left / right:

I managed to type "rotate with RMB" which is not what I wanted to type. It should be MMB.

@ideasman42 thanks, I see I included one more typo there. I thought to write about Trackball when writing Turntable. Thanks for the shortcuts also, it seems I couldn't find them in UI for to include appropriate entry

Neither of these work.

It is still working just fine in 2.8-2.9. If you fail to find the way through 2.9 UI with 2.7 instructions look up descriptions on how it works exactly in your version, even though internally Blender hasn't changed much

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


text:
Getting area (region.view2d) pixel coordinates of 2D views (VSE, NLA)
I am looking to overlay a sound vis, using bgl,  over strips in the NLA, VSE, like

How can I find the area.region.view2d x,y, width and height of strips in the NLA and VSE editors using python?

Yes, this can be done, using the API call View2D.view_to_region.
Heres a "hello world" example, drawing Hello World under the active strip.
import bpy
import bgl
import blf

def draw_callback_px(self, context):
    print("mouse points", len(self.mouse_path))

    region = context.region
    strip = context.scene.sequence_editor.active_strip
    if strip is None:
        return

    x = strip.frame_final_start
    y = strip.channel
    x, y = region.view2d.view_to_region(x, y)

    font_id = 0  # XXX, need to find out how best to get this.

    # draw some text
    blf.position(font_id, x, y, 0)
    blf.size(font_id, 20, 72)
    blf.draw(font_id, "Hello Word " + str(len(self.mouse_path)))

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "sequencer.modal_operator"
    bl_label = "Simple Modal Sequencer Operator"

    def modal(self, context, event):
        context.area.tag_redraw()
        region = context.region

        if event.type == 'MOUSEMOVE':
            self.mouse_path.append((event.mouse_region_x, event.mouse_region_y))

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceSequenceEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceSequenceEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'SEQUENCE_EDITOR':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceSequenceEditor.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            self.mouse_path = []

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "SequenceEditor not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Note that this is the template operator_modal_draw.py with minor edits.
The draw_callback_px can be added without having to be connected to a modal operator, if you want this to display continuously.
Also see: https://github.com/armadillica/attract-blender-addon/blob/master/draw.py for example use cases.

Cheers for that example use case scroller_width = 16 * dpi_fac was particularly handy


text:
Deform a flat shape while retaining the original mesh
I'm unfamiliar with 3d models but I may consider using one for some real-life crafts.
What I'd like to do is have a flat shape (let's say a star) that I can apply transformations to (like a fold or ripple). In addition, I'd like to be able to view and modify the original flat star and also see the resulting folded or rippled version. As if I'm applying a 3d transformations layer to an editable flat element.
By doing this I can see a simulation of a real life paper cutout folded up but export the desired flat shape.
What process would you use to accomplish this? Is there other software better suited for something like this?

Yes, this is possible:
For manual control:

Rigging (use bones to bend and fold the shape)
Shape key (manually make some edits - while keeping the base shape) - the shapes can be mixed together and their influences animated.
Check on other deform modifiers too, shrink-wrap. lattice... all of them really, could come in handy for deforming a flat shape.

For effects:

Wave modifier
Warp modifier
Displace (consider using texture to displace, it can be animated too).
Physics: (also worth looking into)

Soft body
Cloth

Note, vertex groups can be used to influence many of the distortion methods described above.

This question is quite general (thats OK), but means my answer is generalized too.

Another more obscure option is the Lattice object and modifier: http://wiki.blender.org/index.php/Doc:2.6/Tutorials/Modifiers/Lattice/Shaping_a_Fork

@Mutant Bob, I got the impression the user wanted more direct control (mentions folding), but of course - MeshDeform, Lattice, ShrinkWrap - nearly all deform modifiers could apply. - Edited answer.


text:
Snap to own mesh
I know this is possible and I have probably activated something by mistake and now I can't figure how to reverse it.
When I use the "snap during transform" it only snaps to vertexes/lines/faces in other meshes than the one I'm editing.
How can I make it snap to vertices/lines/faces within the same mesh I'm editing?

Enable Snap onto self in 3D view > header:

I knew it was simple... :P Since "Limit selection to visible" and "snap onto self" have the same symbol I got them mixed up... Thanks.


text:
Why does camera this tracking fail completely even when the solution value is very low?
The attached animated gif shows some frames of a video with a mesh box placed at each tracking marker used to successfully track (solution error <.4) an 800 frame chunk of video.
The point is to illustrate just how poorly the camera tracker calculated: when the box is at a marker placed at the top of a faraway building on the left, it is actually visually much larger than when it is at the tracking marker closest to where the real camera was. I went to great lengths to be sure that the camera's sensor size and focal length are correct, and manually placed and followed all markers to be sure they were accurately tracking.
There is not a lot of parallax motion over the 800 frames, but there should have been enough to at least know that the point closest to the camera moved more than the point furthest away. Sometimes it seems to work, sometimes it doesn't. Does anybody know how to improve this?

To expand on what @cegaton said, do a simple 2D track so the camera moves along the two axis that the camera in the video moves. There really isn't enough 3D data for it to tell depth.


text:
Ocean modifier foam spray?
Is there a way to make the ocean modifier fake foam spray? I already displace the water with dynamic paint, but I still am stumped as to how to create the foam. I'm assuming it's a particle system of some sort, but I'm not where to place the emitter or what general settings to change (I just need some general tips).

I'm not quite sure what question you're asking, you've mentioned collisions in the question title but seem to be mainly asking how to create boat spray?

Good point. I wrote half of the question before I figured out how to use dynamic paint, and needed help on just the boat spray. Updated.

Could you clarify the question? Foam or spray? You mentioned dynamic paint, so I'm guessing you want to know how to spawn collision particles?

We need dynamic particle emission to do real foam spray. The foam mask in the Ocean Sim modifier was created to be ready once Blender caught up with that feature.
Once Lukas's Particle Nodes project is finished, it should allow for us to do that. http://phonybone.planetblender.org
The foam mask would be the source of the dynamic particle generation. The nice thing about the ocean mesh generated is that there are speed vectors associated with the waves, which I believe should also be able to be sampled and applied to the dynamic particles' starting velocities. Fingers crossed!

I should also clarify that I'm referring to foam/spray emitted from the peaks of the waves and not object/water interaction.

do you know the progress of these  features? if you are aware how to do this,  I could post a question if you could answer?

You could try using a dynamic paint modifier in weight paint mode that makes a vertex group around the object colliding with the ocean, which you could use as an emission vertex group for some particle systems.
Here is a blend file with an example setup.
(Note, only worked for me with the 2.68RC)
However there seems to be a bug where the particles keep emitting
from the same spot.

This is a limitation of the particle system
  implementation unfortunately.
  http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Tools#Particles
The location of emitted particles are determined in advance now and
  stay fixed, so this can't be animated. There's been some working on
  designing an improved particle system that can handle such animations
  but it's not finished:
  http://code.blender.org/index.php/2011/03/paged-buffers-for-particles/


text:
Can you split all connected bones and change them all to a ''keep offset'' parent automatically in a rig?
Like I do here, but automatically.

you can select all the bones in Edit mode and Alt P > Clear Parent

Considering all of the bones are parented and connected:
Select bones you need in the Edit mode, go the Bone tab, holding Alt uncheck "Connected".
P.S. Alt applies the action to all selected objects, e.g. to change materials on multiple objects.

Select all the bones and AltP > Disconnect Bone:

Won't this just unparent the bones? You still need to parent with "keep offset" manually, as I know

My bad, Alt P > Disconnect Bone is correct I guess?

Just checked, it works too.

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


text:
How to do Curve material texture, Geometry node to make imported svg look better?

I am import a world map SVG and want to make line between countries clear (it look like it merge when look from top), how can I highlight the outline ? with geometry node, or material shader
Another way I can think of is set different extrude value, can I do it with expression, or with geometry (I am trying to put random node in Geometry nodes but It put random value on Edge-curve of the object (I don't know how to call it, I have picture to show)
I also want to use gradient texture so map look more impress, how can I do it ?

Seems related: How to create border outline?

Thank you, its a good solution ! I just test it !


text:
Adding multiple Image texture on both sides of plane
I am new to Blender and have to read a lot of thread to add multiple image texture on both sides of plane. I do this in editor nodes only and you can still edit UV for each image seperately.
I want to share my method in case anyone need
Also I want to ask is there better way to do it with less nodes

You can use an Input > Geometry (Backfacing output) to project a different image or shader on the 2 sides of the plane

Yes, thats what I use, but when adding multiple image on each side. I have to try adding the alpha of all the images. Sometimes images can make a black part on the other side so Up there is all the nodes I used. It works, I just put there so anyone might need can search. And also I want to find a better way with less nodes or bettor nodes

The best would be to prepare each page in an image editor software like Photoshop or Krita

Thank you, I think thats a way to do it !!


text:
how to assign Ao image in blender?
Are there any simple ways to apply an ambient occlusion (AO) texture on top of a base color texture without using mix or math nodes?

OK, I am extremely curious - WHY? Why wouldn't you use color mix node?

As @MartynasŽiemys says in his answer, no there is no way of applying an AO texture (or any texture) to another texture without using the nodes which are used to apply textures to each other. The only other way: pre-mix them in an image editing software like Photoshop, but of course then you lose all flexibility of changing the mixing in Blender.

thanks that was useful. i am trying to upload a model to turbosquid market to certify steam cell it need to satisfy some criteria such as no procedural nodes and ao is compulsory is there any way to do it

So are you talking about the Ambient Occlusion shader node which is found in the Input category? That's not a texture, which might explain why we are a bit confused... I guess you would have to bake the output of the Ambient Occlusion to a regular image so that you can use it like other textures.

Are there any simple ways to apply an ambient occlusion (AO) texture
on top of a base color texture without using mix or math nodes?

No. There are really no ways to do that without using nodes that are used to do that. You need to multiply one by another and without mix or math nodes you just cannot do that.

How to assign AO image in Blender?

Ambient occlusion is mostly an artistic effect in Cycles. Cycles calculates somewhat realistic lighting and shadows so any ambient light is occluded by your scene anyway, so you use AO textures any way you want really. It's is probably most usual to multiply the diffuse color by it. One would normally use a Mix Color node in Multiply mode to do this and if needed additional nodes like for example Map Range could be used for finer control. This is just one of the most widely used ways, but it is certainly not a rule. You can use AO for various things in any way you want. AO is often used with various techniques to generate things like dirt masks for example.


text:
Adding graphics to a motorbike helmet Model
I need to add a set of 7-8 seperate PNG graphics to a motorbike helmet model. Never used UV maps before and texture paint etc and have spent hours wathcing many tutorials about how best to achive but come accross many problems.
I woudl like to ask whats the best approach as I need to have a lot of freedom to scale and place the images alongsie each other.
The total curve of the helmet is making very difficult and have notcied theres a few approaches but cant get any working so wanted to go back to the drawing board and see if anyone has any good suggesteions for the best approach.
Using Blender 4.0 so alot of the tutorials etc certian buttons moved and hard to follow.
Any help very much appreciated.
Thanks
P.S - Any good upto date tutorials or info links appreciated.

Hello, Hans. This really is (probably) just the art of UV unwrapping. This is kind of unanswerable in our format.. we can't  do a completely generalized tutorial on the subject. What you could do, to fit in, on BSE, is, say,  present us with one of the graphics, and where you want it to go on the helmet (no need to share the whole thing if you don't want to).. and what you've tried already that doesn't work. Then we have a specific problem we can solve, which will probably help you work the others out.

please pack your images and share your file so that we can give a try?

You can create a second UV map for the logo, scale up the faces where the logo is supposed to be, scale down the rest, use an Input > UV Map node, select this second UV map, and mix the basic material of your helmet with the logo, plug the Alpha output of the logo Image Texture into the factor of the Mix Shader so that you can see the basic material:


text:
Can I let a tracking marker paint a mask?
I want to do some retouching an a video shot and it would help to be able to use a marker to "paint" a mask.
By paint I mean how you paint with the grease pencil. But instead of your mouse cursor you use a tracking marker to paint.
Is there any way to do something like this?
EDIT: In my shot the actor pretends to spray paint a wall that is already finished (We forgot to shoot an important shot at the beginning). Now I tracked the sprayer and want it to "paint" the color on the wall.
But I can imagine other use cases for a functionality like this.

I don't really understand why you would want to do this. Why not use a dynamic paint to draw the line?

Can you describe a scenario where you would use this?

Because I want to do this in 2D. Can I use Object tracking without solving a camera motion? I updated my question for the scenario.

I really think you should use dynamic paint then. Set up a plane as the wall and create a source for the brush.

You will probably need to do it with dynamic paint, as Charles recommended, and it is possible without solving a camera motion:
You can easily set it up by tracking the wall where he is painting with a simple 4 point track, so you get 5 markers. Then, link empties to those markers, hook a plane's vertices to the wall markers and parent a cube or other object to the "painting" marker, so you can get a canvas (plane) that deforms with the footage without solving or reconstructing geometry.
Set the dynamic paint to output an image sequence of the object painting's on the plane, and then use that image sequence in the compositor as the mask, or alpha, that you need to create the effect that he is painting it.


text:
How to find all objects in the Camera's view with Python?
I have a scene with a many objects and one camera.
I would like to select the objects that the camera sees, even partially.
Is there a way to do that in Python that accounts for the objects bounds?

Note, I know that KD trees and Octrees are used for the lookup. There is mathutils.kdtree but the example only suggests how to query objects close to a point. I'm not familiar with the math for combining camera frustrum and binary trees lookup.

You might render the scene with shadeless materials and identify the visible objects by their color. In the next blender version there will be a new module which allows offscreen rendering.

yes there may be a way and some decent workarounds, but it's not clear how you produce the mesh for splines: bevel / extrude? by another spline as taper? by mesh deformed by spline?  -  Here I see an issue, cause you may need to convert to mesh temporary anyway. After all you wanna see if the Resulting Mesh is in view and not the Spline line. So how are the splines/meshes or lod defined? (for mesh I have sort of a solution, but I'm not sure how to deal with splines)

I'm thinking about doing multiple kdtree searches in space along the vector that follows where the camera points to. First I could have a small hidden sphere (not an object, a math one) that follows the camera and everything colliding with it is meshed. That way nearby objects are meshed and then with several lookups in space a proper intervals, I find other objects in the camera field of view.

You could use a kdtree if you have many many objects and so you filter a big part of them at first. Then perform the refined check only on a smaller list (as in example I gave). - For large amounts vs speed it makes sense

The only advantage of using a tree structure here would be if you have a static scene and want to move the camera around it. - In that case you could build a tree and re-use it for lookups.

http://blender.stackexchange.com/questions/27937/what-are-the-formulas-to-define-the-cameras-view-cone might be useful to determine what is in-camera.

ideasman42, editing is fine but you could have left what I wrote about curves somewhere in a comment to answer o.g.'s question and yes I do have a static scene in this case, hence the possibility of using a tree. But I'd rather not limit the answers to this case.

There are a few different ways to handle this, you could...

project into 2d space, then detect which objects are in the 2d frame.
calculate the camera bounds in 3d and detect which objects are inside it.

Here is some sample code that demonstrates the second method. It uses a set of planes (4 or 5 for orthographic cameras) and finds all objects that have any part of their bounding boxes within the planes:

Note, this isn't all that elegant, we could for example have a single function that intersects 2 sets of planes - one for the camera - another for the bound-box. However this is at least working and can give you some starting point - others may like to improve or post a method that uses projection.

def camera_as_planes(scene, obj):
    """
    Return planes in world-space which represent the camera view bounds.
    """
    from mathutils.geometry import normal

    camera = obj.data
    # normalize to ignore camera scale
    matrix = obj.matrix_world.normalized()
    frame = [matrix @ v for v in camera.view_frame(scene=scene)]
    origin = matrix.to_translation()

    planes = []
    from mathutils import Vector
    is_persp = (camera.type != 'ORTHO')
    for i in range(4):
        # find the 3rd point to define the planes direction
        if is_persp:
            frame_other = origin
        else:
            frame_other = frame[i] + matrix.col[2].xyz

        n = normal(frame_other, frame[i - 1], frame[i])
        d = -n.dot(frame_other)
        planes.append((n, d))

    if not is_persp:
        # add a 5th plane to ignore objects behind the view
        n = normal(frame[0], frame[1], frame[2])
        d = -n.dot(origin)
        planes.append((n, d))

    return planes

def side_of_plane(p, v):
    return p[0].dot(v) + p[1]

def is_segment_in_planes(p1, p2, planes):
    dp = p2 - p1

    p1_fac = 0.0
    p2_fac = 1.0

    for p in planes:
        div = dp.dot(p[0])
        if div != 0.0:
            t = -side_of_plane(p, p1)
            if div > 0.0:
                # clip p1 lower bounds
                if t >= div:
                    return False
                if t > 0.0:
                    fac = (t / div)
                    p1_fac = max(fac, p1_fac)
                    if p1_fac > p2_fac:
                        return False
            elif div < 0.0:
                # clip p2 upper bounds
                if t > 0.0:
                    return False
                if t > div:
                    fac = (t / div)
                    p2_fac = min(fac, p2_fac)
                    if p1_fac > p2_fac:
                        return False

    ## If we want the points
    # p1_clip = p1.lerp(p2, p1_fac)
    # p2_clip = p1.lerp(p2, p2_fac)
    return True

def point_in_object(obj, pt):
    xs = [v[0] for v in obj.bound_box]
    ys = [v[1] for v in obj.bound_box]
    zs = [v[2] for v in obj.bound_box]
    pt = obj.matrix_world.inverted() @ pt
    return (min(xs) <= pt.x <= max(xs) and
            min(ys) <= pt.y <= max(ys) and
            min(zs) <= pt.z <= max(zs))

def object_in_planes(obj, planes):
    from mathutils import Vector

    matrix = obj.matrix_world
    box = [matrix @ Vector(v) for v in obj.bound_box]
    for v in box:
        if all(side_of_plane(p, v) > 0.0 for p in planes):
            # one point was in all planes
            return True

    # possible one of our edges intersects
    edges = ((0, 1), (0, 3), (0, 4), (1, 2),
             (1, 5), (2, 3), (2, 6), (3, 7),
             (4, 5), (4, 7), (5, 6), (6, 7))
    if any(is_segment_in_planes(box[e[0]], box[e[1]], planes)
           for e in edges):
        return True

    return False

def objects_in_planes(objects, planes, origin):
    """
    Return all objects which are inside (even partially) all planes.
    """
    return [obj for obj in objects
            if point_in_object(obj, origin) or
               object_in_planes(obj, planes)]

def select_objects_in_camera():
    from bpy import context
    scene = context.scene
    origin = scene.camera.matrix_world.to_translation()
    planes = camera_as_planes(scene, scene.camera)
    objects_in_view = objects_in_planes(scene.objects, planes, origin)

    for obj in objects_in_view:
        obj.select_set(True)

if __name__ == "__main__":
    select_objects_in_camera()

2 questions: 1. isn't this what basically bpy_extras.object_utils.world_to_camera_view is giving as a factor (0-1 inside screen)?  and  2. the bbox should be a bit larger (with a tolerance or so) so that it considers the result with bevel radius? or is that already there ?

its just a different way to test - using planes instead of projection, wouldn't say its the same though. 2) As for padding the bound-box, curve bevel is taken into account, but perhaps render subdivision levels change the bound-box slightly - so you may want to do this, it depends on your exact use case - YMMV.

ok, they are not the same and it may be better to clearly check by planes.   As for padding, op stated that "he will not mesh the curves" unless in view, so we can assume the bbox goes only for the naked spline. - Thus the need for padding bbox or camera planes (probably simpler) to compensate for a "future" mesh, slightly larger than the initila bbox.

very cool answers both of you, I'll try all this between today and tomorrow, thank you !

There was an error in clip_segment_in_planes, now fixed.

@ideasman42 how can I modify your code, so it only selects an Object when it is for at least for example 20% in the camera view?
I couldn't figure it out...

What do you mean by "20% in the camera view" ?

@ideasman42 Worked well. Although for Blender 2.8 I had to change '*' to '@' for multiplying Matrix and Vector types.

Updated the multiplication for 2.8.

I updated the script to better handle intersections more accurately outside the frustrum: https://blender.stackexchange.com/questions/104989/how-to-not-select-objects-behind-main-camera-with-script-in-python/242346#242346

I want to add how I solved this problem for Blender 3.4.
My solution is based on: List all occluded objects from camera.
In addition to the solution above, I check how many pixels are dedicated to each object. So you could decide afterwards if it occupies sufficient space on the rendered image or not.
def occlusion_test(scene, depsgraph, camera, resolution_x, resolution_y):
    # get vectors which define view frustum of camera
    top_right, _, bottom_left, top_left = camera.data.view_frame(scene=scene)

    camera_quaternion = camera.matrix_world.to_quaternion()
    camera_translation = camera.matrix_world.translation

    # get iteration range for both the x and y axes, sampled based on the resolution
    x_range = np.linspace(top_left[0], top_right[0], resolution_x)
    y_range = np.linspace(top_left[1], bottom_left[1], resolution_y)

    z_dir = top_left[2]

    hit_data = set()

    # iterate over all X/Y coordinates
    pixel_count_dict = {}
    for x in x_range:
        for y in y_range:
            # get current pixel vector from camera center to pixel
            pixel_vector = Vector((x, y, z_dir))
            # rotate that vector according to camera rotation
            pixel_vector.rotate(camera_quaternion)
            pixel_vector.normalized()

            is_hit, _, _, _, hit_obj, _ = scene.ray_cast(depsgraph, camera_translation, pixel_vector)

            if is_hit:
                hit_data.add(hit_obj.name)
                if hit_obj.name not in pixel_count_dict:
                    pixel_count_dict[hit_obj.name] = 0
                pixel_count_dict[hit_obj.name] += 1

    return hit_data, pixel_count_dict

context = bpy.context
res_ratio = 0.25
res_x = int(context.scene.render.resolution_x * res_ratio)
res_y = int(context.scene.render.resolution_y * res_ratio)

visible_objs, pixel_count_dict = occlusion_test(context.scene, context.evaluated_depsgraph_get(), context.scene.objects['Camera'],res_x, res_y)

First I will consider here:

A list of objects, a scene, a camera, assuming you already defined these
we only care about mesh or bezier curves (I include mesh for testing, you can skip it)
we consider all splines inside a curve object (you can count only for first if the case)
a tolerance: this helps with bevel. so we consider a bit before the spline point is in view
a LOD, just for example (make your rules there)

Note that the tolerance here has to be related to a 0 to 1 factor and I just give a 0.03 out of the blue. this can be computed in relation to distance and a radius if u need more precision.
The steps are:

for each object

create a list of points, mesh points or by subdividing curves
test if the point is inside rendered area, by screen factor 0 to 1
create 0 if off screen or LOD (1, 2, 3 ...)

produce a list of integers that store the state of each object

Key moments:

for splines use mathutils.geometry.interpolate_bezier to subdivide it
(we use points, so we need segments to be little here)
for on screen use bpy_extras.object_utils.world_to_camera_view that gives a factor related to screen (0-1 for on screen, rest is off)

The code example would then be something like this:
# check if mesh or spline points are in view, (o.g. variant 1, 2016)

from mathutils.geometry import interpolate_bezier
from bpy_extras.object_utils import world_to_camera_view

def pointsOfMesh_or_subdivideSpline(object):
    points = []

    if getattr(object, 'type', '') == 'MESH':
        points = [v.co for v in object.data.vertices]

    elif getattr(object, 'type', '') ==  "CURVE":
        splines = object.data.splines
        for spline in splines:

            if getattr(spline, 'type', '') == 'BEZIER':
                resolution = spline.resolution_u + 1
                last = 0 if spline.use_cyclic_u else 1

                lenP = len(spline.bezier_points)
                for i, p1 in enumerate(spline.bezier_points):
                    if i < lenP - last:
                        p2 = spline.bezier_points[(i + 1) % lenP]

                        knot1 = p1.co
                        handle1 = p1.handle_right
                        handle2 = p2.handle_left
                        knot2 = p2.co
                        _points = interpolate_bezier(knot1, handle1, handle2, knot2, resolution)
                        points.extend(_points)
    return points

def testInView(coord, tolerance):
    pointInView = False
    z = -1

    if scene is not None and camera is not None and coord is not None:
        xFactor, yFactor, z = world_to_camera_view(scene, camera, coord)

        # add this if you use ortho !!!:
        #if camera.data.type != "PERSPECTIVE":
        #    sx, sy = camera.data.shift_x, camera.data.shift_y
        #    xFactor, yFactor = xFactor - 2 * sx, yFactor - 2 * sy

        # !! tolerance can be computed with above z and radius or so
        if -tolerance < xFactor < 1 + tolerance and  -tolerance < yFactor < 1 + tolerance and z > 0:
            pointInView = True

    return pointInView, z

objectsInViewList = []
LOD2limit = max(LOD2limit, LOD3limit)   #clamp lod 2 to lod 3

# mesh points or spline subdivision points with a tolerance
for object in ObjectList:
    if object is None or getattr(object, 'type', '') not in ['MESH', 'CURVE']:
        objectsInViewList.append(0)

    else:
        matrix = object.matrix_world
        zlist = []

        # see if any point is in view
        points = pointsOfMesh_or_subdivideSpline(object)
        for point in points:
            pointInView, z = testInView(matrix * point, tolerance)
            if pointInView: zlist.append(z)

        # these LODs are just an example
        if zlist == []: LOD = 0
        elif min(zlist) < LOD3limit: LOD = 3
        elif LOD3limit <= min(zlist) < LOD2limit: LOD = 2
        else: LOD = 1

        objectsInViewList.append(LOD)

so you get a list of 0 (hide) or LOD for each object in list
Again, note that tolerance is related to screen factor, so I just use a 0.03 here, but you can further calculate it related to z

Testing, just to see
All inputs there, I assume you have defined somehow.
(I intentionally use None and lamp to see..)
Compare the result 0,1,2, list with the obvious state of objects
Note that bezier 001 is slightly off screen, but I still get a 1, cause of the tolerance.

Note that I use Animation Nodes/ script node for convenience here, skips a lot of formalities, registering etc and I can use bogus obj list etc, plus it updates real time.
However, just to illustrate how the code works

Checking if the points are in the view isn't totally reliable, since an edge may span the view but not have any vertices in it, or a plane may fill the camera completely (where no edges or vertices intersect).

I know, that is why I have asked for clarification on how the splines mesh is done. Being done with bevel, I can use enough subdivisions and with a certain tolerance, that covers for bevel radius, it should work for the specific case.  Also, the LOD is there so should cover for too close objects (I did not do that in the example)  -  Otherwise, I would have build the 4 planes for camera view sides and check the normals for i/o. That is basically what you did :), so no point in redoing

I would see the problem of no-vertice but edge intersection appear only at close-ups. To deal with this I could have the curves close to the camera meshed (as in my comment above). In this case, when in doubt, it's better to have more meshes than too little.

@ideasman42 I tried to use your function but I caped getting error when multiplying the matrix_world and bound_box vector. first I tried to wrap it up with numpy array since the operator @ wasn't supported and after that I received a dimensionality error since the matrix holds shape of 4x4 and the vector shape of 3. I'm using blender 2.79b


text:
Cause of black artifacts in render?
I was following this tutorial on creating a watch and noticed that when I rendered the watch, some pieces were messed up.
I'm new to 3D modeling and I've just learned Blender,
I can't explain it well, so here's a picture:

Other examples:

I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?

Related, How do I avoid rendering glitches from overlapping faces?.

It looks like Z-fighting, which is caused by overlapping faces in your model.
From Wikipedia:

Z-fighting is a phenomenon in 3D rendering that occurs when two or more primitives have similar values in the z-buffer. It is particularly prevalent with coplanar polygons, where two faces occupy essentially the same space, with neither in front. Affected pixels are rendered with fragments from one polygon or the other arbitrarily, in a manner determined by the precision of the z-buffer. It can also vary as the scene or camera is changed, causing one polygon to "win" the z test, then another, and so on. The overall effect is a flickering, noisy rasterization of two polygons which "fight" to color the screen pixels.

From looking at the tutorial you linked, the most likely place for this to have happened is in the Mirror modifier on the overlapping pieces. Ensure that the object origin is in the right place relative to the geometry, so the the geometry does not extend past the origin along the mirror axis:

Since this question is getting asked a lot and overlapping faces aren't always caused by a mirror modifier, here are some common cases where there is no readily apparent overlapping face:

Overlapping objects, one of which is hidden in the viewport. Press ` (often the key below the Esc key) to toggle all layers visible, and then press AltH to unhide all hidden objects. This should make all objects visible in the viewport, but it's also possible you might have some modifier causing this. Try different combinations of disabling and enabling them in the viewport and final render).
Hidden faces in edit mode. Press AltH in edit mode to make sure all geometry is visible in the viewport while in edit mode.

Once unhidden, try selecting the problem faces/objects and see if moving them (G) reveals multiple faces/objects in the same location.
If there are multiple faces in the same place, one way you can try to get rid of them is with the Remove Doubles operator. Select all the vertices in the mesh with A, then press W> Remove Doubles. This will try and merge duplicate vertices if they are on top of each other.

In the case of baking, overlapping UVs can have the same effect. Try using a quick auto-unwrap guaranteed to avoid overlapping UVs such as Smart UV Unwrap or Lightmap Pack to see if this is the problem.

You might also consider to use Blender Cycles instead of Blender Internal. Some non direct illuminated areas might have also dark areas, while in Blender Cycles, reflected light will be considered, and you wont have true dark areas.

I came across this problem when applying the bevel modifier.
Nothing removed the black artifacts until I added a subsurf modifier.


text:
Repeat a Python function multiple times
I am writing a Python script, and I need to repeat one line of code 24 times. How can I do that? I tried a for and while loop, and still cannot get it to repeat.
import bpy

def selectView():
    bpy.context.area.type = 'VIEW_3D'
    screen = bpy.context.window.screen
    for area in screen.areas:
        if area.type == 'VIEW_3D':
            for region in area.regions:
                if region.type == 'WINDOW':
                    override = {'window': bpy.context.window, 'screen': screen, 'area': area, 'region': region}
                    for i in range(0, 23):
                        bpy.ops.view3d.view_orbit(override, type='ORBITDOWN')
                        bpy.ops.view3d.select_border(override, gesture_mode=3, xmin=-1200, xmax=1000, ymin=-1000, ymax=1000, extend=True)
                        print(i)
selectView()
bpy.context.area.type = 'TEXT_EDITOR'

What this is supposed to do is go in a circle and select the vertices on the outside of a model. Unfortunately, it is only moving the camera once and selecting everything.
Thanks for the help!

This question looks like a great candidate for StackOverflow.com, which is another StackExchange site, but is specific to programming. I mention this because the answer to your question is about Python in general, and doesn't seem to have much to do with using Python in Blender specifically. They have some great answers over there, and I wouldn't be surprised if your question has already been answered there ;-)
Good luck!

The Python actually looks pretty solid, I think it's just the specific way that you are accessing the API that's causing the problem.

If all you want to do is select the vertices on the outside of the mesh, you could select inner faces (3D view > Header > Select > Select inner) and then invert the selection Ctrl+I

...additionally, if you want to do it programmatically, perform @gandalf3's suggestion in the GUI, and the Info window should give you some information about what functions were called. I.e. don't reinvent the wheel...unless you're just having fun ;-)

Probably a better solution to this would be to cast rays from each vertex away from the meshes center and check if they hit anything (if not the vertices are on the outside and can be selected), another solution could be to use BMesh's convex hull operator and find all points which make up the hull. Its not clear exactly what you do but this seems like a very odd solution.

While I think there must be a more elegant way to accomplish what you are trying to do, the problem lies in the fact that Blender isn't updating the scenegraph when it's deep inside the Python loop.
You can force an update and redraw with:
# bpy.types.Scene.update()
bpy.context.scene.update()

and
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

Note: calling bpy.ops.wm.redraw_timer is very much a hack, since scripts are not supposed to be forcing redraws, however it does work.


text:
getting started: no module called bpy outside of Blender
After sudo apt-get install blender on Ubuntu 12.10, I have Blender version 2.63
However, I can not import the relevant scripting Library
Python 3.2.3 (default, Sep 25 2013, 19:36:10)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named bpy
>>> import Blender
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Blender

Later on, I would like to use numPy and Blender to create some figures for 3D printing, as a friend has suggested.

It looks like your are trying to use blender as a python module, which is currently only supported as an experimental feature. See the wiki for instructions. Instead try executing scripts from inside blender. See the wiki on the python console and the text editor. Also see the scripting page.

Sorry, I forgot the link to the text editor wiki page.

See https://stackoverflow.com/q/10972637/321973

bpy is only available when a script is being run from the Python interpreter in Blender. You can't access it from an external interpreter. The bpy module itself is located in the Python environment supplied with Blender (if you download the zip-file, rather than the installer).
To use the bpy module, open the script in Blender's Script Editor.

Well, does exist a coomand line to launche blender script editor then "paste" or "run" any other script then export?. I mean without use GUI/X and of course, without the "experimental" blender as python module. Maybe the answer is " the experimental " but, i must ask. thx.

I realize this is old, but to for anyone else with the same question as @m3nda: You can run blender in a GUI-less mode and excecute your python script via:
blender --background --python my_script.py -- my_argument1 my_argument or similar.

As far as I know, this can't be done straight forwardly.
But, there is an experimental feature you can try. Basically you build a Blender with some special CMAKE settings. Here is the complete "HowTo" (from @Ideasman): Blender as a Python Module.
Also notice that Blender (currently) works with python 3.3.

That is interesting. I should try it out sometime.

really interesting ... exporting 3d models as scripts, so you can easily modify some parts before rendering/exporting.

the link is broken, is there any chance you can update?

Sorry, the page is gone (certainly with the rise of Blender 2.8). But you may find something interresting in there : https://pypi.org/project/bpy/ (I haven't tried it BTW).

The bpy module is only accessible from the Python interpreter built-in to Blender. It is tightly integrated to Blender's runtime process, and is not primarily meant to be accessed like a library from a standalone Python process.

You can use fake-bpy-module instead.
From the description of the repo:

fake-bpy-module is the collections of the fake Blender Python API modules for the code completion in commonly used IDEs.


text:
Curve bend, to center
You want to create a scene of a flower blooming.
However, the way the petals bend seems a little strange.
They bend normally when standing upright, with no noise on the stem,
but when I add noise to the stem, the petals are facing the wrong way.
How do I fix it...?

my blend file are here
https://drive.google.com/file/d/1mf9YdH1wAMRwY8ukca2K3XA5E1ynHZMD/view?usp=sharing

It's a matter of instancing the petals around the flower before applying the tangent of the stem to the flower. That way, the petals inherit the orientation. I have added a second geometry nodes set-up to show the difference in the below blend file.
https://drive.google.com/file/d/1W3gEt-Sze11HKGvzo4yr114vDMJj15d8/view?usp=sharing

Using Beziers also seems like a great idea. Thank you for the response!


text:
Removing a sphere from an arrayed body
I hope that somebody can help, I am trying to remove a sphere from a body that is created from an array along a curve. When I try and run a boolean modifier to remove the sphere, the array body doesn't get cut how I would expect it to and it seems to just remove sections of the arrayed body.
I've tried using the merge feature in the array modifier but that doesn't seem to help.
If anyone would be able to give me some pointers then that would be great! I am pressuming it's something to do with the base model that I have been given to work with but some advice would be greatly appreciated.
I've attached a simplified version of the file here: https://easyupload.io/zdl6qy.

(Using Blender 3.6.8)
Because of the "snake" open ends, the Hole Tolerant Solver Options should be activated for the Boolean modifier:

That's great, thank you so much! I've managed to get it to work on the sample file, now I just need to leave my computer alone for a week while it works out the full version.
Thanks again :)


text:
After render done, render output is not showing in folder
I am new to Blender and I am facing weird issue. When I press f12 to render my png output single frame. my output is not showing in location. kindly help me with this

f12 does not save your render, it just renders it into memory. If you wanna save your render, go to "image"-> save after rendering (in the rendering window).

Hi, I am sorry can u explain me steps in more detail..or share a link related to this issue? I am totally new to Blender. Thank you for ur time

just hit F12...then a window should popup. There is a menu. Click on Image -> save.

It's worked :). Thank You Chris!!

Just to add to Chris' information, if you closed the render window you can bring it back with F11 to show the render result (no need to render again), then you can save the image. Another info: the output path which you can specify is for rendering animations (Ctrl+F12), because when you are rendering a sequence instead of a single frame the images are saved automatically because otherwise each new render would overwrite the previous in memory. By the way, by setting Start and End to the same number you can render a single frame as animation and it will be saved automatically.


text:
How to fill a complex shape to make it printable
I'm new to blender and can't find a solution to my problem anywhere.
I have created a simple low poly model by connecting vertices to faces (using F).
Now I want to fill my model so I can print it.
I can't figure out how to do it expect selecting each face manually and extruding it.
What I have tried so far:

selecting all faces and extruding (deforms the whole thing)
using Modifier > solidify (only make it thicker but no way to say I just want to solidify towards -Z)

Is there an easy way to do this?

Thanks in advance for the help!

If your object has intersecting faces it won't work, you can activate the addon called Mesh: 3D-Print Toolbox and press the Check All button in the N panel > 3D-Print. If the topology is not correct you can try to remesh it with the inner remesh tools of Blender, or with a software like Instant Meshes but it may not work well, or the shape may not be as sharp as you want. In that case you need to rework with a clean topology from the start

It appears that this shape has a considerable number of intersecting faces. Addressing this issue may be challenging for someone new to Blender. I suggest starting with some basic modeling tutorials in Blender to gain a better understanding of modeling techniques. So I'm voting to close this question as needing more focus on a specific problem.

You could apply solidify modifier, select all faces you want to be the bottom and scale them to 0 in some axis(Z most likely)to make them flat. There are good reasons to hate overlapping geometry, but 3d printing slicers cope with it well(not in all cases, obviously) so you could try to slice it. It may be OK if you don't have inverted normals. You will probably have to fix all the parts that have holes manually. That does not however make the forms printable. As this seems to be quite a mess, it's hard to say if you are going to have problems printing it or not.


text:
Apply Scale changing dimensions of text
I have a Text object that I've got to the size I want but when I try to Apply Scale the dimensions change (they get smaller).  Whenever I've done this previously it's just set the scale to 1 and not changed the actual dimensions of the object.  The only similar issues I could find related to the Delta Transform being the problem but I'm pretty sure mine is correct - I've certainly not touched it.  I'm very new to Blender so I'm probably doing something stupid but I'm stumped right now - any help would be appreciated.

Hello could you please share your file?

Here you go - https://wormhole.app/Rbk9Y#B9QwO0UwUU5w6ede8sux2w .  It's the Bettys Text I'm trying to apply scale to.

it looks like applying text scale works like a kind of reset, text is not a mesh object so it must explain why it works this way

I guess I must have converted the other text to a mesh before applying scale.  It's all very confusing!  Thanks for taking a look

it looks like applying text scale works like a kind of reset, text is not a mesh object so it must explain why it works this way


text:
Ocean modifier and foam data export?
It is there any way to export the foam data generated from ocean modifier to use it in other render engine, like LuxRender? The manual says that the foam data is stored as vertex color data, but there isn't a way to access the vertexColor data. I know that can be accessed from Cycles from attribute's node. LuxRender supports vertex color and I tried to bake the texture to vertexColor and an image but only get a plain black texture.

foam could be generated as image sequence in blender black and white images you could set resolution for textures as well,but I dont know if image sequence could be used in LUX as texture

Yes it supports, but even i just gonna render a still, how do i save it as image, i baked as "Texture" bake and nothing.

probably you doing something wrong during baking it http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulate/Ocean works for me this tut is really good about ocean http://youtu.be/11F1NRpqrzY

Finish settings for ocean such as wind, choppiness, etc.
Set resolution in ocean modifier. For example, 16 will result in a baked image 256x256 pixels. 64 is the largest, final baked image is 4096x4096.
Check the boxes for generate normals and Foam,
Set cache path anywhere you want (should be an empty folder) and bake.
After a while you get images like this one in your cache folder:


text:
How to turn off image tiling in the game engine?
I was wondering how to turn off image tiling for textures in the game engine. My UV map would make it tile right now (i.e. it's bigger than the map), but I can't figure out how to turn tiling off. I'm using the game engine with GLSL enabled.

Just curious as pertaining my answer below. Your question is worded funny. Texture tiling and (tiling textures) can be interpreted as two different things.. please clarify exactly what you mean.

In the UV Image Editor, bring up the properties toolshelf with N and under Game Properties, under the Clamp group, tick X and Y, you can now scale your map larger than your image without tiling your texture..

Is there something I need to do in the texture settings also? It's still tiling.

@CharlesL hmm.. this worked for me, you could try under texture settings, change Image Mapping to Clip and also make sure that your mesh is unwrapped properly (the default unwrap) and under Mapping, Coordinates is set to UV.

Ah, it was working before, it just wasn't updating. Changing the shading settings to singletexture then back to glsl updated it.


text:
Creating a geometry from a Python array
I would like to 3D print this image, which I computed in numpy as an array.
My hope is to put this into Blender and export as an STL file to give to my friend at MakerBot.

This is a 2D image but my plan is to thicken the image slightly to have a 3rd dimension.
How do I draw this array in Blender ?

Here are some solutions:
1:

1) export your drawing in Python (numpy) as SVG file (say using MatPlotLib)
  2) import SVG file into Blender
  3) apply bevel to that

2:
In the following however we did it in a different way.

1) We traced your image in Inkscape
  2) and exported as SVG file.
  3) In blender we just made it mesh and applied extrude.

You could construct geometry based on this data, probably the most straightforward method would be to create a 2D curve with Python.
# These coords are just an example and can be any length.
# They can be from a numpy array or loaded from a file.
coords = [
    (0.1, 0.21),
    (0.4, 0.24),
    (0.6, 0.4),
    (0.7, 0.1),
    (-0.2, -0.3),
    ]

import bpy

cu = bpy.data.curves.new(name="MyCurve", type='CURVE')

# setup curve
cu.fill_mode = 'NONE'
cu.extrude = 0.02
cu.bevel_depth = 0.02

# link to scene
ob = bpy.data.objects.new(name="MyObject", object_data=cu)
scene = bpy.context.scene
scene.objects.link(ob)

# fill curve with data
spline = cu.splines.new(type='POLY')
# -1 because we already have a point
spline.points.add(len(coords) - 1)
for i, point in enumerate(spline.points):
    point.co[0:2] = coords[i]

This can be added to the end if you want to convert to a mesh for printing.
# ----------------------------------------
# Optional: Convert to a mesh and cap ends

bpy.ops.object.select_all(action='DESELECT')
scene.objects.active = ob
ob.select = True

bpy.ops.object.convert(target='MESH')
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.fill_holes(sides=0)  # cap ends
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

Make it white lines on black background. Add a displace modifier to a relative high poly plane mesh and use the image as a height map. Apply the modifier. Cut of the bottom with booleans.
To refine it you can use the Decimate and/or Remesh modifier. Then you should be able to 3D-print it.
Don't be afraid to use a really dense mesh. Slicing a dense mesh might take a little bit longer but that is the only drawback.


text:
How to get a list of selected bones
How can I get a collection of two selected bones from an armature like the bpy.struct.selected_objects[0] list?
If I try this with bones I just get the armature objects name.

Your probably looking for bpy.context.selected_bones
Or ... selected_editable_bones

NameError: name 'selected_editable_bones' is not defined in 2.90

You can use bpy.context.selected_pose_bones for bones in pose mode


text:
How to match bone orientation between two objects in Python?
I have two armatures, I want to copy the roll value of each bone from the Source armature to each bone in the Target armature and also have the local orientation correctly. The two armatures have the same number of bones but with slightly different locations and sometimes the source armature object is rotated.
I've already done copying the roll value using the below script but I wonder now how I can copy the bone local orientation as well so that the bones will have the same roll value as well as the same local orientation cause some of the bones has different local orientation as shown below:

import bpy

target = bpy.data.objects['Target']
source = bpy.data.objects['Source']

for pb in source.pose.bones:
    pb.rotation_mode = 'YXZ'

for pb in target.pose.bones:
    pb.rotation_mode = 'YXZ'

sourceroll = {}
bpy.ops.object.select_all(action='DESELECT')
source.select = True
bpy.context.scene.objects.active = source
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all(action='SELECT')

for b in source.data.edit_bones:
    sourceroll.update({b.name:b.roll})

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

bpy.ops.object.select_all(action='DESELECT')
target.select = True
bpy.context.scene.objects.active = target
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all(action='SELECT')

for b in target.data.edit_bones:
    b.roll = sourceroll[b.name]

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

My .blend file can be found here:

Does armature editmode Ctrl-N -> 'Active Bone' work?

@ideasman42 I've tried it but still the target armature has the x pointing forward while the source have the z pointing forward. Is there a way to copy and set the roll and local orientation from another bone in another armature?

Copying the roll from one armature to another should work. What is different about the armatures? (best update your Q with this info)

@ideasman42 blend file provided in the question

Do you want the rotation to take object-mode armature object rotation into account? (please update the Q)

@ideasman42 no I just want to change the local orientation of the bone.

The objects have different rotations compared to eachother, that means a local orientation copy wont result on the bones pointing the same way (by looking at them in the 3D view), is this what you want?

@ideasman42 no, I want them to point to the same way, I can apply rotation of the source armature if this is a problem?

Its not a problem. It just needs to be accounted for when calculating the relative orientations.

First of all, if you have 2 armatures with different object rotations relative to each-other, simply copying the roll value won't give you (visually) the same orientation (or if it does it will only be by accident).
The basic solution to this is:

Get an orthogonal direction from the bone (X or Z axis).
Transform that axis into world-space.
Transform the axis into the local space of the other object.
Algin all bones (X or Z) to that axis.

This is a working script written by @Tak, updates by @ideasman42:
import bpy
import math

def align_bone_x_axis(edit_bone, new_x_axis):
    """ new_x_axis is a 3D Vector the edit_bone's x-axis will point towards.
    """
    new_x_axis = new_x_axis.cross(edit_bone.y_axis)
    new_x_axis.normalize()
    dot = max(-1.0, min(1.0, edit_bone.z_axis.dot(new_x_axis)))
    angle = math.acos(dot)
    edit_bone.roll += angle
    dot1 = edit_bone.z_axis.dot(new_x_axis)
    edit_bone.roll -= angle * 2.0
    dot2 = edit_bone.z_axis.dot(new_x_axis)
    if dot1 > dot2:
        edit_bone.roll += angle * 2.0

source = bpy.data.objects['Source']
target = bpy.data.objects['Target']

# Needed to account for object rotation
source_to_world_matrix = source.matrix_world.to_3x3()
world_to_target_matrix = target.matrix_world.inverted().to_3x3()

source_x_axis = {}
bpy.ops.object.select_all(action='DESELECT')
source.select = True
bpy.context.scene.objects.active = source
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all(action='SELECT')

for b in source.data.edit_bones:
    source_x_axis[b.name] = source_to_world_matrix * b.x_axis

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

bpy.ops.object.select_all(action='DESELECT')
target.select = True
bpy.context.scene.objects.active = target
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all(action='SELECT')

for b in target.data.edit_bones:
    align_bone_x_axis(b, world_to_target_matrix * source_x_axis[b.name])

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

Stunning, thanks!


text:
BVH Export/Import, Armature different when re-imported
If I export an armature as bvh and then import it back, the imported armature doesn't look anything like the original.
Could anyone please have a look and advise?, blend file

Is the animation correct?

@ideasman42 what do you mean? this file is just an example. My original file has different animation but have the same issue.

The BVH format stores bones differently to Blender.
Specifically, it doesn't support bone-length and bone-roll, each bone is just a joint(as if you have many parented empties in Blender), so this information is lost on export, when the BVH is imported back in, the animation will match the original, but not the armature.
The bone lengths & roll have to be calculated on import (because its not in the file).
This is simply a limitation of the BVH format, or a difference at least, with Blender's armature representation.


text:
How to reverse simulation in geometry nodes?
I wanna make this bottle start like small rocks floating from the ground and then come together to reveal the bottle so I used geometry nodes for that I followed a tutorial on YouTube but I couldn't understand how he reversed the simulation, Is there a way to reverse this simulation in geometry nodes so I can still control the simulation?

pls add link to tutorial. thx

Do you have any random process hidden in the group node Switch ? If yes, there is no way to backtrack in GN. Do you check that "he" is not just playing the animation back (using the left pointing arrow in the Timeline Editor) after playing it once forward ?

Yes, there is a node swish node, I don't have much experience in geometry nodes. I couldn't find what is the issue.
This is the tutorial :
https://youtu.be/R8M9G7gOzGM
This is the blend file:
https://drive.google.com/file/d/1OH8JEaa99sftZd5RO9ayPR_BctCc3wwV/view?usp=drive_link
I hope you can help me with that, Thank you very much

Export as alembic then reimport an animate the frame override (Backwards).

But the animation will be very slow in the viewport because there are a lot of particles, Right?

We can not access your Blender file. Please remove authentication .

Sorry, I think it's working now

Sorry, I can not help you further as your file, probably from a higher version, is crashing my 3.6.8 Blender. I hope someone with a newer version might help you.

Oh, sorry for that, Yes, I made it in Blender 4.1. This is the link:
https://www.blender.org/download/releases/4-1/
I appreciate your help because I have been looking for the solution for more than 10 days now but I couldn't find anything. Thank you very much.

I went through the video and it seems to be the "Switch" boolean on the "Switch" group node that is controlling if points are moving away or towards their original position (time about 16:30).

This is the problem that I faced, When I uncheck the switch it just freezes rather than get back to its original position.


text:
How to add items to my custom collection property at the start of blender without any user explict clicking
I have data stored in local file and want to sync them to my custom collection property once the blender was started. But my collection is registed to the Scene, it seems like only the parameter context in operator can access and change my collection, and this requires user's clicking to invoking the operator.
What I have tried:

Access my collection via the context in Panel's draw(self, context), got:

AttributeError: Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting HotNodeProps.<UNKNOWN>

Invoke my sync operator in the register(), got:

'_RestrictContext' object has no attribute 'view_layer'

Really don't have a way or a hack to do this?

Hello. maybe delay the execution a little bit after register with an application timer https://docs.blender.org/api/current/bpy.app.timers.html so the context can be initialized

Works! I think you can leave this as an answer so i can click "accept" for you :)


text:
Converting Celtic 2D ornament to proper 3D
I need to convert many Celtic ornaments from 2D image for 3D print.
I'm using automated tool to convert 2D to 3D. But every result I'm should edit manually: I make some lines go under others.
Maybe you know some way to automate edit process?
Here is 2D example:

what do you mean by it makes some lines go under others, could you please show the result and why it doesn't work?

As far as I know, you’d need a pretty complex algorithm to detect three dimensional weave from this 2D rendition, but something you might be able to use to your advantage is that the pattern appears partially tiled. If you can find and build one base unit of the weave and then repeat it with an Array modifier, Geometry Nodes, or just copy pasting, doing the connection work between the pieces should be easier than trying to create the weave as a whole.
In case you didn’t know, I totally recommend using curves for this, and turning up the bevel setting on the spine.


text:
Accessing Custom Layout Workspace Properties from Python
I am trying to read custom property data from a blend file using Python and Blender v4.1. In the model, custom properties (e.g. an Integer property called "ASSET_ID") was added in the Layout Workspace.

I can access the object in Python using the bpy module using a command like:
o = bpy.data.objects["asset_1"]

The documentation says I should be able to find the property using a statement like:
bpy.data.objects["asset_1"]["ASSET_ID"]

but the key is not found. Does anyone know where the Layout Workspace properties are stored?
Note: the reason I'm asking specifically about the Layout Workspace trying to debug this problem I noticed that property set from Python showed up in the Modeling Workspace properties but not in the Layout Workspace:
bpy.data.objects["asset_1"]["FOO"] = 1
bpy.ops.wm.save_as_mainfile(filepath="test_props.blend")

The problem doesn't have anything to do with workspaces, but rather the data block the custom properties are attached to. Pretty much every data block can have custom properties in Blender. In your case you're looking at a material data block custom properties. Notice the red circle icon with a checker board in the properties editor.
import bpy

bpy.data.objects["asset_1"].active_material["prop"]

# Or directly with material name
bpy.data.materials["Material"]["prop"]


text:
What does "Bone location is set in local space" mean?
I found this in the Relations panel of Bone Data properties:

I was looking for some documentaiton about what this means and how it is used in practice. But i found nothing substantial about this. maybe someone can shed some light on this ?
btw: i have seen the entry How does 'local with parent' space work?
But it does not answer this question (for me).

It means the bone behaves 'as normal' and location curves are based on the bone's rest position. If you uncheck it they (the curves/ transform) will be in the rotational space of the armature, ignoring the rest rotation of the bone.
Nathan added this during sintel I believe to avoid having to align bones in the rig. Honestly I think it is a nuisance.

what do you mean by location curves? I came across local space option in Rigify Leg Rig. I tried moving rotating, parenting bones etc. to see any difference local space option inflicts, but no results.


text:
How to build old versions from source (2.78c)?
I have some old .blend files that I want to work with that need 2.79 or older (they use the old internal renderer). I don't want to mess up my main Flamenco compute nodes with an old version, and am not in a rush, so thought I would build it from source on a rPi 4.
I have the source cloned, and the v2.79c branch checked out.
install_deps.sh is causing me pain. I edited it to change the dependency on libopenjpeg-dev to libjpeg-dev, and now I am to:
 libglewmx-dev : Conflicts: libglew-dev but 2.1.0-4+b1 is to be installed

Does anyone have any insight as to how to get the right dependencies installed for such an old version?

You can of course download any previous Blender version right back to 1.0 here. The source code is also available from this page.

Is there a special reason why you want to build it on your own?

Is there a typo in the text? There is no release version 2.79c, is there? And title of the question mentions 2.78c.


text:
Set up Flamenco to support multiple Blender versions?
I have some older workstations that are not supported by the latest versions of Blender, but I still use interactively. I want to send jobs from these workstations to my Flamenco/Blender "farm" (garden, flowerpot?), and have them rendered with the same (older) version of Blender.
I can handle the installations of multiple Blender versions in the farm, but am trying to figure out the best way to have multiple job types (or a switch for the existing job type) to specify which version of Blender to use.
Has anyone already done this?

This is what tags are for. In short:

Go to the 'Tags' tab in the Manager's web interface.
Create a tag "Older Only".
Go to the 'Workers' tab.
For each older Worker, click on it, then click the slider next to the "Older Only" tag to assign that worker to that tag.
When submitting a job, choose either "All" or the tag "Older Only".

The tag used when submitting a job will determine which workers get to work on it. Of course it's up to you which tags you choose, and which workers you assign. Maybe you find it easier to have a tag specifically for the newer computers.

so, I would need to do a 2nd worker install on my compute nodes, tag them, and hardwire their configuration to point to the older Blender? That'll work; but then there is a chance that a compute node could end up running 2 jobs.
I'll use it as my interim solution.
I think I'll put a feature request in. Having a single worker with the ability to run one of several Blenders makes sense. I might be able to pull it off with a custom job type.

You don't need 2 workers. You didn't specify that you'd want to run two different versions of Blender on the same machine (just "in the farm"), that requires a bit of a different setup.
Tags control which Worker gets to work on which job. If you want to have different versions of Blender for different jobs, that would require a custom job type. I can help with that too, but it's easier to go to Blender Chat at https://blender.chat/channel/flamenco for that.


text:
Copy attribute frome edge to face
I have a question that is probably very basic for most of you, but that I'm stuck on.
I have a starting mesh that contains a edge marked by an attribute (in this case “test”). After extruding the edge of the mesh, I'd like to “transfer” the attribute of the marked edge to its extruded face

(Using Blender 3.6.8)
The attribute is already "transferred" to the extruded face:

1. The Store Named Attribute node is tagging True a single edge chosen through its Selection socket.
2. The Extrude Mesh node set in Edges mode is preserving the attribute value when it is copying edges before translating these.
3. The attribute value for connecting edges (those "vertical" in the demonstration case) is copied from the original vertex they are extruded from. Because of special interpolation rules for boolean, such a vertex is True if any of its connected edges is True.
4. So, all 4 edges of the face of interest are tagged True. Consequently, because of the same rules, the face is tagged True.
NB: Beware that if Float instead of Boolean type is used, with 0 instead of False and 1 instead of True, the "vertical" edges value is $0.5=\frac{1}{2}(0+1)$  and the face of interest value is $0.75=\frac{1}{4}(1+1+0.5+0.5)$, not $1$.
Resources:

Thank you @StefLAncien
I feel stupid. I didn't even think to try if the attribute had been propagated to the face. And I discovered that the attribute is also propagated to the points.

@Humfred if this answer works then please upvote and accept it, so it will be removed from the pending questions.

May I recommend to apply this : What should I do when someone answers my question? ?

@StefLAncien Thank you for advising, I'm new to using StackExchange.


text:
geometry nodes particles floating
hi fairly new to blender here, running into an issue where some of the sugar particles appear to be floating around the object I've tried adjusting the density and distance, but can't seem to get all the particles to wrap around it

no wonder, you used a random value (with z 0.01) which make them "floating". delete that and nothing floats. if that doesn't help - pls provide blend file

It's like Chris said, when you move them randomly on Z, it might be that some of them float. Apart from that this is not the Z pointing in normal direction away from the surface, this is the object's local Z so it is simply going upwards. If this is what you want and you did this on purpose, then you have to make sure that you use a Max value low enough so that even the smallest particle will still be connected to the surface.

More important though, you have not enabled Separate Children and Reset Children, so you always instance all three particles at once and with their individual distances to each other, which will be added to the random Offset value as well. Oh, and you should enable Pick Instances on the Instance on Points node, otherwise the three different particles will be instanced regularly one after another repeatedly (although that should not be too obvious with randomly distributed points, just to keep it in mind for future projects maybe).


text:
Has limit selection to visible changed?
Since updating to Blender 4.1, I am suddenly plagued by selecting things I didn't want to select: edges/vertices I can't see, that are on the other side of a mesh, or past another object. I do not have xray mode enabled; the things that are getting selected aren't visible to me, but suddenly they are getting selected.
I loved that this was not the case in Blender, that toggling xray mode on and off controlled whether or not you could select through mesh, and that accidentally selecting things was, as a result, much easier to avoid in this programme than in others.
Has this setting changed in the 4.1 update? Or have I somehow messed up this setting? And most importantly, how do I change it back? It is driving me crazy that it's making me more inaccurate.

Under Edit > Preferences > Viewport > Selection make sure GPU Depth Picking is checked. I've had selection get "scrambled" and required restarting Blender to get the regular behaviour back. Otherwise something may have changed codewise that had undesired effects in your GPU. Make sure your drivers are up to date.

@DuarteFarrajotaRamos thank you!! :)


text:
Can you use regular curve objects as guide hairs for a hair system?
I am looking to create a hair system - either using the new geometry nodes style hair or a particle system, I don't mind that, but I was wondering if it's possible to use curves as guide hairs? Like I didn't comb guide hairs into place in the "place empty hair" mode, I modelled locks of hair using mesh, then converted the vertical edges into curves, and now I have a curve object that has all the shapes I would need to guide a hair system, but I'm not sure if I can use it? If so, how could I? Thanks!

Maybe, but have you tried using the geometry nodes system from scratch yet? It’s really very easy once you know how to do it.

@TheLabCat Is there a node/node setup that will let me use these curves as guides?

I know that’s your main question, but have you used the system from scratch? It might actually be harder to try and save the work you’ve done and converted to correct format than just starting over. Also, I found the node hair system a bit confusing at first, so I think it would be helpful if you made sure you knew how to do it in the standard fashion as sort of an experiment control / baseline.

yeah i have, i'm asking specifically about this


text:
How to get selected edges length?
I have a female model and I want to know her waist width, so I select the edge loop, then use what tool? Is this only possible with python?

Update
I recommend using the newer measureit addon instead.
To measure the sum of the length of a bunch of edges like this:

Select the edges
Set the Sum group in Tool Shelf > Measurit > Tools
Click Segment in Tool Shelf > Measurit > Tools

Now the total length of those edges will be displayed at the bottom of the Measureit panel in the properties region (N).
Be aware that addons have no reliable way to track vertices, so if you modify the mesh your measurements may go awry.

Original answer
You could use the new Ruler/Protractor tool located in the 3D view > Tool Shelf > Ruler/Protractor

Note that this was just added in Blender 2.67.

This thing is a pain to use, but just so everyone knows, use left click to place one end, then without letting go, drag a little way. Release the left mouse, then left click on one end of the line, hold down control and snap it to a desired vertice. Then release again and left click on the other end, THEN hold down control and move it to another vertice. It you don't press control after left click you will create another ruler. Took me way too long to figure out how to use this.

Is the Ruler/Protractor even an appropriate answer to the question? When I use it, it only measures the direct distance between two vertices, which does not solve the problem at all. Am I missing something here?

@mdomino I thought the OP wanted to know exactly that; the distance between two vertices. I've added an answer for the other possible interpretation I see, namely the circumference.

@gandalf3 Oh, I'm sorry, only now I realize that the OP was trying to find the waist width and not the circumference. However, the title of the question implies the opposite, so I am not even sure, what he wanted. :D Searching for "Blender combined edge length" brought me here, so I think it will be helpful for other people to have the circumference included in the answer, especially since MeasureIt apparently can be used for both. Additional info: You'll need at least version 1.5 of the addon (was looking around for the sum function with my outdated 1.4.1 version).

I recently updated an older script that does this:
https://gist.github.com/zeffii/3839812
Rather than poling automatically, you press sum when you need to know the combined lengths, this also takes into account the blender unit settings.

It also has a copy to clipboard function.

fair warning: it reports local measurements only at the moment. ( i should update that soon so you don't have to apply scale )

This script does not work anymore in Blender 2.77 (and according to a comment on the github page already in 2.75).

And I can now confirm that this works in 2.74. I'll upvote this answer, as this is the only one that actually solved the problem at hand (even though it would be more convenient of course, if the script could be used in the most recent Blender version :) ).

It says "ImportError: No module named 'space_view3d_panel_measure'" when I try to enable the addon. So in the end I am unable to enable it.

space_view3d_panel_measure  is not included in a standard Blender distribution, download from buildbot and you'll get a scripts folder called addons_contrib, it includes that python file..

Gives me the same error. "ImportError: No module named 'space_view3d_panel_measure'"

download from buildbot and take the file from scripts/addons_contrib/space_view3d_panel_measure and install that first, then the module will be available for my script. ( this lets me re-use all the blender units / conversion code)

else.. use the measure_it addon suggested by gandalf :) worth the time.

You're going to have to first enable an addon in your preferences called Measure Panel.
Next, go to the 3D view and press N. Scroll down to the very bottom and press the activate button on the Measure panel. Check Edge Length, select your edge loop and press Update Selection. The length slider will update with the length of your edge loop.

This does not seem to exist anymore in Blender 2.77.

I came here looking for just one edges length, as opposed to the whole edge loop.
For posterity, in blender 3.1 you can show edge lengths by using the options in the 'Viewport Overlays' dialogue, which is one of the drop down boxes at the top right of the 3D viewport. It looks like two circles overlapping. There are some checkboxes down the bottom under 'Measurement':

Thanks! If you get strange readings (like I did), then you might want to 'apply scale' first.

In Blender 4.0 the Edge Length tick box has moved to the new Mesh Edit Mode Overlays dropdown menu. You need to be in Edit Mode to see this menu.

Go to 3d view (Layout), enable snap to edges (magneet thing in top) and use Measure tool (M), it will auto-snap to edges and you will easly (at least i hope so) be able to put it on start&end of edge


text:
Why is the "render engine" selection menu missing?
The dropdown menu to select the render engine (e.g. "Cycles", "Blender Internal", "Blender Game") isn't showing up:

I compiled Blender myself (SVN r56975), and although I've enabled WITH_CYCLES with CMake at compile time, the Cycles addon warns about missing script files. But the "Blender Game" option should still be there.

you could try running "blender -b -E help" in the command line to list available render engines.. maybe blender game wasn't enabled?

Only BLENDER_RENDER but I configured CMake with WITH_GAMEENGINE and WITH_CYCLES. I don't know why they're not there. Also, why would this happen? They should both be working.

I don't know, though this bug report looks related: http://projects.blender.org/tracker/?func=detail&atid=498&aid=31109&group_id=9

I've never had this problem on this computer (or on any computer I've used Blender on), which is strange. I just did svn up and rebuilt it.

Is there any particular reason you want to build from source? would using http://builder.blender.org/download/ work for you?

Unfortunately, I change the code, so no.

Building blender is not topic for the site

Agreed, but I think that, with a more generic title, this could serve as a good way to explain (once) what to do, much like you suggest in http://meta.blender.stackexchange.com/questions/181/answering-vague-support-questions-once

Short version:

check first a build from builder.blender.org
then

verify source modifications
verify build settings

fix your modifications or build settings.

When you see weird behavior in own builds for which you also have changed source always check a build from builder.blender.org . If the unexpected behavior doesn't show up with such a nightly test-build, then you should review your modifications and build settings as they are apparently the cause for the behavior.
For building settings and troubleshooting of builds, refer to the build instructions for your own platform and build system. There are trouble shoot sections for each way.
If on the other hand the unexpected behavior is replicable with such a build, then you likely have found a bug, at which point you should be reporting that to projects.blender.org


text:
How to create a Pacman-esque clock icon
I'm trying to create a flat plane icon of a clock that can start full and over the course of time have it's outer edge swing 360 degrees around it's center point and then terminate when it's gotten back to it's starting point. An example would be this image of a clock but with just the green portion visible: http://cdn.vectorstock.com/i/composite/93,19/time-steps-icon-vector-749319.jpg
I really just started using Blender last week so I feel like I'm pretty in over my head. What I've seen so far suggest that Shape Keys could be a solution, but I'm not sure how to get a flat shape to link to a circle. An array modifier could also be a solution, but I'm not sure it'll work on a solid object.
Does anyone have a solution to this?

An array modifier would work, but it would appear/disappear in steps. Would that be acceptable?

I would eventually like to have a nice, smoothly animating clock, but I might be able to make that happen if I set the number of objects on the array high enough right? Still it would be nice to know if what I'm asking for is impossible or not

It would require an awful lot of segments.. There must be a better way..

Even using Shape Keys requires a lot of segments to get a nice smooth look, but even then I'm still stuck at the point where I somehow link the shape keyed points to a curve.

Update:
The original method did not work due to a limitation of blender's interaction with the Carve library (used for boolean operations). Here is an updated technique.
Example file

You can do this using Boolean modifiers:

Add a cylinder and a cube, then move the cube 1 BU on the X and -1 on the Y. With the cube selected, enter edit node and delete one edge:

Then select one of the remaining two face and press P> Selection:

With the 3D cursor in the middle, select each cubeface/plane object and press CtrlShiftAltC to snap the object origin to the 3D cursor:

Add a Union boolean modifier to plane 1 (it doesn't matter which plane is plane 1 and which is plane 2, but once you decide you shouldn't switch) and select plane 2 as the target object:

Add a Difference boolean modifier to the cylinder and select plane 1 as the target object:

Optionally add an Edge Split modifier to get rid of the dark shadows (only visible when the mesh is smooth shaded) caused by the poor topology produced by the boolean operation.
Insert Rotation keyframes (I> Rotation) to animate the rotation of either plane:
For example:

On frame 1 with one plane selected insert a rotation keyframe (I> Rotation)
Go to a later frame and rotate 360° on the Z (RZ360)
Insert another rotation keyframe (I> Rotation)

Oh my god that is a thing of wonder! Thanks so much Gandalf!

Ok I got everything set up as you described, but when I applied the difference modifier and targeted the first plane the entire cylinder vanished. So questions: Are the two planes a single object? I'm assuming no at this point because then how would you target the various parts of it? My other question was in regards to the animation but I suppose that can wait until I've solved this issue...

The cylinder is definitely bisecting plane1, you can clearly see the alteration in that plane's geometry.

@Stinkhorse what do you mean?

@Stinkhorse For some reason it only works when I start with a cube, delete one edge, and separate the remaining two faces into separate objects. Will report as a bug, that shouldn't happen..

@Stinkhorse I have updated my answer, it should work now.

Sorry for the slow response. I'm just getting off of work. Thanks for the updates. I'll try and put this into motion once I get home!

It worked! Thanks so much for your help!

Somehow setting the operation type as: 'Difference' for a cylinder doesn't work for me. I had to set it as an 'Intersect'. Now it works fine :). Gandalf3. You're the best!


text:
How to connect faces between 2 edge loops?
I'm trying to fill empty space in my mesh, and I looked at the knife tool page on the Blender Wiki, and I'm not sure if there's a way to make it so that a new edge is made using the knife tool. I took a screenshot, and hopefully it'll explain better than I can of what I'm trying to do. Oh and I'm using Blender version 2.71, by the way.

In your particular situation, it looks like the bridge tool is what you want. Select two or more edge loops with AltShiftRMB, and then connect them with W>Bridge Edge Loops:

Fill
To do exactly what it looks like you are trying to do in your screenshot (connecting two vertices with an edge), select the two vertices and press F to create edge/face.

If you have the bundled F2 addon enabled you can create a new face from the selected edge and the surrounding vertices by pressing F again. The side on which the new face is created is controlled by the cursor position.
Knife
The knife tool is for cutting edges into existing faces:

Did you manually select those vertices in the last gif? If not would you mind telling me what key you held down before selecting multiple vertices at once?

@Marie Alt Shift RMB to select multiple loops (Shift maintains the existing selection)

This answer would be better if it noted bridge first (since this answers the question)

Do note that in the second gif the F2 addon is enabled.

@David Good catch, I thought that I was using the F2-like behavior which was added in 2.67, but it seems that it's not working in this case? (bug?)

@ideasman42 Good point. Reformatted, hopefully it's easier to parse now.

I hope I don't add to the confusion here with more F2 talk.  You're correct that the F2 Addon is not necessary anymore for that behavior.  However, I found that it works best when in Edge-Mode.  Repeatedly filling in faces like that using Vertex Mode was buggy for a long time and maybe still is so I always do that in Edge mode which seems much more consistent and stable.

In Blender 2.8+ right click and the specials menu appears (no longer 'W' shortcut).


text:
Execute function only once in a infinite loop on blender game engine?
I'm new to blender and python..I want to clear the input serial buffer of the blender game engine before reads data from it.
I have used GameLogic.SerialPort.flushInput() to clear the buffer. I have connected "always" sensor with the "True" level triggering.Therefor code can run infinitely.
I only need to clear the input buffer once in the loop but it always clear the serial buffer..
Any ideas how to clear serial buffer once in the infinite loop...
Blender code

import GameLogic
import serial

port = 'COM12'

try:
    GameLogic.SerialPort
except:
    GameLogic.SerialPort = serial.Serial(port,115200)

GameLogic.SerialPort.flushInput()
.
.
.
rest of the programm

Use a control variable, and check it before trying to flush; Or do that outside the loop.

Thanks for replying me..I have tried that.but here I didn't use any loop in the blender python programme .Loop was created by "true level triggering sensor" in the logic editor .Therefor it again flush the input buffer.