RegionView3D from Region object and vice versa How do I get a RegionView3D object from a Region object?

I'm working on an operator in the quad view of the 3D view and I need to determine which region the user clicked in and the relative position to that specific region

I've tried event.mouse_region_x and y but those are relative to the original region that the operator was ran in
I've also tried using the ctx object provided to the operator's modal function as well as bpy.context but both seem to be frozen on the original place the operator was ran in?
Current solution is to check all areas in bpy.context.screen.areas, find the one clicked in and then find the region in that area. This means I now have a region but I can't get the RegionView3D from it. This is because RegionView3D is accessed from a Space object and that doesn't have any actual positional information on the screen.

A RegionView3D is actually a space, the access path is bpy.context.screen.areas[#].spaces.active.region_3d (area being of type VIEW_3D), or in case of quadview mode, ... spaces.active.region_quadviews[#].

There are no direct references from a region to a RegionView3D.

It's possible to find the right quadview region and its space, here's a (modal timer) example:

import bpy
import math

def get_view_orientation(space, quadview):

    if quadview.view_perspective == 'CAMERA':
        view_orientation = "Camera Persp"

    else:
        r = lambda x: round(x, 2)
        view_rot = quadview.view_matrix.to_euler()

        orientation_dict = {(0.0, 0.0, 0.0) : 'TOP',
                            (r(math.pi), 0.0, 0.0) : 'BOTTOM',
                            (r(-math.pi/2), 0.0, 0.0) : 'FRONT',
                            (r(math.pi/2), 0.0, r(-math.pi)) : 'BACK',
                            (r(-math.pi/2), r(math.pi/2), 0.0) : 'LEFT',
                            (r(-math.pi/2), r(-math.pi/2), 0.0) : 'RIGHT'}

        view_orientation =  orientation_dict.get(tuple(map(r, view_rot)), 'USER').capitalize()
        view_orientation += " " + quadview.view_perspective.capitalize()

    if space.local_view is not None:
        view_orientation += " (Local)"

    return view_orientation

def get_quadview_index(context, x, y):
    for area in context.screen.areas:
        if area.type != 'VIEW_3D':
            continue
        if len(area.spaces.active.region_quadviews) == 0:
            return
        i = -1
        for region in area.regions:
            if region.type == 'WINDOW':
                i += 1
                if (x >= region.x and
                    y >= region.y and
                    x < region.width + region.x and
                    y < region.height + region.y):

                    return (area.spaces.active, i)
    return (None, None)

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None

    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            return self.cancel(context)

        if event.type == 'TIMER':
            space, i = get_quadview_index(context, event.mouse_x, event.mouse_y)
            if space is not None:
                quadview = space.region_quadviews[i]
                print(get_view_orientation(space, quadview))

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        self._timer = wm.event_timer_add(0.5, context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.modal_timer_operator()


Snappping the 3D cursor to the surface and find the surface's face it was snapped to To snap the 3D cursor to the surface of my object, I set the "Cursor Depth" to True in the interface user preferences. How can I know exactly to which face/vertice the cursor was snapped (in code)?
Do I need to use object.closest_point_on_mesh?

object.closest_point_on_mesh(bpy.context.scene.cursor_location)

Or maybe this data is stored somewhere? Isn't is the whole purpose of Cursor Depth? Also, how can I know which object was it snapped to, in the case of multiple objects in the scene?
Thanks!

Using Scene.ray_cast

Can shoot a ray into the scene using Scene.ray_cast from the cursor location, in the direction of the converted view matrix's z axis.  Test code, prints the ray hit (if hit) of each 3d view in the context screen.

import bpy
from mathutils import Vector
context = bpy.context
screen = context.screen
scene = context.scene
areas3d = [a for a in screen.areas if a.type == 'VIEW_3D']
for a in areas3d:
    r3d = a.spaces.active.region_3d
    vm = r3d.view_matrix.transposed().to_3x3().to_4x4()
    norm = vm * Vector((0, 0, 1))
    norm.normalize()
    ray = scene.ray_cast(scene.cursor_location, norm)
    hit, loc, norm, face, obj, matrix = ray
    if hit:
        print("hit object", obj, "on face:", face)


What is better for rendering in cycles? A network? Or a single monster workstation? Is it better to have multiple render nodes and do rendering over the network?
If so - is there a special software to set this up and is it hard to configure this? Is there a max amount of render nodes?

Or would it be better to have one "monster" workstation with multiple GPUs (5-6 GPUs)?

As far as i know Maya only supports 4 render-nodes... so my question is if there is such a limit in Blender? And the other question if it is difficult to set up a render-farm or render-nodes: I have never tried it so my question is if i will run in a lot of problems if i will try it (i want to use a GPU-based renderer like Cycles). I hope i have explained my thoughts now enough. Thanks for kindness with a noob :-)

As far as i know Maya only supports 4 render-nodes... so my question is if there is such a limit in Blender? And the other question if it is difficult to set up a render-farm or render-nodes: I have never tried it so my question is if i will run in a lot of problems if i will try it (i want to use a GPU-based renderer like Cycles). I hope i have explained my thoughts now enough. Thanks for kindness with a noob :-)

That will depend on the task and the level of effort you want to put into it.

If you are rendering an animation then you will easily benefit from using multiple machines, each machine can render a single frame at the same time giving a very linear speedup based on number of machines. There is a network render addon included with blender. You may want to look at Flamenco which is the new render farm being developed for the gooseberry project. You could also manually start each machine with a different range of frames. There are also a few render farms available that you can pay by the hour or some similar metric.

If you are rendering a single image then a single machine is the easy way to go. There is no freely available way to break up a single image to render it on multiple machines, it can be done but currently you will need to break up the image and combine it yourself or create an automated way to do it.

There are no restrictions to number of machines you can use on any of the render farm options.


Is it a problem to use triangles in a vehicle mesh for a game? Does a vehicle like a plane have problems if I use triangles for its mesh? The plane will be animated for a game.

For models that do not undergo deformation (stretching/squishing/bending), it doesn't matter if your model consists only of quads or not. Some nice things about having topology consisting of similarly sized, nearly regular quadrilaterals is that calculations involving adjacent faces are well-behaved, so you won't expect to get weird artifacts during a render, among other things. But this holds for quads and tris.  In general, it is always best to have a model with similarly sized, regular(ish) faces. It is only when you have a model that will deform that you would like to use quads because that allows you to create rings and loops, which enables smooth deformations.


Controling the speed of the tube animated with curve I'm trying to make a tube extending with help of curves. I created a NurbsPath and BezierCircle, then put the circle into the bevel object of the path and animated its start bevel factor. Everything like any tutorial says, but I've got a problem. For my specific project I need straight 90 degrees corners, but curves tends to smooth them. So, to overcome this I extruded my curve 4 times in each corner. Just like you do when working with catmull-clark subdivision surfaces and need a straight corner.
  Now the problem is that the speed of extending somehow depends on the sectors. It is slow at the start of the sector, speeds up to the middle of it and slows again in the end. So after all it is too slow on the corners and too quick on the long sectors. I tried to control it manually by adding additional key frames for corners so they could take only 1 or 2 frames instead of 8 but with blenders own speeding and slowing it all got messed up. I can still play with manual key framing to make it acceptable, but I wonder if there any smart way to control the speed.

Try using free handles on the corners.

You can set the selected control vertex handle(s) to free with V> Free.

You can also set the keyframe interpolation of the selected fcurves to linear with T> Linear in the graph editor to avoid extra smoothing of the keyframe animation.


Artefacts while filling in faces I'm incredibly new to Blender, so I apologise if this question has a simple answer.

I'm trying to select vertices and fill them in, but when I do the filled faces seem to overlap with another face.

Here's a screenshot of the problem.

Any idea where I'm going wrong? Any help is appreciated.

Select all the verts or edges that make up the hole and press the F key. Your hole will be filled in as long as all the verts or edges are part of the same mesh.


Modifying what vertices a bone affects I hope this hasn't been answered somewhere else. I remember having found it a long time ago but I've been looking for the answer for a week with no success. I know there is a way in which you can select manually which vertices a bone moves when animating (something like assigning or removing the influence a bone has on a vertix) , but I can't find the way to do it and I was hoping someone would?
Ps. This isn't the weight painting method
Thank you in advance!!!

Thanks to @leander for this: The way to do this is to first select the object whose bone influences you are looking to modify. You can then go into edit mode and into the object data properties.
From there you can see a list of the bones affecting the object and by clicking on each one you get to see what vertices it has an influence on (the vertex groups of the bone). You can then remove any unwanted influence or assign an influence it doesn't currently have.


How to make Curve do not deform object? I attached Array and Curve modifier to an object, there's no problem, but the Curve deforms the object as usual. So, my question is: What should i do to make Curve modifier not deform the objects?

The links in the comments are the answer but since I have made a picture, why not post it anyway:

Instead of deforming the object directly, deform a stack of tris. Then parent your target object (the cylinder in this example) to the deformed object and enable duplifaces for the tris in Properties >> Object >> Duplication.

Just make sure the object you want to duplicate has its scale applied or there will be deformations.


Blender Rendering includes smoke in image render but not in animation render Today i open my pc to see my render has failed, there is no smoke in my scene.

I have made the animation and included smoke, the letters are fine but the smoke does not appear in the animation render.
I have rendered the scene with "Render Image" and everything seemed ok? but when i render animation the smoke does not seem to show.

I am sure it has something to do with the render process and i have spent hours researching this to no avail.
You can get the blender file here: https://mega.nz/#!slNTFDKK!ZkCzXKKlv8EtrLOxq1V2glWrp_p0Bbl9-Rk-4UWClTo
Thank you.

Ok guys i figured it out... and im an idiot.

Turns out the smoke rendering only begins at frame 2.
I never let it go past 1 :/


speed up rendering a static scene with a moving camera I have a room and a moving camera inside. Everything is static, including lights.
I am under the impression that there should be a way to theoretically speed up the rendering time tremendously, as ray tracing and other calculations are likely to be duplicated among individual frames. I may be totally mistaken and misunderstanding the basics of rendering though as I couldn't find any related questions in the forum.

The answer is yes, but first I would like to explain something.

Cycles is what is called a backwards ray tracing engine.  This means that it sends photons (rays) from the camera instead of from light sources.  It then traces the ray backwards through the scene until it hits a light source or goes off into space, it then figures out what color that pixel should be based on what the ray hit.  You can read more in the Wikipedia article I linked.  But basically the jist is that rendering as normal, since the rays are coming from the camera (which is what is moving), you can't speed up rendering of a static scene.

But, there is a process called texture baking which allows you to tell blender to calculate the photons in the scene and “bake” what each object looks like to a texture, which you then assign to the object as an emission shader.  Then when you render your scene as normal it is only calculating emission shaders which is much faster.

Andrew Price has a very good tutorial on getting started with cycles baking that I recommend you watch.


Scale & Snap to Fill Space I'm working on making a building and the terrain around it (two separate models) for importing to Unity for a game. I first made the building in another program than blender, then scaled it around a bit, then I built the terrain around it as another model in the same program. I imported them into Blender as STLs, and they're naturally different scales. So I've placed the building within the space that it's supposed to occupy like so...

At that point I tried scaling out from there by setting the bottom corner of that set piece as active, set my 3D cursor there, then tried scaling out using the scale tool and snap to vertex. But I can't get it to snap perfectly to fill the space (gap remaining) like so...

I have to do this for a lot of buildings, so is there a way to get it to scale and snap into that space so I don't have to struggle to get it almost exact for every one?

The best way to go about doing this (that I know of at least) is actually very close to what you are doing already. There are a few minor (but important) differences though.

First, we will have to enable vertex snapping, and we can leave it at the default setting of Closest.

Next, we will need to go into edit mode, select your entire building, and hover your mouse over a vertex that will line up exactly with a vertex in your terrain. A corner is a good choice for this.

Then, with the mouse hovering over the corner vertex, move the building while holding Ctrl  and move your mouse over to the corresponding vertex in the hole in the terrain. The building should snap to this vertex. This is exactly how the Closest setting is supposed to work: the closest vertex to your mouse on object 1 will snap to the closest vertex to your mouse on object 2.

Now you can confirm that operation. Select just this corner vertex on your building now, and set the Cursor to Selected from the ShiftS menu. Set the pivot point to be the 3D cursor using ..

Select the entire building once again, and pick another vertex on the building that will exactly line up with another vertex in the terrain. The opposite corner is a good choice, or something similar. All that matters is that there is a corresponding vertex in the hole in the terrain.

Hover your mouse over that vertex, scale the building, and move your mouse to the corresponding vertex in the hole and the building should snap exactly to the hole.

Since we've done all the transformations in edit mode, you may want to re-position the origin of the building in object mode just to keep things organized (Ctrl+Shift+Alt+C and choose Origin to Geometry).


How to rig an IK leg with 2 knee joints I'm trying to rig a leg with two joints and have been struggling for ages trying to add IK. The chain is 4 bones long so forms 2 knees (Fig 1).

Ideally I can imagine having 2 pole targets (Fig 2) but I don't see that the IK solver allows that.

The kind of poses that are difficult to achieve are having the knee joints pointing in different directions. This can be achieved by rotating the bone between the joints but it is awkward to animate and you lose the connection to the pole target (Fig 3)

Does anyone have any ideas how to rig this effectively?

Thanks!

Fig 1

Fig 2

Fig 3 (top view)

So, here is the solution we've found:

Create a controller for your foot, deparent it, parent the foot to this controller.
Choose this controller as the Target of your calf's IK.
The Chain Length of your calf's IK constraint must be 2.
Create a new controller at the bottom of your bone D.
Parent this second controller to the foot controller (Keep Offset).
Parent the pole target of your calf to the foot controller (Keep Offset).
Add a Copy Location constraint to your foot so that it sticks to the calf.
Add a Damped Track or an IK constraint to the bone D and choose the new controller as your Target

Also note that you can limit the IK bones rotations in Properties > Bone > Inverse Kinematics, or with a Limit Rotation constraint, depending on the bones and the chosen solution.


Camera Shake in 3d video games I am making a 3rd person game in the blender game engine and I noticed that most 3d adventure games (Ocarina of Time, Super Mario 64) do not hold the camera exactly behind the player. Instead, the camera will loosly follow the player. I made the player the parent of the camera so, obviously, it will not naturaly bob around. Thanks in advance to anyone who can help me.

This can be accomplished with the "slow parent" settings. They are found under Properties > Object > Relations Extras. Open them up under the camera and turn the offset up to, say, 9.00. This will give a lot of drag between your camera following the player; When the player moves, the camera follows loosely, just like you wanted. If you want a longer time between parent movement ad the child movement, increase the offset, less time, decrease the offset.


How do I make a cut parallel to an edge? How do I make the cut in the picture parallel to the active edge? How do I also make sure the thickness of the cut of area is a certain value (in this case 3mm).

To get a precise value, you can use Bevel

Bevel the selected edge with 2 segments, Profile = 1
Adjust the thickness in milimeters
Delete > Dissolve the unnecessary edge


My grease pencil colours go different colours in render mode I made my grease pencil image (this lady) and did some fills:  But now when I render out it goes weirdly green.  Any ideas what I might be doing wrong? I've had a look at my layers and they're all fine. I thought I may have a hue modifier on, but I have no modifiers.

I would hazard a guess that you've filled the character using vertex colour instead of material colour. Blender automatically sets the default vertex colour to that delightful shade of green you're seeing.
Vertex colour is only visible in Material Preview and Rendered view so it's likely you were in Solid view and may have set this accidently?
If you're not sure what I'm talking about,  if you look at your first screenshot about midway at the top of the tool panel you'll see the offending green colour as the selected Vertex colour material. The settings pictured suggest the tool is set up to use material colour (the globe Icon) but it's probably likely when filling it was set the vertex colour?
To remedy you could go through and use vertex paint mode to recolour every point or just refill making sure the mode is set to material (globe turned on!).
Great drawing by the way! I hope that resolves your problem.
Matt


My render is complete gray or transparent My render view is completely gray and I don't know why.

Gray render view.

Scene
Render Settings
Outliner
Camera Settings

First: Select the object you want to appear on the render. Check the eye icon is active. Check the camera icon is active.
Second: With the object selected, press "." on the numpad. This will focus on the selectd object. Now, press CTRL+ALT+"0" (zero on the numpad). This will make your current view your CAMERA view. This is ASSUMING you have a camera on scene. If not, create one, and go to step 1 again.
Finally, when you see your viewport and camera; on the outliner select your camera and go to CLIPPING. Set END to : 10 km. This should allow you to extensively look deep into your scene.
Finally if all of the above fails: Go to object properties (the cube icon on the properties region area) and scroll down to CYCLE settings: Make sure CAMERA is CHECKED for ray visibility:

Thank you for your consideration to vote me as the answer by clicking to the left :the icon with a check mark and upvote this answer.

BFCT_Schiller


How can I model from angeled photos in blender? I know that in blender you can use blueprints to model any vehicle but I couldn't found any blueprints for this bus VDL Jonkheere Mistral 30 from the Jutc company and I would love to start a project for it. I also tried writing a letter to the manufacturers asking permission for blueprints and didn't get a response. However I do have alot of images of the bus as I am from Jamaica but I'm not sure if the images needs to be flat like how a typical blueprint would look like (Front view, side view etc). I need professional advice thanks.

You can use blam (or fSpy) to match the camera with the a photo and model from there. See this link that outlines the way to do it: How can I recreate the floor using a photograph?

If you have access to a bus that is parked and you can do the photographs yourself it would be a lot easier. Just go around the bus making a lot of photos with the same lens, import the images into the video clip editor and then use motion tracking as an aid to re-construct the object.

Read: How to do photogrammetry within Blender?

You don't need a fancy camera. A phone will be good enough. If you are concerned about the distortion of the lens, Blender has tools to undistort the image.

Read: How to determine lens undistortion values for motion tracking?


Import .jpg texture into Blender I have a cityscape 3d model that is in .obj format. When I import it into Blender, it does not import the .jpg texture files. Is there any way that I can import the textures manually? Any help would be appreciated.

You could try to convert the .obj file in a different format.

To load images as textures I used that plugin:
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Planes_from_Images


Calculate surface by logarithmic function? Is there any way to use the log() function in order to calculate the surface of a mesh?

math.log(x)

Yes you can use the log method in the XYZ surface, just have to remember that log(x) will throw a math domain error for any value of x less than or equal to zero.

Bad Example using helper method a = log(u) if u < 0 else 0 the equations are x(u, v) = u, y(u, v) = a, z(u, v) = 1

Unfortunately the minima of u and v can not be set greater than zero.  To set a range for say u to [1, 2] could set up a helper method b = u + 1 and use b for u. Similarly for v


How to align imported mesh to grid? I've imported a mesh to blender and it's not aligned to the world so to speak and I need the symmetry. How do I get rid of that rotation?.

You can hit CTRL+ALT+Q to toggle quad view mode, showing your model along all major axes.

From there, you can rotate with r for manual corrections. For finer control, hold Shift while you rotate.

Edit: An alternative method to ensure a symmetric mesh when you're done:

1 to view from front
Tab to enter edit mode
z to display wireframe
b+box select the whole left side of your mesh (you may need to Ctrl+r add an edge loop down the mid-line first)
x delete selected vertices
Add and apply a mirror modifier along the x axis

Not sure how this will differ from what you described in your comment, but it's an option


How to remove connected intersecting geometry? I'm using the Skin modifier to make the base mesh for a creature, to sculpt on later. But I have some self-intersections, and would like to remove all the internal geometry -- kind of like a boolean union on itself.

Here's a small example, created by using the Skin modifier on three edges of a plane:

I tried the Remesh modifier, but it just kept the internal geometry.

The Intersect (Knife) tool in Self Intersect mode easily selects the boundaries of the interior geometry, but I don't know how to go from there to the interior faces I want to delete.

(I'd upload the .blend file of this example, but I'm not comfortable with blend-exchange's terms. Yes, with this file it doesn't really matter, but it's more of a statement than anything else. I uploaded it to Github's Gist service, but I had to Base64-encode it which means Windows users are out of luck.)

You could box select only the visible vertices, duplicate them, separate them (or invert the selection and delete) and then remesh it to fill the holes.


How to get topographical contour lines like shown in manual? Analogous to Rhino3D functionality? The Freestyle SVG Exporter page in the manual shows this image:

but doesn't really have any indication of how to achieve this contour line look...

I did some more digging around and found an article from 6 year ago with a similar image, that had a very similar picture and provided a script, which I've yet to try (haven't messed with scripts in blender yet...):

Is there a more "official" way of achieving this? I know e.g. Rhino3D has contour line command so I'm wondering if blender has anything similar?

edit: I want to render the scene as an svg, should have specified. I got the script to work, but it's destructive... it operates on the mesh directly unfortunately. If anyone can find a way around this would be helpful.

Simple node setup that uses the separated Z texture coordinates and modulo to drive a repeating color ramp.

Use the green cursor on the ramp to change thickness of lines.
Use the Z Scale to adjust line space
For the ground, same texture but using the X texture coordinate component.


Populate a list with custom property dictionary data So I'm having some trouble wrapping my head around UI lists.

I've got a custom property on my object that stores a list of data like this:

ob["zones"] = [{"id": 1, "name": "foo", ...}, {[...]}]

I'd like to be able to read all of the name properties into the UI list, but can't figure out the best way to do it. There's currently a placeholder list box based off of the example template for material slots in my panel, but that's as far as I've gotten.

Create a CollectionProperty and supply an own class derived from bpy.types.PropertyGroup, in which you define your properties (it already comes with a StringProperty called "name").

In your UIList class, item refers to what you pass to layout.template_list() as 3rd and 4th argument, so the collection. Thus, item.id and item.name refer to entries in the collection Object.zones in the example below:

import bpy
from bpy.props import IntProperty, CollectionProperty
from bpy.types import Panel, UIList

class OBJECT_UL_zones(UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
        split = layout.split(0.2)
        split.label(str(item.id))
        split.prop(item, "name", text="", emboss=False, translate=False, icon='BORDER_RECT')

class UIListPanelExample(Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "UIList Panel"
    bl_idname = "OBJECT_PT_ui_list_example"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        layout.template_list("OBJECT_UL_zones", "", ob, "zones", ob, "zones_index")

class Zone(bpy.types.PropertyGroup):
    # name = StringProperty()
    id = IntProperty()

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Object.zones = CollectionProperty(type=Zone)
    bpy.types.Object.zones_index = IntProperty()

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Object.zones

if __name__ == "__main__":
    register()

    # Add an example entry every time this code is executed
    ob = bpy.context.object
    item = ob.zones.add()
    item.id = len(ob.zones)
    item.name = "Zone " + chr(item.id + 64)


Can't disconnect bones So, i'm making a jumpscare, and i need to get that puppet out of the character's arm. But when i try doing so, this happens;

https://i.gyazo.com/883e8c5200d774a1b844697df19ddf46.gif

The rig somehow made an IK rig by itself or something. I have nothing to do with those yellow bones. How do i fix this?

I'm not sure how your mesh is set up but you can try going into Edit mode and selecting the bone that you want to be separated. Then, go into the Bone panel and under the Relations section, remove the parent and uncheck Connected.


looking for a location of window add-on Could someone post an active link to the latest version of window generator add on please? I have looked for the last hour and while many links go to a dropbox site the links are all removed.

Never mind. I found one. Here's the link for anyone else looking: https://github.com/Antonioya/blender/blob/master/add_window_3/add_window_3.zip


Collada Import in 2.76 Just got blender and was going to get started trying my hand on some .dae files, however after trying several times to import them, nothing seems to happen. I get nothing. Am I doing something wrong, some settings need to be in place before doing a file>import>collada?

Any help pointing me in the right direction would be appreciated.

It could be that the geometry content of your DAE file is a type that the Blender importer does not understand.  I was trying to read in Collada files that were made from triangle strips and I got the same result.  No error message, no visible geometry, no objects in the scene tree.  The files passed the consistency checker with no errors.  These were files I was generating myself, so I was able to change the geometry from triangle strips to triangles and it worked fine.  I am using an older version of Blender, 2.69.

When I searched for information on Blender importing Collada triangle strips I found old reports of the importer not working, but no recent reports on working/not working.


CUDA Error in Cycles on a Mac I keep getting a CUDA error when I try to render cycles with GPU Compute selected. In this answer (the site won't allow me to respond there) https://blender.stackexchange.com/a/18408/20471, @BlendingJake says that SSS on the GPU eats up so much memory that it is recommended to have more than 1 GB of memory on for your GPU. I'm having the same problem as the OP in that string; however, I have 2 GB of RAM on my GPU. Why do I still get this error?  My specs are below:

1.System: OSX 10.11.3

2.Blender version: 2.76

3.Processor: 2.3 GHz Intel Core i7

4.Memory: 16 GB 1600 MHz DDR3

5.Graphics: NVIDIA GeForce GT 750M 2048 MB

6.CUDA Driver Version: 7.5.25

I have the same issue on a Mac Pro 5,1 using an Nvidia 980GTX with 4gb of ram. It'll CUDA error on a simple scene sometimes.

• What I can find help is to shut all other apps down reopen Blender and try again.

• Reboot, only open blender and try again

• I use a 4k monitor, sometimes, halving the resolution can make it work.

I think it's a known error, that I really hope it's something that's addressed in the future.

Is this only mac users or do windows / linux users suffer the same problem? I might make a bootcamp or linux partition if there's no issues there.


rigify export fbx causes twitching I'm using blender 2.82 and the rigify add on.
I tried to do a dragon rig and even though its not perfect it works for now. At least in blender... when i try to export it the spine causes some weird twitching.
i already read tons of threads but no solution worked for me.
like the gamefriendl script by paolo https://developer.blender.org/p/pkrime/
or the shear patch
i alredy checked for non uniform scales but havent found any
(in the fbx there are some but even putting everything back to 1 doesnt help...)
the only thing that kind of worked was usind the origional bones instead of the def bones, but hat causes new problems.

does anyone have an idea what im missing here?

Well i dont think i'll get an answer what i did wrong but maybe this will help someone else in future....
I still havent found the reason for this behavior but I think I finally found a workaround that works and you dont have to do much for it.
while the first workaround was using the origional bones as deform bones and renaming the vertex groups whick caused trouble with some weights and the tail looked messed up, because the origional bones move differently than the deform bones I noticed that i could exchange some Origional bones within the spine with their deform bones without getting the twitching again.
so i tried to exchange only the parent of all spinebones (the bone at the end of the tail) and it worked for me. no more twitching in unity.

so the detailed steps where (my way):

find the rootbone of the evil twitching (first spine bone in my case)
rename the prefix of the deformbone (i used fill-spine..),clear the deform checkbox and move it to another layer (not neccessary)
take the Origional- bone (ORG-...) counterpart of that bone, move it to the deform layer, tick the Deform checkbox and rename its prefix to DEF-...
Parent the rest of your def rig to your new bone.
maybe you need to rename the vertexgroup for that bone, because it automatically changes in step 2. (in my case change Fill-... back to DEF)

Let me know if there is a better way :)


How to get rid of freestyle faces? So here's whats happening. I marked all of my faces as freestyle. If I press 'clear freestyle face' the annoying green line over everything stays. Is there something I'm doing wrong or is it something different to freestyle?

Image:

It seems to me you marked freestyle edges, not faces. The green lines are the edge marks.

To clear the marks go to Edit Mode, press A to select everything, then Ctrl+E to bring up the Edges menu and select Clear Freestyle Edge.


Number Keys not Changing View As I understand it, the number keys are used for changing the view, but they are changing the 3D Layers instead. Can anyone help me? Thanks!

You have to use the numpad keys, not the number keys. However, if you are on a laptop or similar device that does not have a numpad, you can do the following.

Go to File > User Preferences > Input tab and check Emulate Numpad. This will allow the number keys at the top of your keyboard to function as numpad keys. You will, however, lose the functionality to switch layers, the shortcut to add a Subdivision surface object modifier, and whatever else they are good for. Make sure to click Save User Settings at the bottom of the User Preferences panel. This will make it so that you can use these keys every time you open Blender, rather than having to change the user preferences every time.

The File menu:

The User Preferences window:


MixRGB nodes don't add up Value as I expected. What knowledge am I missing? Why don't these add up to 1?

I have seven RGB Input Nodes that are greyscale and have Value of the following amounts:

0.18333
0.2
0.15
0.18333
0.1
0.06667
0.11667

I would expect these to add up to 1 and become white, but that is not what happens.

Instead I get a dull grey (#686868):  Why is this?
(There are no other lights in the scene.)

This is my node set-up:

Next I tried using Add Shaders to see if that would make a difference, but it did not:

Update & semi-answer: This works ↓ (but I don't know why)

I had been adding the Value:

I should be adding the RGB if I want them to add up to white:

I didn't realize that the value is sort of a result of the RGB. Nodes that add are adding the RGB, not the Value.

(I'd be happy to accept an answer that explains how the two are related.)
The answer is probably in here somewhere.

Go get white you have to pass something that will increase the color. For example... You have add and a factor of 1.000. This means you are not mixing the colors, but instead using one input of the node.

Just curious though, what are you trying to do? Why not just use a white shader?


VSE How to render faster? I did go ahead and do my part to look it up
There are answers out there but they are years old and outdated when compared to the current version/build

Currently, I'm rendering a video that's about 20 mins long and it says that the estimate is over 2.5 hrs

My 1st question is if that's normal
And my 2nd, how to optimize rendering

Thanks

Using the Parallel Render add-on will allow you to render, from the Blender Render panel, using all cores, which will give you a speed-up: https://github.com/elmopl/ktba/blob/master/scripts/addons/parallel_render.py

Another thing which may speed up export is to change the colorspace from Filmic to Standard.


Is there any form of security on paid addons I just bought an add-on and realised that it's literally a ZIP file with the source visible, just like a regular add-on. I have read the user-term agreement and the EULA, but is there anything preventing me from secretly redistributing the add-on other than moral and legal obligation???

Nope. A lack of DRM goes with the free software culture surrounding Blender.

I obviously can't speak for why any particular addon authors choose to eschew DRM, but it's not uncommon at all. In fact, a number of paid addons are under the GPL and live in public repositories. Gaffer and RetopoFlow, for example.

Gaffer even goes so far as to encourage trying it out before buying; from the README:

  You can download it here to try it out. If you like it, please consider purchasing it from the Blender Market. $20 isn't much, and every sale puts a smile on my face and motivates me to keep developing it :)


Do BGE rigs have to be IK or FK? I'm currently working with a few Blend Swap community members on making a game called Project Illumina, and we'd like to build a sandbox for our main character development (actions, animations, powers, etc.) and I was wonder do character rigs for the BGE have to be IK or FK or a combination of both? Anything goes for game animations?

They can be either! although FK rigs are much easier on the game engine's animation player, they're usually not as flexible (i.e. your player doesn't look where the camera does.) I tend to use a combo of both:

To start with, give the player animations (FK) then, simply add the constraint you want (the fewer the better) and add a "armature" actuator. Now this is automatically set to "run armature" but the setting can be changed to "enable/disable" (for individual constraints) or "set influence" or even "set target" which, although is resource consuming for your computer, can bring you some awesome mechanics that just aren't available for FK rigs.
And don't be fooled, not just the IK constraint can be used with the armature actuator, track-to and the whole kebab can be integrated into your game just as easily (with a few exceptions, I’ll look them up).

Now, usually, to get my player to look where I want, he needs a vertical head bone. I next add a cube at the location of the head bone, set it to no-collision, and add an empty above it. Parent cube to player, empty to cube, give mouse look logic to the cube and set the IK target of the head-bone to the empty and you're gold!


beta 2.8 screen capture How to make a screen capture video in 2.8 beta? In 2.79 the screen capture shortcut was Alt-F3. Is there an alternative way in 2.8 beta? (The screencast is in the Window pulldown and has, as far as I can tell, no shortcut.)

In Blender 2.8x, every menu item that doesn't have a shortcut can be assigned one very easily:

right click on the menu item, then
either select

Add to Quick Favorites: your quick favorites will be available under theQ shortcut for quick selection
Assign Shortcut: you can now assign a custom unique shortcut.

I think the developers have made sure to leave F4 to F10 unassigned ("minimal keymap" philosophy) so that you can use these keys as custom hotkeys.


Change Particle attributes when inside a specific area Do you know a way to change some attributes of particles, when they enter a specific area (e.g. change color/material, make them slower)?!

I also want the particles that enter a specific area to stay inside it (e.g. don't fall through it's bottom face).

I am trying to let the particles fill out a specific mesh but don't know where to start.

This is how far I am:

The "0" and "1" are my particles (always facing the camera).
I want them to get slower and change their material inside the weird shaped Mesh (and the object should be invisible in the final render).

For now I just gave it a collision, I don't know where to start wwith this task. Thought about adding forces but ... meh...

Blend file:http://www.megafileupload.com/596c/particles01.blend

I want to change the color/material within Cycles renderer in the end.
But more important are alterations to the particle speed, so that you can guess the shape, if there are "enough particles inside the invisible object".

Keyed Particles is one approach

Note Blender Render, Cycles not considered

The green sphere holds the plan for particles moving from the yellow cube to the red tall box.
This is a starting point for further research.

You stated
[I don't know where to start wwith this task]


Blender rigify character animation to Unity looks so weird I have used rigify for rig my character and make some animations to use in my games. But in unity they looks so weird. Searched questions about this issue, and I have tried some solutions like change export settings, bake actions, roll bones in edit bone etc. nothing solved my problem. Thanks for any help.

You have probably "scaled" some of the bones. This happens when you use the squash/stretch features of the Rigify rig. Scaling often cannot be correctly baked and exported to other applications.
One solution is to remove squash/stretch from your animation. Just make sure that the bones are never over-extended during the motion. For legs/arms there is also a Rigify slider that turns stretching off. But the spine for example is "stretchy" by default and you have to be careful not to stretch or squash it.
So my suggestion is to remove all stretching from your animations and test again. If things look good in Unity, then it was indeed the stretching that caused the problem.
If you want squash/stretch there are a few ways to achieve it. I explain why the problem happens in the first place and show a few solutions in this video. (1 hour long but it may be worth it if you're new to working with Game engines)
https://www.youtube.com/watch?v=1Xm1h700uhk


How to connect nodes to node group inputs and outputs in python? How can I connect nodes in a node group to the input or output sockets?

This connection here:

I can't figure out how to access the group node_tree, and the Group node as well as the Group input/output nodes seem to be different than normal nodes.

My script so far:

import bpy

for area in bpy.context.screen.areas:
    if area.type == "NODE_EDITOR":
        override = {'screen': bpy.context.screen, 'area': area}
bpy.ops.node.select_all(override, action='DESELECT')

tree = bpy.context.object.active_material.node_tree
nodes = tree.nodes
links = tree.links

node = nodes.new(type='ShaderNodeMath')
node.operation = "ADD"
node.location = (100,0)
node_add = node

node = nodes.new(type='ShaderNodeMath')
node.operation = "GREATER_THAN"
node.name = "greater"
node.location = (-100,100)
links.new(node.outputs["Value"], node_add.inputs[0])

node = nodes.new(type='ShaderNodeMath')
node.operation = "LESS_THAN"
node.name = "less"
node.location = (-100,-100)
links.new(node.outputs["Value"], node_add.inputs[1])

bpy.ops.node.group_make(override)
bpy.ops.node.tree_socket_add(override, in_out='IN')
bpy.ops.node.tree_socket_add(override, in_out='IN')
bpy.ops.node.tree_socket_add(override, in_out='OUT')

As a rule of thumb, you should try to avoid operator calls in scripts and use api functions directly as much as possible (if you do this, no need to override). So the snippet below is not needed.

for area in bpy.context.screen.areas:
    if area.type == "NODE_EDITOR":
        override = {'screen': bpy.context.screen, 'area': area}
bpy.ops.node.select_all(override, action='DESELECT')

Through some experimenting, I found it's easier to not use group_make as the default GroupInput and GroupOutput nodes it creates can be a bit unwieldy and adding a Socket to a tree creates a template rather than an actual socket (the lists displayed in Interface panel).

Rather, it's easier to create a new node group with bpy.data.node_groups.new and work with that.

import bpy

group = bpy.data.node_groups.new(type="ShaderNodeTree", name="testgroup")
group.inputs.new("NodeSocketFloat", "Input One")
group.inputs.new("NodeSocketFloat", "Input Two")
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (0, 0)

group.outputs.new("NodeSocketFloat", "Out")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)

gtr_math_node = group.nodes.new(type='ShaderNodeMath')
gtr_math_node.operation = "GREATER_THAN"
gtr_math_node.name = "greater"
gtr_math_node.location = (200, 100)
group.links.new(input_node.outputs["Input One"], gtr_math_node.inputs[0])

lss_math_node = group.nodes.new(type='ShaderNodeMath')
lss_math_node.operation = "LESS_THAN"
lss_math_node.name = "less"
lss_math_node.location = (200,-100)
group.links.new(input_node.outputs["Input Two"], lss_math_node.inputs[1])

add_math_node = group.nodes.new(type='ShaderNodeMath')
add_math_node.operation = "ADD"
add_math_node.name = "add"
add_math_node.location = (400, 0)

group.links.new(gtr_math_node.outputs["Value"], add_math_node.inputs[0])
group.links.new(lss_math_node.outputs["Value"], add_math_node.inputs[1])

group.links.new(add_math_node.outputs["Value"], output_node.inputs["Out"])

tree = bpy.context.object.active_material.node_tree
group_node = tree.nodes.new("ShaderNodeGroup")
group_node.node_tree = group

The above gives you


How to make evenly spaced pillars for a roller coaster track? I am a beginner in Blender. I am making a roller coaster and I want to put an array of stands under my roller coaster tracks. To do that, I used DupliFrame on my pillars, parented them to my NURBs curve, and then limited their rotation using Limit Rotation. This gave me the scene below. However, this causes the pillars to be evenly spaced with respect to the curve and not with respect to the ground. Is there an easy way to do this ?

The file is attached as well

[https://drive.google.com/open?id=1g-UzOInMW0pRw8jEQBtX2N-L75uJDFSA]

This is one approach - (probably not the best one)

In object mode, create a plane, coplanar with your curve, its width snapped to the curve's bottom ends, and with a height sufficient to accommodate the curve in projection.
Create vertical edge loops in it (CtrlR + Mouse wheel), one loop for each of your columns.
Knife Project your curve onto the plane, and eliminate unwanted vertices
Duplicate the set of edges comprising the cut curve in the plane

You now have the profile of your track, with its vertices evenly spaced in Y, to do what you will with - (possibly Duplivert?) whatever suits the rest of your model best.


How to get Groupinstance Object with scene.ray_cast? I am using scene.ray_cast to get the underlying objects of the mouse.
That works perfectly fine for mesh objects. The problem comes with groupinstances (empty objects). They are refering to the objects of that group. Is there a way to get the empty object (group instance) with scene.ray_cast?

No, there is no way to access the object that instances the duplicator.

In fact there could be many (a chain of parents in a nested hierarchy).


How do I apply textures to imported .obj? I've imported my OBJ, have unwrapped my object, and have both textures, but I can't figure out how to apply them

Since you have Blender Internal selected, I'll assume you want to use GLSL shading.

To see textures in the viewport, first select GLSL shading, and make sure the viewport is set to textured mode.

Now, In order to have a texture, your object first needs a material. Add one, and name it whatever you want. (When I did it before, I named it "paint" - but the material name isn't important.

Now that you have a material, you'll need to add a texture to that material. Add a texture on that material, and then open your image for that texture.

I added some better lighting to the scene, and already it is working.

(In this case, the OBJ already had a UV map - all I had to do was use the default unwrap option, to use the map already with the OBJ)

But lets say that you wanted to also add an emissive texture, to create glowing bits. In this case, I'm using a black and white texture, and it can be simply layered on top.

On your same material as before, add a new texture (just as with the first one). Add your emissive texture as the image, and there will only be one setting that you need to change to make it work: change the blend mode from "mix" to "screen."

Instead of being all black (except the white bits), this texture should layer on top of the first texture, with the white parts displaying properly.


Blender Metarig to Houdini Is it possible to use Pitchipoy's metarig in Houdini?
Tried to export it, and Im able to get it into H, but its messed up.
Is there an easy way to do this?

Im new to Houdini, and was hoping i could use some rigs and stuff from Blender.

thanks.

You can animate the character in Blender and export it with the animation using Alembic.Then you just import it to Houdini and voila. It's very straight forward process.


How to render multiple scenes in succession from the timeline? I've seen over the internet different ways of linking multiple scenes between each other and using multiple cameras from a single scene, but is there any way to render completely different scenes with their own cameras one after another like in After Effects?
I mean in AE there is a way to put compositions one after another to create a single video file.
Could it be done similarly in Blender, so I won't get several different video files which require video editing to merge them?

For rendering more Scenes created in one blend file use Video Sequencer (called VSE).
Scene_Cube

Scene_Sphere

Create a third New scene, switch to Video Editing layout and  with mouse hovering above Video Sequencer editor Add Shift+A Scene strips and organised on Timeline as needed.

From Video Sequencer properties panel N (with Scene strip selected in timeline) under Strip > Scene > Camera you can choose what camera object should be used (if you have more than one in that scene).
Or you can also use one camera in Scene_Cube linked to Scene_Sphere.


Python, OpenGL to pick geometry only defined in the script Here is a scenario in my addon.
There are faces (triangles, quads, polygons) drawn by bgl. They may not have the corresponding Blender mesh counterparts. I'd like to click on on a bgl face and to know which bgl face was hit.

So how would you realize picking bgl faces?

You can use the functions from mathutils.geometry to deal with geometry

intersect_ray_tri
tesselate_polygon

further you can use the functions from view3d_utils to deal with viewport coordinates

From the template operator_modal_view3d_raycast.py:

def main(context, event, ray_max=1000.0):
    """Run this function on left mouse, execute the ray cast"""
    # get the context arguments
    scene = context.scene
    region = context.region
    rv3d = context.region_data
    coord = event.mouse_region_x, event.mouse_region_y

    # get the ray from the viewport and mouse
    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
    ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)

    ray_target = ray_origin + (view_vector * ray_max)


Unfamiliar edge is coming out of my model. How can I fix it? How do I fix this part of my model where the edge seems like it's coming out of my model? It can also appear in the rendering. I tried tweaking the vertex, it disappears only if I move the vertex in a noticeable amount.
Any help is highly appreciated.

Apparently it's the wireframe overlapping with one another. Here's another image of a close up showing what is happening. The blue color is the "correct"/ outside way of the face, and the red is the inside face.


Create custom property for sequencer strip in python i'm trying to write a little addon for the sequencer in blender.
I want to create a kind of custom category of clip easily accessible through ui panel (like "reference clip" which are not going to be rendered, for example)
I'm trying to use custom property for this, so long so good for iterate and finding them through the timeline, but i'm having hard time at creating the custom property through python... Here's what i've got so far :

    import bpy

scene = bpy.context.scene
strip = scene.sequence_editor.sequences_all
activeST = scene.sequence_editor.active_strip

if activeST is not None:
    if len(activeST.keys()) > 1:
        for CP in activeST.keys():
            if CP in "___reference_strip":
                print("Active strip is already a Reference Strip")
            else :
                activeST['___reference_strip'] = 1.000
    else :
        activeST['___reference_strip'] = 1.000

After creating the property with this piece of code, i'm trying to perform action, like mute strip with this property :

scene = bpy.context.scene
strip = scene.sequence_editor.sequences_all

for S in strip:
    if len(S.keys()) > 1:
        for CP in S.keys():
            if CP in "___reference_strip":
                S.mute = True

the custom property is created, but doesn't seem to be active, but the code above doesn't select mute the clip with it, i have to manually edit it to make it work...

Any help to find the origin of the problem would be greatly appreciated :D

You're going to have to provide a code sample that can be used to illustrate/trigger the problem you are having.  I wrote the following bit of code and it worked exactly as I expected:

import bpy
scn = bpy.context.scene
strip = scn.sequence_editor.active_strip
strip['anchovy'] = 3.3
x = [ s for s in scn.sequence_editor.sequences_all if s.get('anchovy') is not None ]
print(x)
print( [ s.get('anchovy') for s in scn.sequence_editor.sequences_all ] )

As you can see, I was able to select a clip based on the property (list comprehension x).


How to align vertices with other vertices I'd like to select a vertex, then select several other vertices and make them somehow aligned with the first one by e.g. Z axis.

Here is example picture of what I have - the highlighted vertices are ones which I'd like to align.

If possible can someone explain me how to do it.
If it is not, could you provide a good alternative.

The best way is to select the vertices that you want to be aligned. Then press s to scale, press z to constrain to the z-axis. Then type zero and press enter. Then all of the vertices will be "flat" or aligned along the z-axis.


Preview and Final Render Materials are Different In my node editor I have the following Materials set for the water which is made with a fluid simulation.

In the preview window it looks like this (Which is how I want it.)

Then when I render out the image it looks like this (Not how I want it.)

Below are my render settings

I tried detaching the glass node and I still got the see through look. I tried closing and reopening the project file. I tried changing the camera too incase I messed something up with the lens. I can't seem to figure out what's happening and how to fix it.

So I had to make sure that the resolution of the simulation between it's preview and final render were the same


Why doesn't Blender render from video editor according to settings? In Blender 2.79, rendering a video seems funky. I've set up the render details in default view as described below, to render a video to a certain location. I have the Compositing and Sequencing checkboxes selected. However, when I render, it just renders the non-video-edited scene.

When I go into the video editor, and use the main menu to Render > Animation, it ignores all the settings, and instead renders a bunch of stills to the default Blender location (C:\TMP).

How to render video?

Thank you! :)

Render details:

Frame Range shows differently between Default and Video Editing views. Should they be the same?

Post Processing:
Compositing YES
Sequencer YES

Output: My destination folder on D:\
The stills get rendered to C:\TMP\ instead.

Encoding: MPEG-4 container, H.264 video codec, AAC audio codec.

Want anything else?

It seems that the issue was that I had a different scene open in the Video Editing view vs. the Default view. So, when I edited the render settings in the Default view, and then started the render from the Video Editing view, it was rendering a different scene with different settings.


Viewport face colors are different on the same mesh I have finished moddeling an object and this was the result:

What I know is that blender uses these two colors to visibly separate the inside of an object from the outside, but since I played around with the mesh blender doesn't "know" whats the inside/outside.

How can I fix this manually?

It sounds like you have a non-manifold topology.  If you can travel from the inside of the mesh to the outside of the mesh by stepping from face-to-face without flipping sides then that is the case.  First, please check out the suggestion by @MrZak. If the Recalculate Normals button on the Shading/UVs tab (Edit mode:A then CTRLN) doesn't work you could be correct in that Blender is getting confused about what's inside and what's outside.  This can sometimes happen when you have an edge that doesn't have two faces connected to it - the Recalculate Normals function is only likely to work when this is true although there are a few special cases where it will still fail.  In edit mode select everything and then Delete Duplicates, then repeat the Recalculate Normals step above.

If this still doesn't solve the problem then you have an issue with the mesh that will probably need to be fixed by hand.  In the viewport render the darker faces indicate that the surface normal is pointing away from you while the brighter faces have a surface normal pointing towards you.  With a clean topology all faces will point towards you.  You will probably need to zoom in and look at the vertices, edges and faces near the transition between the two types of face.  You probably have a twisted face somewhere, or possibly faces or vertices that have been scaled by a negative number - which would cause the face normals to be inverted.  Given the apparent symmetry in your screenshot I suspect that a scale in the X or Y axes of -1 will resolve the issue surrounding the flipped geometry.  The remaining issue is the join between the current correct geometry and the incorrect geometry this may require a manual deletion of the linking edges or faces and then a relinking with new edges and/or faces.

For example

To create this I started with a UV sphere, deleted the bottom half, extruded the bottom and added the lip along the lower edge.  I then selected the upper part of the original sphere and separated it from the lower part using P , then I scaled it in X by -1.  Here is a slice through it:

You can see the blue lines showing the surface normals indicating that the lower part points outwards (correct) and the upper part point inwards (incorrect).  To fix this I select the faces in the upper part and scale in X by -1 to give this:

As an alternative I could have simply selected the incorrect faces and then clicked on the Flip Direction button to achieve a similar result.  (This has the disadvantage of preventing you from using Recalculate Normals for any future issues the geometry might have as doing so will undo your changes and you will have to flip the incorrect faces again).

You need to be extra careful around the point marked with the red circle because if the correct and incorrect faces are connected then fixing one problem will create another.  In this case, if it applies to your situation,  you will need to separate the incorrect geometry from the correct geometry before applying the above scale.  The once applied you can reconnect them two parts.


Blender adds extra bones to ends of armature when I export as .fbx or .obj? Whenever I export this hand model to .fbx and then reimport it, it always comes in with end bones attatched to the any loose ends in the armature. Can someone try downloading my blend file and let me know if it happens to them as a comment, and answer if you can solve this problem? Thank you.

I have taken down the blender link now that the issue is solved.

Okay, well actually the answer is really simple. I just found out that all you need to do is disable "Add leaf bones" in Export as .fbx > Armature.


How to force update the 3d view port in blender during python file execution I am trying to connect a physical robot arm with its digital replica using blender I am able to communicate between the two using MQTT but the changes in blender are reflected only when the python script associated with it completes execution but I want the change to be seen as soon as the value is received by blender, ie, updating the viewport before complete execution.
I have tried using: bpy.ops.wm.redraw_timer and bpy.scene.update() but this doesn't work in my case, I even tried the solution given in Update viewport while running script
but it doesn't really help me. Here is my code snippet, can someone please tell what is wrong and how to update the viewport?
PS- Blender version is 2.8.0
Thank you in advance:)
import bpy
import json
import paho.mqtt.client as mqtt
from math import radians
from math import pi  # It's considered bad practice to import everything from a library, especially when you're not using any (or just a few) of its function

import mathutils
from mathutils import Euler
def changes(a,b,c):
    Shouldercord1=pi*(92.3/180)
    Shouldercord2=pi*(a/180) #to be changed
    Shouldercord3=pi*(62.2/180)
    obj=bpy.data.objects['Arm 01']
    obj.rotation_euler = Euler((Shouldercord1,Shouldercord2 ,Shouldercord3) , 'XYZ')

    Waistcord1=pi*(-269/180)
    Waistcord2=pi*(0.642/180)
    Waistcord3=pi*(b/180) #to be changed
    obj2=bpy.data.objects['Waist']
    obj2.rotation_euler = Euler((Waistcord1,Waistcord2 ,Waistcord3) , 'XYZ')

    Armcord1=pi*(261/180)
    Armcord2=pi*(c/180) #to be changed
    Armcord3=pi*(-128/180)
    obj3=bpy.data.objects['Arm 02 v3']
    obj3.rotation_euler = Euler((Armcord1,Armcord2 ,Armcord3) , 'XYZ')

def on_connect(client, userdata, flags, rc):
    print("\tMQTT Server Connected code "+str(rc))
    client.subscribe('blender/test')
def on_message(client, userdata, msg):
    message = (msg.payload)
   #print(message)
   #sys.exit(0)
    result=json.loads(message)
    a= result["a"]
    b= result["b"]
    c= result["c"]
    changes(a,b,c)
client = mqtt.Client()
client.on_connect = on_connect

client.username_pw_set("xxxx","xxxx")
client.connect("xxxx", 1883, xx)
client.on_message = on_message
client.loop_forever()

Found the answer, threading can be used

def my_timer():
    from threading import Timer
    main();
    #print(i);
    t = Timer(0.1, my_timer)
    t.start()

Hope this helps, we took a lot of time to come up with it


Copy Animation to another rig I have two armatures with the same exact bone names and one of them is animated and the other is not, I wonder how I can copy the animation from one to the other?
I've tried answers here and here
but once I assign the original action to the target armature the armature moves as one piece and in different location.

I wonder how I can copy the animation from the Source armature to the Target armature and also where the target armature will be on top of the source armature (same location).

The correct way is to assign the "source" action to the target armature via the dopesheet, but there are 3 main problems in your attempt:

1) The scale of the two armatures are different (Source: 0.094, Target: 1)

2) The animation of source is expressed in hips location and all bones Euler rotation, while all target bones are on quaternion: you will have to select every bone in pose mode and switch it to euler rotation mode in the "N" panel; by now the target reads only hips location, every other animation information is lost.

3) The bone's location and roll angle are so different from source to target that I think is nearly impossible to make this animation work on the target rig (on this last point, maybe someone more expert than me has a solution)


Creating pins to connect bones I have an STL file of the foot that I would like to print.  I am new to blender, so am just getting familiar with the basics.  I would like to add or create pins to hold the bones together in their correct location, spaced apart.  Any suggestions?  Thanks in advanced

If I got it right, I think you could just model a thin (but thick enough to be printed) "pin", then duplicate it and and move to desired position, even rougly overlapping pin and bones shapes.

When all bones are connected by pins, you could join allo bones and pins, export to STL and print. In my experiencem 3D programs usually don't complain about overlapping meshes, they calculate a single overall shape and print a single object, anyway.


Whenever I render, it doesn't show the texture I make GFX on a game called Roblox, and today I was making one but when I rendered it, the render didn't have the texture on it. It still has the texture on it in 3D View though. Please help because I cannot find a solution anywhere online and I have tried most things and it still doesn't have the texture on in the render, even though it does it 3D View.

Assuming your texture is an image file this should work.

Change it from Blender Render to Cycles Render. Go into edit mode(tab-key) and unwrap it(u-key). Go into the node editor. In the node editor bring up the node add menu (shift + a), and select image texture. Assign your image/texture to the image texture box. Attach the yellow node from the texture image box to the diffuse box.. This should work.


Lock to Camera to View moves camera position Im trying to use Lock Camera to View but when I move the camera while its locked it goes to a completely different place.

Any ideas how to fix this?
Thanks!

I think you are locking it in the properties tab, you need to lock it with the camera SELECTED, in the camera tab, then you shouldn't have that problem.


geometry nodes finger pillow push alike effect would it be possible with geometry nodes to make a shrinkwrap alike effect
In such that farther away of the object the effect of impressing becomes increasingly less.
In the simple analogy, I mean the effect of pushing a finger into a pillow.
There is nothing that needs to be fixed for a problem.
I'm just very curious about if this now possible.
And if so how would that look like in nodes ?
I think such an example would make me better understand this topic.
And if this becomes possible several boolean alike effects might be very interesting to workout in nodes.

So, this is quite easy but you might want to be patient with this one as we have cloth sims and they are hectic. Sorry but geometry nodes won't work. So to make the pillow as you want. Add a plane, scale it down to the size of the pillow, go to edit mode, and subdivide it 10 times. Now, slightly extrude up the upper part, but very slightly. Then, go to select on top, select sharp edges, and on the top right enable merge, the option near the XYZ and butterfly thingy. Then press S to scale, press Z, and then press 0 to smash the thing.
Now, it has become one edge. Now, for the part which will torture your computer, er... I mean fun stuff. Go to the physics panel and click on cloth. There, enable pressure and set the pressure to 5. Then, if the cushion is landing on anything, enable collisions on the object it will land on. If you run the sim, you will see the cushion is low res. SO add a subdivision modifier and set it above the cloth modifier. Not doing so will change your life for the worse. There, set the viewport amount to 2.
Now in physics properties, go to physical properties and set it to 0.01. You can decrease it more if you want it to be fluffier or increase it to be less fluffy, your choice. Now, to remove that huge gap, go to object collisions in the cloth settings of the cushion and set it to 0.001. Then go to soft body and cloth and set Thickness Outer to 0.001. Then go to the quality of the collisions and set it to 10 for a higher quality collision. If you want to slow down the speed of the falling, you can always increase the pressure. Now, set the cloth simulation quality to 10 if you see some issues. Then, first, apply the subsurface and then the cloth modifier. Do it in this order or you will have a bad time. Now, again add a subsurface modifier after applying the previous 2. Then, right-click on the pillow and shade smooth to give it a beautiful look.
BTW here's the video link if you want:
https://www.youtube.com/watch?v=7O0AFgZtAJs
As for the finger effect, like the pressing thingy, you can always use force fields for that.


How to change effect strip input in Video Editor? Let's say I have a cross fade track from Track A to Track B.
Now I decide to create a gaussian blue effect strip over Track A, let's call it Track C
Now I want the cross fade from Track C to Track B, but i can't change the "Input 1" parameter from the cross fade track because it's grayed out.

Do I really have to create the effect again? Or is there a better way to solve this problem?

I just started learning blender, so sorry if i'm using the wrong terms and this question is already answered.

To change input1 parameter:

Select strip you want to make an input
Shift+right click to select strip with input you want to change
Press Strip -> Reassign inputs (or just hit "r" as a shortcut)
Hope this helps.


Odd artifact in mesh only when rendering in cycles, starts at third frame Fairly new to Blender, having a confusing problem.

Have added some embossings to this book which was causing me some problems to get to not deform the initial book mesh. Eventually got there with that.

Now when I look at it in the viewport everything is great.
When I render out a 360 rotation animation in Eevee everything is great.
When I try to render out in cycles I'm getting this odd deformation starting at the third frame. Have checked if everything is unchecked, if textures are the problem etc. Theres not even a mesh line there, very confused.

Any help appreciated. Heres the blender file - https://we.tl/t-UuJ7ov2Lhp

One additional cut it solved.

But ... I cant find what it cause. I checked face orientation, shading type collision, make face planar, deleted all 88 thousand duplications (merge by distance), deleted all from scene (if it is not in hidden, isolated problematic face, unpluged material, tried Normals ... but nothing affect the issue. Only triangulation. Limited disolve to make n-gon back, brought issue back. Now Im interersted too :)

Definetely overlapping faces like n-gon tries to connect in two sharp angle?


Strange transparency change I have some strange behavior: I want to render (animate) small semi-transparent spheres inside large semi-transparent sphere, but small ones at some point change their color/transparency (see gif). It seems like there is a certain distance from camera/angle, when material changes.

These are materials on both objects:

Alpha blend is a recipe for trouble if you have more than one face it is working with. Use alpha hashed instead. If this is too fuzzy, turn up samples or switch to Cycles rendering.


Export to FBX not available for some unknown reason (to me) most of the export options with the file I am working now dissapeared. But with other files all export options are available. Is it a bug or how could I enable it for my working file???

in the same working file, if I switch to Layout mode the export options are back, and if I switch to modeling the options disappear again, is that intended?

Edit.. this behaviour happens only with my working file, with other files I have all export options in Modeling and Layout modes

I'd start with your user preferences. FBX import/export is an add-on there.


How to set up an incline I have a blender scene where I have a set of small steps. I also added two bounding boxes for each step.

But the problem is that when I build my game in babylon.js my player cannot ascend the steps.

My question is: is there an "incline" feature that I can add to either the steps or the player, or for both? If there is how do I do that? If not then what do I need to in order to have my player ascend the steps?

You will need only one collision box for the entire set of stairs, don't bother with bounds for each step, it just makes stuff complicated.

The black line symbolizes the collision mesh. Set it to invisible. When the character goes up the stairs, there won't be any issues, and it looks real enough that no-one should notice this standard FPS nuance.
Also, if you use BGE there is a setting for step height under the character physics type.


Cannot add Visual Effects to Grease Pencil Drawing (Blender 2.80 Beta) I used the newest version. Did I do something wrong?

Finally it has worked out. Change the view mode from solid to LookDev or Rendered.


Decimate/un-subdivide turns quads into diamonds? This is my mesh before subdividing:

After subdividing x3:

After un-subdividing x3:

The diamond topology mess up smooth shading and make the edges look terrible from certain angles.

It might seem like there's no point in subdividing only to un-subdivide, but the purpose is to get the smoothness that subdivisions give, but still retain a low poly count. How do I obtain to a low poly count, but keep the smoothness of subsurf and decent toplogy?

This happens when doing multiple iterations. If you un-subdivided once 3 consecutive times you would keep the same quad layout.

Try it. Subdivide a mesh three times. Then click spacebar, search un-subdivide, click it. Now click spacebar again, search un-subdivide etc.


How to append bones to a list in a branching manner I'm looking to append bones in a specific manner. Currently I'm doing this

https://github.com/General-101/H2V-Blender-JMSv2-Exporter/blob/master/Blend2Halo2-JMSv2.py#L209

nodeslist = list(obj.data.bones)

but it's not accurate for what I need. I basically need to add all of the children of the first bone and then move on to their children and append them all before moving on to the next. Basically appending bones by their layer.

Something like this would be appended in this order with the above code
0 1 2 3 4 5

but I need the list in this order

0 1 3 5 2 4

Any ideas on how I could accomplish this?

Use recursion

import bpy

def walk_bones(bone):
    yield(bone)
    for b in bone.children:
        yield from walk_bones(b)

ob = bpy.context.object
arm = ob.data
rootbones = [b for b in arm.bones if not b.parent]

for rb in rootbones:
    for b in walk_bones(rb):
        print(b.name)

Adjusting slightly to

def walk_bones(bone, level=0, sp="  "):
    yield(f"{sp * level}{bone.name}")
    for b in bone.children:
        yield from walk_bones(b, level + 1)

Can print out the hierarchy, as an example the rigify shark meta-rig

spine
  spine.001
    spine.002
      spine.003
        spine.008
          spine.004
            spine.005
              spine.006
                spine.007
                  eye.L
                  eye.R
                  jaw.master
                    jaw
                      jaw.001
                    jaw.002.L
                      jaw.003.L
                    jaw.002.R
                      jaw.003.R
              shoulder.L
                side_fin.L
                  side_fin.L.001
              shoulder.R
                side_fin.R
                  side_fin.R.001
            top_fin
              top_fin.001
          chest_fin.Bot.L
          chest_fin.Bot.R
    mid_fin.Top
    mid_fin.Bot
  back_fin.T.Bk
    back_fin.T.001.Bk
      back_fin.T.002.Bk
  back_fin.B.Bk
    back_fin.B.001.Bk


How do I make it so that my camera shows the actual objects? So I have been doing a tutorial here and for some reason when I did the camera rigging part, the screen just goes black. This is when I view what the camera sees. Any tips?
This is my project file:
Blender File Link (MediaFire)
Trying images now:
Out of camera:
In camera:

Your camera is panned, you just need to press Numpad0 to go inside the camera and then press Home


Can an add-on be automatically installed and enabled? I am developing a program that will include a custom importer and exporter for blender.

I would like the installer for my program to be able to automatically install and enable the import/export python scripts.  Here are the steps I think I need to do:

Find the blender add-on directory.  My program is windows-only, so I presume this will just be in %appdata%\Blender Foundation
Copy my add-on files to a subdirectory of the add-on directory
Enable the plugin in blender
Save the user preferences so that the plugin stays enabled after a restart.

I can work out 1, and 2 is easy, but I'm not sure that 3 and 4 are even possible without using the UI.  Is it possible to do them programmatically, perhaps via a python script that I launch with blender?

Part 1. Your user script paths

>>> bpy.utils.script_path_user(
script_path_user()
returns the env var and falls back to home dir or None
>>> bpy.utils.script_path_user()
'/home/batfinger/.config/blender/2.76/scripts'

And the addons paths

>>> bpy.utils.script_paths(subdir='addons')
['/home/batfinger/src/BlenderGIT/qtcreator_build/bin/2.76/scripts/addons',
 '/home/batfinger/.config/blender/2.76/scripts/addons',
 '/home/batfinger/src/Blend4Web-master/blender_scripts/addons']

Part 3.

Look in scripts/modules/addon_utils.py

from the console

>>> from addon_utils import enable
>>> enable(
enable(module_name, default_set=False, persistent=False, handle_error=None)
Enables an addon by name.
:arg module_name: The name of the addon and module.
:type module_name: string
:return: the loaded module or None on failure.
:rtype: module

To enable my sound drivers addon for instance

enable("sound_drivers")

Check out the source, there are other handy addon utils in there.

and for part 4, there's the operator to save user prefs.

 bpy.ops.wm.save_userpref()


Updating to latest Blender version I currently have version 2.74. How do I update to version 2.76? I do not see any links in the UI to update my version of Blender

You can install Blender via Steam, which has a built in auto-update feature.

This should keep your Blender installation up to date automatically.


Adding a vertex onto an angled edge in precise X position I'm designing a part for 3D printing, but I do not know how to cut an angled edge at a precise absolute X position. I marked in red the place where I would like to insert a vertex. It's exactly 2 units (millimeters) from the left. So far I was unable to achieve this with desired precision.

EDIT

First attempt. Using GG to move the vertex along the line and snapping to another vertex failed because apparently this tool uses local reference system.

Second attempt. using TinyCAD plugin. Worked perfectly!
I created a second edge that intersected the angled one, and used XALL to insert a vertex on the intersection.

You could subdivide the edge to add a vertex. Select the vertex and press GG to slide the vert. Make sure snapping is set to vertex and then click on the vert shown at 2 units above. This should line up the lower vertex on the angled line with the vertex above

The vertex above could be place at 2 units with snapping set to increment absolute grid.

 Answer above incorrect. New solution:

Ok this one bugged me as it should be possible to do this. I turned on edge length in the overlay

I subdivided the angled edge to create a vert and then GG and dragged the vert to the starting vert on the edge. I am working in m so in the image you can see 0m.

With the vert still selected I dragged it back along the angled edge whilst holding shift to get a more precise value. I moved the vert until it was at 0.5m

Should be able to use this technique for other stuff


How do I select a bone in a downloaded Blender skeleton and edit it? I have downloaded a blender skeleton that I would like to make more realistic, e.g. separate the two pelvic bones that he has, into the 6 real bones.  Brand new to Blender, any help is appreciated.

Right click on the armature to select it, and go into edit mode. Right click on the bone you want to divide into smaller bones and press W and choose subdivide. On the left panel (press T to show it if it's hidden) change the number of cuts from 1 to 6.


Edge loop realignment? How do I realign these edge loops to evenly align around the bend?

You could try "Smooth vertices" (Right click in vertex select mode).

You can increase the number of "smooth" steps from the operator panel. Be careful, though, you could end up changing the overall shape of your mesh slightly.


Weird Floral pattern on mesh I get these weird floral patterns on cylinders, I try to Inset the flat part of face on the top of the cylinder to create some sort of geometry to work with.

Any Ideas on how I can fix this???

Thanks!

This happens because there is no good way to subdivide a circular face. On a cylinder, you can inset the face once or twice, so that the part with this pattern is flat, or if you have a sphere, just make a sphere with higher resolution.


Eevee Glass Problems with Overlap and Alphas im working on a 3D model of a car for my company, and the problem is that the windows (front, lateral, back, etc) of the main car have problems on export and in viewport.
When you rotate the view around, in some point the glasses loss the effect and become grey or white (only when there are too much glass behind other from our viewpoint)
i made my research on internet and other forums and the alpha for glass in Eevee have problems
I saw too a post where they say to not have the same material, but i try to, and i run into the same quickly
i did check normals, geometry, hdri, and look at materials blend modes, backface and similar tweaks for glass and i dont know if the problem is from my parameters or its a bug from Eevee
Here the images for see what i mean:
https://ibb.co/DgKJXmd (where is the bug)(front passenger window is where you need to look)
https://ibb.co/XDnvgFZ (rotated view a bit from the perspective of image 1, and that weird colour is gone)
sorry for my bad english, hope i didnt make your eyes bleed
Thx for your time :D

Add image from your shading , i think you missed some nodes
This is what you need :

Same in Evee .
And set alpha for BSDF material to "0"
GL .


Undo suddenly stops working I have a file, that has A Mesh and an animated armature in it. Working with the mesh in Edit Mode is fine, Undo works. But as soon as I selected the Armature in any way, may it be in pose mode, edit mode or Object mode, Undo will stop working. Undo in Object Mode doesn't work for the Mesh too then.
Weightpainting like this is impossible..
When I go back into editmode of the Mesh it works again.

It seems like my Armature is interfering with the Undo-tools (all of them).
Is my Armature broken or what is it?

By the way I checked all the other common Undo-not-Working problems, My Keyboard-Layout doesn't change suddenly when working with the armature or something, its just weird.

It seems as checking Global Undo, in User Preferences --> Editing is solving that problem.


Multiple UV mapping problem i'm new to blender.
I'm a bit confused on the concept of multiple uv mapping.

My workflow:
I made an object, a plane, and I wanted to assigned different materials and UV maps for the cockpit and the body.

I made the seam
Assigned each materials to its corresponding part (the cockpit and body)
Unwrapped the cockpit
Create new uv map
Unwrapped the body

but as I select all, the uv map on the "body" still consist of the body itself and the cockpit

Then when I added texture and using the body and the texture overlapped.

What i want is different uv map and different image texture for each part.
Please help I've been stucked with this problem for 3 days..

Update
I've tried to separate the object, made its own uv maps for the body and the cockpit, and I joined them again. But then each uv map only show the texture assigned to it and not both applied/showed in object mode/texture paint

and when I exported it to obj file and open it on papercraft program, the texture shown is the uv map that set as active for rendering

Example : we have a plane and want to 3 materials based on two textures.

Plane parts :

The cockpit : glossy material with texture 1
The nose : diffuse material also with texture 1
The other parts : diffuse material with texture 2

Create your plane
Add the three materials
In edit mode, select the wanted faces and assign them to the corresponding material

Create your UV seams (probably corresponding to the material). You may also have done the seams before the material assignation

Select the wanted parts using the "select" button of the material,
Then UV unwrap

The materials can be defined as you wish (here I used a bake to produce the textures
You can also export the UV map parts separately in order to paint over it in the tool you want (or paint directly here in Blender)


Is it possible to get this glossy shiny texture? I'm still learning to use blender 2.8 during my internship. My supervisor have give me a task to make intro video and ask me to get this kind of texture. I have follow many tutorial on youtube but I still can't get this texture. I'm still wondering what did I wrong?

This is the image what my supervisor ask for

This is the result

These two are my work

Lightning doesn't work the way in blender as blender is similar to the real world reflections and the logo containing the reflections are not even close to the reflections in blender. I've tried it my self in blender after seeing this question.

You can see it in this .gif file below as I try to increase the roughness reflections change.

If you really want to design logo in blender you can using some complex lightning but it won't be as perfect as you wanted, I've tried to make a simple version of what you wanted and this is the final result that I've got. To get this I've put roughness to 0.5 and Clear coat to 1.0

And this is the simple scene that I've made to get the result.

If you want check out the .blend file

Simple Answer : To get the logo you required try "Adobe Illustrator" that would make things easy and simple for making logo as most of the logo making is done in Illustrator and also the logos that you've sent are also Vectors if I'm not wrong.

But if you just want to make in blender try the above scene.


Can I make animated body interact with rigid body object If anyone knows about this please help, I'm trying to make this rigged robot knock over a piles of rigid body blocks. Is their any way to do so? I have tried to make the arm a rigid body but then it gets stuck in place, I made it a collision object and it stays with the rigged body but doesnt interact with the objects.

I've had issues with this as well and this is the solution that works well with segmented characters. Rigid body objects don't respond to the armature modifier. To work around this, make the hand a separate object, remove the armature modifier from it, and parent it to the hand bone. Then enable rigid body physics, make it passive, and check animated.


Making an imprint mold for packaging I have 3D printed this knight

(https://imgur.com/JAk9JUj) (source: thingiverse), and I wish to make a box for it. I would like to mold the bottom surfaces of the knight so that it would fit neatly into place, while leaving blank space above so that the figure can be inserted down into the box.

I'm new to Blender (and modeling in general), so my first thought was to slightly enlarge the knight mesh and then apply the Boolean difference modifier on a cube. However this would not allow for the knight to be dropped into place.

How would I make this?

Well there may be a simpler way than what I'm about to propose.  However, while I thought maybe the Shrinkwrap modifier might help, it has some issues.  It might be helpful if you could post your blend file.

I assume you're trying to make some sort of insert that sort of "nests" around the object, like the foam tray in this picture:

My suggestion: In edit mode select one of the downward-facing faces of your knight, like the bottom of a hoof, or whatever surface faces "down" (or "back") in the package.  Now choose Select-->Select Similar-->Normal, and in the bottom part of the tool shelf play with the "threshold" value until you are getting the bottom-and-side surfaces of the mesh.  You may also get some unwanted faces in the upper part of the mesh, that's okay for now.  Once you have the desired regions selected, duplicate them (Shift-D) then split them into a new object (P).

Go into object mode, select the new object you created, then go into edit mode.  with any luck you'll be able to easily select and delete the "wrong" faces.  Select linked (L) may allow you to select entire "islands" of wrong faces based on selecting one unwanted face.

Once you have only the correct faces left: select all (type A), Extrude (E), type Z to constrain to the Z axis, and pull upwards to create "sides" for your hull/nest.   Without changing the selection, type S, Z, 0 (zero), Enter.  That will make the selected vertices coplanar (and, more importantly, make the sides come to a constant height).  Finally, type X and choose "dissolve faces".  You can delete the ngon that results.  You should have a shell that will fit the bottom part of your knight.  You can scale it up slightly to allow for a fit, although I think the right way to do this is with Shrink-Fatten (edit mode, select all, Alt-S).

Modeling the rest of the insert (the flat faces) could be approached in various ways.  You might want to add a plane (in edit mode), center it over your hull surrounding the top edges, delete the plane's face (only, leaving the vertices and edges), select the edge loop around the top of the "nest" and the edge loop of the plane, and choose "Mesh-->Faces-->Fill" to create non-ngon faces.

EDIT: lol your knight figure is way more complicated to work with - I remeshed it to get somthing simpler to manipulate.  After creating the hull as described above, it was still too funky to work directly, so I ended up creating a subdivided plane and using a shrinkwrap modifier (Mode: Project, Axis: Z, Direction: Negative) that wrapped over the hull object.  And then a bunch of tweaking, shrink/fattening, subsurfaces, etc.  Wish it was a simple process to describe.


Change orientation of object with respect to x-y rectilinear plane If an object imported from an stl file is oriented along the the x-y coordinate plane how can I rotate it so that it is vertical?

You can rotate it.

then  apply rotation.

here is a tutorial on the basics of navigation


Disabeling of the translation selector Is one able to disable the display of the axis translation selector? I'm specifically talking about this: .

I try to learn how to use blender, but i'm not able to properly follow my backround image because i constantly hit it when i try to add a point. It's really annoying because i have to add the point elsewhere and then translate it to the place it should have gone in the first place.

I'm guessing you're adding vertices by Ctrl-clicking.

This button, or CtrlSpacebar toggles the visibility of the manipulator.

Using one of the shortcuts - (G,R,S) for translation, rotation, or scale, dismisses the manipulator, even if it was visible.

In an orthogonal view, using E to extrude, (rather than place,) new vertices, allows you to move them about in screen space, without having to go to a separate operation.


Cleaning script to cut face edges I made a script to subdivide the edges of the object faces depending on their length (if edge 0 > edge 1, cut edge 0 n times, and vice versa, being n relative to edge’s length).

I got it working, but there is something I’m not seeing or understanding, in the first part of the script I'm adding in a variable the number of faces the object has and in the second part the edges are subdivided, but in order for the first part to work, I need to add extra steps that are apparently unnecessary. Can someone help me clean this? I’m a noob but I would love to learn and have a tight script, so any advice to make it cleaner / smoother would be great.

Thanks in advance.

PD, having iter = len(bm.faces) won’t work because as soon as you make a cut, a new face is added, so it becomes an infinite loop.

Here's my code:

import bpy
import bmesh
import time

start = time.time()

bpy.ops.mesh.select_mode(type="FACE") # set face selection mode

ob = bpy.context.active_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

length = 2   # length comparison between edges
cutMulti = .008   # higher n = more cuts

cutN = 0
i = 0
iter = 0

# get n of faces, ***just a "for f in bm.faces: iter += 1" won't work***

for f in bm.faces:
    f.select_set(False)
    e_0 = f.edges[0].calc_length()
    e_1 = f.edges[1].calc_length()
    if e_0 > e_1:
        cutN = int(e_0*cutMulti)
        if e_0 / e_1 > length:
            f.edges[0].select_set(True)
            f.edges[2].select_set(True)
    if e_0 < e_1:
        cutN = int(e_1*cutMulti)
        if e_1 / e_0 > length:
            f.edges[1].select_set(True)
            f.edges[3].select_set(True)
    iter += 1

# Face cuts

for f in bm.faces:
    if i < iter:
        e_0 = f.edges[0].calc_length()
        e_1 = f.edges[1].calc_length()
        if e_0 > e_1:
            cutN = int(e_0*cutMulti)
            if e_0 / e_1 > length:
                f.edges[0].select_set(True)
                f.edges[2].select_set(True)
        if e_0 < e_1:
            cutN = int(e_1*cutMulti)
            if e_1 / e_0 > length:
                f.edges[1].select_set(True)
                f.edges[3].select_set(True)
        selected_edges = [edge for edge in bm.edges if edge.select]
        bmesh.ops.subdivide_edges(bm, edges=selected_edges, cuts=cutN)
        selected_edges.clear()
        for e in f.edges:
            e.select_set(False)
        bm.select_flush_mode()
        i += 1

bmesh.update_edit_mesh(me, True)

print (str("iterations completed = "), iter)
print (str("lenght comparison = "), length)
print (str("cut multiplier = "), cutMulti)
print (str("processing time = "), time.time()- start)

Do a while pop().

Check out the answer here, shows the return geometry of running bmesh subdivide edges operator. Iterate with python on vertices created by subdividing an edge

Notice the geom_inner returns the 3 newly created faces of the one cut subdivided plane.  Could use sets to check the difference before and after.

Also note the original faces are not lost in the process.  Some bmesh ops are destructive.  It appears sub edges builds on input geometry.

For your example, rather than counting the iter could simply copy the faces before, and do a while pop

faces = bm.faces[:]
while faces:
    f = faces.pop()
    # op

btw there is no need to use a selection here, simply collect the edges

edges = []
e = face.edges[0]
if e is interesting:
    edges.append(e)

and feed edges into the operator.  Unless using a bpy.ops.mesh operator there is often very little reason to use selection... unless the select is part of the desired result.  Note there is also a more temporary tag property.

No need to cast strings to strings

print(str("string")) # not required
print("string") will do.


Script to separate an object's mesh without using bpy.ops I've seen several posts suggesting that it's better to write functions that
manipulate bpy.data directly, instead of using the bpy.ops operators. I can
understand the argument about how operators such as bpy.ops.mesh.separate() are
meant for the user interface, requiring context such as the active object or the
mode (object vs. edit), usually given by the user.

But the operators are convenient because they embody so much of Blender's
functionality already, and I don't want to have to re-code that from
scratch... So where I can find this functionality in Blender's API, apart from
the bpy.ops operators ? Is it in bmesh ?

Here's a specific example : if I want to code the equivalent of "separate", I need (among
other things) to identify, in the set of vertices that I want to separate, which
ones are on the 'borders', so I can duplicate them. This would probably involve
navigating around the mesh data, iterating over each vertex's neighbors, and
checking whether they're inside my set. Not trivial for a newbie. So is there a
function for this ?

No, currently the only method for splitting objects uses bpy.ops, there aren't always API equivalents for each blender operator.


Trying to color Text So I created the text with the add text button - I'm using version 2.91 - then I went to the right tab with all the properties functions: world properties, materials properties, physics properties, etc., then I extruded the text a bit(stretched it).
Next, I went to the materials tab to color it, clicked on new , the sphere showed up, then I clicked on the color line(base color) and chose a color, but nothing happened to the text.

You probably need to switch preview modes. Press Z in the 3D viewport and pick either "Material Preview" or "Rendered" from the pie menu.  The Preview Modes and Viewport Shading Options can also be accessed from the 4 circles and the little down arrow, respectively, at the top right of the viewport: