What does the frame_offset_end/Trim Duraion (soft) mean? I've recently started making scripts to assist in my video editing, and it's already helped me out tremendously!  Now I want to make a script that automatically changes the video offset of all the selected strips by a set amount.

In doing this, I noticed a very confusing property about trimmed video clips.  For the Trim Duration (soft), the frame_offset_start of clips makes sense because it's the frame of the original clip where this cut begins.  However, the frame_offset_end seems to make absolutely no sense.  Its value is lower than the start value, but it's not the length of the clip and it's not the end frame.  When I increase the value, the clip gets shorter!  What is going on?

Hard and soft cut, and the differences between them, explained here: Video sequence editing, cutting strips


(v2.8) Objects disappearing from viewport when going from UV Editor to Texture Paint I've encountered this several times so far in a (v2.8) project of mine.  I'll be going into the UV Editor for an object to get the mesh just right, and then once I pop over to Texture paint, I can't see it in the viewport.  If I randomly paint around in the empty viewport, I can see that it is taking effect on the texture so the object is there, but hidden and I can't seem to un-hide it.  I can't see what I'm painting on.  What am I doing that's resulting in the meshes being hidden between UV Editing and Texture Painting, and how do I display the object in Texture Paint so I don't have to John Bramblitt my way through painting?

.blend file

This one took an obnoxious amount of time to figure out how to get it to reappear, and even then I'm unable to replicate the problem of getting it to disappear now. If I can replicate the problem, I'll update my question further.
All it took to get the item to reappear was to go into local view by pressing / on the numpad to get it to re-appear.
The / on the Numpad toggles Local View.

Local view isolates the selected object or objects, so that they are
the only ones visible in the viewport.Source: The official Blender Documentation version 2.92


How to connect parts of a model to the rig? So I have this robot as u can see in the picture below and I know how to make a rig with IK and everything but only did that with 1 object models.
This robot has about 30 base parts and 80 armor pieces(green and red).

I want the pieces of armor to stick to the base parts (leg armor to the leg etc..)to move along with them.
These are solid metal parts so they can't deform at all when rotating the hips, legs, etc.. I have no idea how to start rigging this model and attach the armor pieces to the base parts so any help would be amazing!

There are two ways:
If a piece is a stand alone object:
select the object, shift select the rig, enter pose mode, select the relevant bone, press Ctrl P - Bone).
Repeat for all the objects.
If some different pieces are contained in the same object, you can separate them (Press P in edit mode) and use the first method, OR you can use the armature deform: Select the mesh, shift select the rig, press Ctrl P - "With empty groups".
Then in edit mode select all vertices of a piece (use L and Ctrl L for fast selections), select the relevant vertex group and click assign under the vertex groups list.
As soon as some vertices are assigned to one vertex group only, they will move with the relevant bone exactly, undeformed, no matter which is the value of the weight.


When UV Mapping, can my mesh contain triangles or N-gons? I was following one of BlenderGuru's tutorials (creating an anvil) and reached the section on UV Mapping. I noticed that my mesh had two to four triangles on my mesh which appear to be hard to reach and edit into quads (my entire mesh is  destroyed when I try.) Will it matter that I have these triangles when it come to UV Mapping, and will I run into any other problems? (I am learning the skills for game development in the Unreal engine.)

Here's a picture showing these small triangles that I can't edit without destroying my mesh.

Short answer: no, triangles don't matter, but N-gons might.

Here is an article demonstrating some of the triangle's downfalls.

I have heard people talk about triangles being hard to work with before, but that has mostly been in the context of animation. They can also be difficult to model, because you cannot use some functions, like a loop cut, on triangles. As far as I can tell, it shouldn't affect unwrapping in any substantial way. I usually try to stick with quads, because for a few minute reasons, they are generally easier to work with, but a few tris in my mesh has never given me any problems.

They shouldn't give you any problems either, because you say you are learning for game design. Remember, most game engines actually triangulate the mesh anyway, before taking them in the game. The engine doesn't think of them as quads anyway, it thinks of them as triangles, so having some triangles in the mesh shouldn't be a problem.

So if there are some extra tris, I wouldn't worry about it.

N-gons, however, are good to be avoided, especially if there is any type of animation or deformation to be applied. This is because if you have, say, a circle of six points, where one point is lower than the others, how is the computer supposed to draw that face? faces, by definition, must be flat. Depending on what engine you are using, these N-gons will usually be broken up into triangles, so that the engine can show something that fits the shape. However, usually you want to control where edges are, and you may not be happy with the way these N-gons are handled in your engine. This is one of the causes of polygon flickers while in game, and meshes looking wrong.

So N-gons should almost never be used, if possible, except on completely flat surfaces that will not be deformed.

I hope this helps, and if anyone has anything to add or correct, please do.


The number of objects selected I would like to know the method which I can know the number of objects I have selected in the viewport. Precisely in object mode. Thank you in advance (:.

In the Info editor, the line in the menu bar to the right of the controls lists some stats about the view. This includes a count of how many objects are selected, out of the total number of objects in the scene.

Here's a sample screen shot of this info bar:

It lists "Objects:2/4" meaning that there are 4 objects in the scene and 2 are selected.


How to fix UV Map Issue? I want to fix the part I have marked in the image below.

I tried to apply scale, rotation, location and nothing happens. What can I do to solve this? And what PBR shader do you recommend for blender 2.78a?

I found a way to fix it

I had to unwrap my mesh with conformal option and that's it.


Render being cropped? I am trying out some of the Freestyle line setups from here: http://www.blendswap.com/blends/view/18717
When I render using these .blend files, I am getting a cropped render. How can the render be edited to show the full view in a different size?

Preview of cropped render

Your background image is limiting the size of your render. If you look closely, you will notice that the render image that is not black is exactly the same size and color of the texture. The rest of the camera view is filled with the default black, or if you check Film > Transparent with a transparent alpha value.

You will either need to change the size of your image, or do some work in your compositor.

One way to do this is to add a Scale node after your image texture like this:

(Shift+A > Distort > Scale)

The result now looks like this:


Render background and freestyle in different image layers Can anyone tell me how to render an image (tiff) with two different layers, one for background (need it white) and one for the rest of the render (just freestyle lines).
I am using Blender 2.8

Thanks,
Bhupen

As far as my understanding goes, Blender isn't capable of creating multilayered TIFFs.
However, you could use other software to acchieve that.
 1. Change the file format for the output
In Output Properties you would specify the file format "TIFF".
Any file format that supports transparency (and can be converted by ImageMagick) should be fine.

 2. Assign Freestyle its own render pass
Since Blender 2.83 there is an option to set Freestyle as a render pass in View Layer Properties.

In the compositor, Freestyle can then be processed separately.

In case you have multiple layers that you like to export in a single run, you could use File Output Nodes.
For the default cube, the rendered image would look something like this.

 3. Use other software to create a layered TIFF
Any software that is capable of creating multilayered TIFFs will work.
For ImageMagick this command should work. (As ImageMagick doesn't have a graphical user interface, this is executed from the command line.)
convert canvas:white -resize 1920x1080! blender_render.tif -compose over multilayered_result.tif

The resolution should match the resolution of your render.
Without the trailing exclamation mark, the background would keep its ratio (a square).


Cycles not available in 2.77? I can't select cycles as render engine. I have tried changing the user preferences as well as re-installing blender.

Any ideas?

never mind I had to change blender render to cycle render


How to set up __init__.py for my addon? I've written a script and am trying to turn it into an addon.  I've been trying to copy an existing addon which is working, but for some reason my variation isn't working.
I've created a directory that has an __init__.py in the root describing the addon and my script file in a subdirectory called ops.  I then zip it into a zipfile.  I then start a new Blender session, open the Preferences menu and install my addon.  Everything seems to go well and I get the message
Modules Installed () from 'D:\\dev\\testDeploy\\modalDrawOperator.zip' into 'C:\\Users\\kitfox\\AppData\\Roaming\\Blender Foundation\\Blender\\2.91\\scripts\\addons'

However, my addon isn't then added to the list of the available addons.  Why is this failing?
__init__.py:
bl_info = {
    "name": "Normal Tool",
    "description": "Run the example modal draw operator.",
    "author": "Test",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D",
    "category": "Generic"
}

if "bpy" in locals():
    import importlib
    if "modalDrawOperator" in locals():
        importlib.reload(modalDrawOperator)
else:
    from .ops import modalDrawOperator

import bpy

def register():
    modalDrawOperator.register()

def unregister():
    modalDrawOperator.unregister()

ops/modalDrawOperator.py:
(this is just copied from the examples in the script templates)
import bpy
import bgl
import blf
import gpu
from gpu_extras.batch import batch_for_shader

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

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

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

    # 50% alpha, 2 pixel width line
    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glLineWidth(2)
    batch = batch_for_shader(shader, 'LINE_STRIP', {"pos": self.mouse_path})
    shader.bind()
    shader.uniform_float("color", (0.0, 0.0, 0.0, 0.5))
    batch.draw(shader)

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)

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

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

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

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

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

        return {'RUNNING_MODAL'}

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

            self.mouse_path = []

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

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

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

if __name__ == "__main__":
    register()

Looks like my problem was that in the zip archive I made, I was putting my files in the root.  I had to create a subdirectory within my zip with the name of the addon, and then place the source files there.


Trying to make a sphere fall trough an animated opening hole in mesh. Help? I'm trying to make a hole open up in a primitive, in this case I hooked the vertices of a hole in a flattened cube. The scale animates so that the inner hole opens after a sphere lands on the cube.

Why does the sphere not fall through the hole? Is there a different way I should be doing this?
(The image below should be an animated gif)

After setting Rigid Body Collisions to Mesh you need to check Deforming. See my settings below.


What causes this very dark areas, that can't be shadows? I'm modelling an indoor scene, but I'm getting these weird shadow-like areas. They can't be shadows though, as they are way too dark and move with my viewports position.
I checked my normals, but they seem all ok (blue) for the faces in the screenshots. I also checked for overlapping faces/edges/vertices but couldn't find any. I do have a couple ngons in the model, but not in the affected floor area of Example 2.
The mesh is "open"(?), so from outside you could see the "inside" of the mesh (red normals). Could this be the cause? I tried adding outside faces as well but it didn't fix the issue.
Any help would be appriciated!

This can be the result of overlapping geometry - causing Z-fighting where two or more faces are in the exact same location and orientation. This can result in the faces shadowing each other and other artefacts  such as banding.
Check your meshes and objects to see if you have a duplicate mesh at the exact same point (try selecting one and move or hide it to see if the other remains) or whether your mesh has multiple overlapping faces (move a vertex and see if another face is in the same place).


Subdivide and separate face into different meshes Is there a quick way to subdivide a face and then separate the resulting faces into separated meshes?

Here's what I am doing now:

Select the face
Subdivide the face (e.g. into 16 square pieces)
Select one of the face
Separate by selection
Repeat steps 3 and 4 until there is one face left

This works, but this is really time consuming and I can't even imagine splitting into more pieces (e.g. 256 pieces).

Is there a function (hopefully built-in) to perform the above steps more efficiently?

Here's the result:

Here's the original state:

In Edit mode -> Select the face
W -> Subdivde -> tool shelf T or F6 -> Number of Cuts (in your case 3)
With the subdivided faces selected -> Ctrl + E -> mark sharp
Add edge split modifier -> uncheck edge angle
In Object mode apply the edge split modifier
(optional) in Edit mode -> select the faces if not selected -> Ctrl + E -> clear sharp
In Edit mode -> P -> separate by loose parts


Blender 2.8 addon dxf I am an Architect, and trying to learn Blender for 3d Modelling. Recently I added addon for importing dxf file. Since I work on large project in mm. I set Blender unit to mm. but when I imported the file in Blender 2.8 or even in 2.79b. I am un able to see the drawing in blender and it took quite while to zoom once it is zoom I am unable to work. Since zoom does not work properly.

Please help if i am doing anything wrong.

Regards,

Your problem here is likely viewport clipping. Its values can be adjusted in the n panel, view tab:

You also need to make sure the unit scale is the same in the DXF files as in your Blender scene. Default Blender unit scale is 1 so in metric unit system 1 unit matches 1 meter. This means that when you export to DXF from another software you must ensure units are set to meters in order to import them to Blender at correct scale later, or you can adjust the unit scale while importing:

So if the DXF file is saved with units set to millimeters and you are working in 2.80 with Unit System set to Metric, Unit Scale set to 1.0(1 meter), and Length set to Millimeter like this:

you would need to set unit scale to 0.001 while importing because a millimeter is 0.001 of a meter.

Blender 2.80 and 2.79 work significantly differently when it comes to units. In 2.79 the units define the unit scale as well, while in 2.80 the unit scale can be adjusted separately.

Why does unit scale matter? Blender stores values in 32bit floats so if you work with very small values on a very large object for example you may run into precision issues. There are also other issues like for example there is a limit to how much you can zoom in depending on your unit scale. It usually does not make much sense to work with meters if you actually work with objects of a millimeter scale. In architecture the objects you work with are not usually a few millimeters in size, they can be several meters in size, so in Blender 2.79 it is better to work with meters instead of millimeters even though they are the standard in architecture. This will help you avoid precision issues and will work smoother in 2.79. 2.80 is improved a lot in this area, and you should be able to work with millimeters fine because you can do that even if your unit scale is set so 1 Blender unit matches 1 meter.


Is it posible to get the coordinates of the shadow from its rendering? I need to know the volume of the shadow cast by an object by a light or at least the coordinates of the contour of the shadow in the floor. I thought that it would be possible to get the coordinates from the rendering, as it must calculate them to generate the shadow. Im new to both python and blender so I'm not sure if it's posible.

I found a diferent methode with the api in this question
Using Blender to investigate the cast of shadows from an object onto a specific point in space ,
but i'm wondering if its posible to extract the information directly from the rendering.

I haven't been able to extract the data directly from the render, but i have been able to put together a code from different sources that works. I'm posting it here in case somebody finds it useful.

import bpy
from mathutils import Vector, Matrix
import random

# In case we wabnt to asign a random color to the shadow
def get_random_color():
    ''' generate rgb using a list comprehension '''
    r, g, b = [random.random() for i in range(3)]
    return r, g, b

#We create the material for the shadow and assignt transparency
mat_shadow=bpy.data.materials.new('shadow')
#mat_shadow.diffuse_color=get_random_color()
mat_shadow.diffuse_color=(0.01,0.01,0.01)
mat_shadow.alpha=0.5
mat_shadow.use_transparency = True

#From this point we assign the objects we are gonna work with
#We assign the light, a point in this case
LightObj = bpy.data.objects['Point']
light_mx = LightObj.matrix_world
light_location = Vector((light_mx[0][3], light_mx[1][3], light_mx[2][3]))

#We select the surface we want the shadow
Surface_Object = bpy.data.objects['Plane']
surface_mx = Surface_Object.matrix_world
imx=surface_mx.inverted()

#we select the test objects
test_names = [ 'Cube','Suzanne']
test_objs = [bpy.data.objects[name] for name in test_names]
test_mxs = [ob.matrix_world for ob in test_objs]

#We loop througth the objects to create the shadows
for ob, mx in zip(test_objs, test_mxs):
    pol_accepted=[]
    shadow_mesh=[]
    shadow_object=[]
    cont=0
    #We loop through all the faces of the object
    for poly in ob.data.polygons:
        Loca_hit=[] # Where the ray hit
        Vertice_hit=[] #if vertice hits we save it here
        hits=0
        #We loop through the vertices of the face
        for indx in poly.vertices:
            i=indx #We save the indx in a variable, if not it will change to -1 when used
            P0=imx * light_location
            P1=imx *mx*ob.data.vertices[i].co
            #We check that the object it's not higher than the light
            #We should check in a more general case, that the point of the light it's farther than the point of the object
            if P0[2]>P1[2]:
                #We use the equation of the line that goes through two points to select the point of the line that
                #goes through P0 and P1, bellow the plane
                d=P1-P0
                n=(surface_mx[2][3]-1)/d[2]
                Pfin=P1+d*n
                re,loc, no, ind = Surface_Object.ray_cast(P0, Pfin,distance=1.70141e+10)
                if re:
                    hits += 1
                    Loca_hit.append(surface_mx *loc)
                    Vertice_hit.append(surface_mx *P1)
        #We only consider a face has a shadow if at least three points touch, the minimum to crerate a face
        if hits>=3:
            #We create the vertices with the hits and the original points, the faces to make a 3D mesh of each face shadow
            verts=Vertice_hit+Loca_hit
            f1=[n for n in range(hits)]
            f2=[n+hits for n in range(hits)]
            faces=[tuple(f1),tuple(f2),(0,hits,hits*2-1,hits-1)]
            for n in range(hits-1):
                faces.append((n,n+hits,n+1+hits,n+1))
            name='shad'+str(cont)
            shadow_mesh.append(bpy.data.meshes.new(name))
            shadow_object.append(bpy.data.objects.new(name,shadow_mesh[-1]))
            bpy.context.scene.objects.link(shadow_object[-1])

            shadow_mesh[-1].from_pydata(verts, [], faces)
            # Calculate the edges
            shadow_mesh[-1].update(calc_edges=True)

        cont += 1
    # We change the name of the first

    if len(shadow_object)!=0:
        shadow_object[0].name='Shadow_'+str(ob.name) #We change the name of the first shadow

        #We are going to join all the meshes together from the object
        scene = bpy.context.scene
        ctx = bpy.context.copy()
        # one of the objects to join
        ctx['active_object'] = shadow_object[0]
        ctx['selected_objects'] = shadow_object
        # we need the scene bases as well for joining
        ctx['selected_editable_bases'] = [scene.object_bases[ob.name] for ob in shadow_object]

        bpy.ops.object.join(ctx)

        # Assign material to object
        if shadow_object[0].data.materials:
            # assign to 1st material slot
            shadow_object[0].data.materials[0] = mat_shadow
        else:
            # no slots
            shadow_object[0].data.materials.append(mat_shadow)

        shadow_object[0].show_transparent = True


Whenever I press Shift + Z to Undo my errors It just goes into frame mode why does it do that? Whenever I press shift + Z to undo my error, it just puts me into wireframe mode. I wanna undo my errors, but it doesn't work as I excepted.

The shortcut for undo is Ctrl+Z not Shift+Z.


Higher Resolution Viewport Render I'm trying to render a black/white wireframe image of my scene and have perfected how I'd like it to look in the shading viewport, but I can't figure out how to save out that viewport at high resolution. The open GL render is very low-res. How can I make those lines as sharp as in the shader, or save out the shader image full res?

Viewport render uses the image size settings of the current renderer.

Change the resolution here:

And render using:


How would I create an arch? Is there a simple way to create an arch? Different type of arches on wikipedia.
I'm interested in the Round arch or Elliptical arch type of arches.

You can use an array + the simple deform modifier.

Start with a cube, this will be your "brick":

add an array modifier, make it as long as you want bricks. make them go up on the Z axis

add a simple deform modifier.
set the type to bend.
set the angle to 180
Add an empty at the origin of your object

Rotate it by 90 degrees on the Y axis.
Set it to the origin in the bend modifier
Move it away from your object to control the width of your arch, you may have to try multiple axis.

GIF


Cannot save customized blender interface theme .xml I have blender 2.83.1 installed via Steam, and i have 2.90 alpha downloaded from blender.org
I've saved and customized interface themes in the past, and i followed the steps listed everywhere which are
edit > preferences > themes
tweak the values to your liking
hit the + button
name your theme
and it SHOULD appear in:  /2.xx/scripts/presets/interface_theme
but my new theme isn't there
it only shows blender_dark.xml and blender_light.xml (which also doesn't make sense since many more preinstalled themes have been added)
i customized the looks of blender on my desktop to my liking and i want to be able to send that same theme to my laptop
any help would be appreciated, i can't seem to find an answer anywhere and this is very confusing since I've done this in the past with no issue but now it no longer works for me, thank you in advance

of course i found the solution right after posting a question...
it's in the configuration file or directory apparently
you have to go to:
C:/Users/Your User Name/AppData/Roaming/Blender Foundation/Blender/2.xx/scripts/presets/interface_theme
and the .xml files for your created themes will be there


Point features to 3D models with same scale of object Object Link Data Approach: as suggested in this given link: Is there any way to replace an object?
I have uploaded my screen shot of my workspace.

IMPORTED SHAPEFILE- using BlenderGIS Addon:- yellow encircled objects are those POINTS of pole locations.
IMPORTED COLLADA MODEL- Red encircled is the 3D collada model. I need to replace those points with pole.

I hope it is clear now. Pardon my language. I am ready to share the data if required.

Scales of both objects are different. even sources are different. There are so many such point features in this SHAPEFILE data (110 points needed to be replaced with POLE).
After doing that, a giant object is displayed as result.

Thanks for cooperating.

Object Link Data substitute the whole mesh, not the vertices

The method you proposed works with the substituction of the Mesh Data, but it requires to have multiple objects to work with (one object for each pole).

Currently, all the points are all binded inside the same mesh data, so they are simple vertices of the same mesh. Points are currently threated as a whole. Look in the outliner that only an object is selected:

You'll need at least to split each vertex into an individual object and set the origin of each new object on its geometry.

Enter edit mode, select all, press P and choose "By loose parts". Notice that now the outliner has many object. One for each disconnected vertex.

Enter object mode without losing the selection and set the origin of all the objects to the geometry.

Now you are ready to Link another Object Data to those object. Before running the operator make sure to apply the scale of your pole object.

Note: You'll probably have many advantages in adopting another approach to the task, like for example using the instancing of dupliverts or a particle system which both offer a greater level of interactivity (object is instanced on the fly, you control only the vertices) and avoid splitting the objects in many other objects.


How to simulate a real camera with blender I have a camera with a fisheye lens. I need to simulate it on blender to get the same images

camera properties:
sensor size: 2/3".
image resolution: 1360*1024
fisheye focal: 1.8mm
H*V (FOV): 185*185 (with 2/3").
here is the link for the fisheye lens fisheyelens and the camera GC1380

My problems is how to fix the V field of view ? I have chose a fisheye equisolid and I set a focal length as 1.8 and the FOV =185 as H filed of view. But the horizontal field of view is determined by the W/H image resolution which different to 1 in  the real case. Any help?

Looking at the specs form the manufacturer you can see the dimensions of the sensor:

Using simple math you can determine the sensor's active area to be 8.78mm wide and 6.61mm tall.

Input those on the vertical and horizontal size values for the sensor and create a preset for future use.

Set the lens and field of view. to 1.8mm and 185 degrees.

Now set the render size on your scene to the dimensions of your camera:


Bevel Tool – What exactly does LoopSlide do? Just for curiosity.
I don't find enough information about this, even in documentation.
I don't see any difference when I use it.

It controls whether to keep intersecting edges perpendicular to the bevel direction.
Loopslide On: gives smoother topology and better results for tight geometry
Loopslide Off: keeps perpendicular edges and even bevel width

When Clamp Overlap isn't enough, Loopslide On can keep the topology in check:


UV Unwrap brick wall, gable ends, slanted roof I am trying to model the inside of a room (brick walls, wooden floor).

I modelled it from 4 planes, put together like walls. This has problems with the edges not aligning when using displacement however. So I think it may be better to switch to a cube.

I find it difficult to uv-unwrap it however.

I want the roof to be slanted. But I can't figure out how to apply the texture correctly if I do, since it becomes warped, like this:

And I wanted a look something like this:

http://4.bp.blogspot.com/-3lENfxSJ_D0/UWWrONi20CI/AAAAAAAABrU/If-dkD5htwM/s1600/IMG_9933.JPG

How would one go around UV-unwrapping for that?

Best way that doesn't warp the "gables" (ends of the house, hope it's the right word) is to unwrap those by themselves. Only disadvantage to this is that blender will not see to it that proportions are kept then, so bricks will not be same size on all sides.

Also if possible I would like to avoid seams at the corners.

As @3fingeredfrog pointed out, use Project from view.
This will guarantee uniform scale of your texture.

Go to front orthographic view
Select faces and use UV > Project From View
Switch to left/right orthographic view, and repeat.

To keep the UV maps in proportion, scale them all at once.


Fire overlaying smoke bug i’m having a really bad time trying to follow one of Blender Guru’s tutorials. in his fire and smoke cycles tutorial (https://www.youtube.com/watch?v=u-zK7Bu8cAI) his smoke particles appear realistically in front of the fire when played in the viewport. Mine however always has the fire rendered completely in front of the smoke, no smoke can be seen in front of the flames, this is especially apparent when viewed from the top down.

Does anybody know what could be causing this? He is using blender 2.73 whereas I am using 2.79, could something have changed there?

Here is his fire

and here is mine

What do you have the smoke set to?  It could be that his is set to smoke+fire when yours is set only to fire.  This setting is under the domain settings, the first setting on the right


Animated character exported to THREE.js not animating properly I am trying to export animated character from Blender to THREE.js JSON using official THREE.js blender exporter. I have tried a few models from the internet and also a model included in THREE.js: https://github.com/mrdoob/three.js/blob/dev/examples/models/skinned/marine/marine_anims_core.blend

Exported JSONs are tested in this example: https://github.com/mrdoob/three.js/blob/dev/examples/webgl_animation_skinning_blending.html

Imported models are animating badly + model has a wrong x rotation (-90deg). The rotation can be repaired by rotating imported object in THREE.js. However it rotates the bones too and so not fix the problem. I think the problem is bad rotation of skeleton in relation to the model.

How should I export the model from blender correctly? Or is there a way to fix this later in javascript?

Blender: 2.73, 2.79, THREE.js: r77, r88, Chrome

Example: Wrong animation video

On GitHub there are a number of open issues about incorrect transforms and animation with the three.js JSON exporter. This is very likely one of those problems... I would try checking there, or exporting to FBX or glTF in the meantime.


Front, back and bottom orthographic view do not match I found this starship blueprint on internet:

I would like to start working on it from the warp drive.

I am using the blueprint as background image, but front, back and bottom  orthographic view do not match. I will try to explain my problem with an example.

A good starting point to make the warp drive is from a cylinder, using the cursor as point of view. I made it match the blueprint using the bottom view.

Then, since front and view were "broken", I rotated the cylinder again to match the blueprint.

But, as you can see, front and back view are perfect, but bottom view is broken.

I cannot make my cylinder match the blueprint position- and rotation-wise.

How can I solve this problem? Am I misunderstanding the meaning of "front", "back" and "bottom" in Blender?

There are some useful controls on the Background Images, Giovarco, that could solve Your problem. As You could see on the image below in the green rectangle, You could rotate and move the image using X, Y and ROTATION parameters so You have to rotate the TOP view 90 degrees and then use the X and Y parameters to line it up. Hope it helps buddy.

Sincerely, Jan


Why is accessing image data so slow? This script in the Python console:

>>> pixels = D.images[-1].pixels
>>> len(pixels)
8294400

>>> for i in range(64):
...     dummy = pixels[i]
...
>>>

takes over two seconds to run the for loop.

However, running pixels = [0 for i in range(len(pixels))] before the for loop causes the script to finish instantly.

What's going on with the Blender Python image pixel access, and how can I speed it up?

.pixels is a python object and pretty slow, especially if you change pixels. That is 'cause the entire buffer / python object is re-created for every single change (if you do it in a python loop). Not sure why it's that slow on read-only actions though...

You can speed it up tremendously if you cast it to a native python type (tuple) and use that copy instead:

img = bpy.data.images['Untitled']

pixels = img.pixels[:] # create a copy (tuple) for read-only access
# -- OR --
pixels = list(img.pixels) # create an editable copy (list)

# Use the tuple object, which is way faster than direct access to Image.pixels
for i in range(0, len(pixels), 4):
    pixels[i] = 1.0 - pixels[i] # invert red channel

# Write back to image.
# Slice notation here means to replace in-place, not sure if it's faster...
img.pixels[:] = pixels

# Should probably update image
img.update()


'Blend' in planes to create ocean/lake and also with Flip Fluids surface Hi there, normally I am able to find all the answers on this forum and it got me very far of what I want to realise. However, I wasnt able to find an answer to the following problem.
I created different planes and I want the edges to merge perfectly so it looks like one big plane. In the viewport they look good, but when I render them you see huge gaps (see picture). Initially I wanted to cover up the edges of my flip fluid surface, any tips about that would be very helpful because again huge gaps appear!
Let me know if any additional information is needed, thanks in advance!

I'm not entirely sure what you're trying to achieve here but if it's to blend a flip fluids simulation with a plane with an ocean modifier there's an in depth tutorial on youtube here: https://www.youtube.com/watch?v=8_aPHD9qe74&t=1s


Can not read "image texture" permission denied in windows 10 pro I have installed Blender in Windows 10 pro and everything works fine until I try to load an image texture in Cycles.

I get the message can not read image texture denied permission

I have two hard drives, one SSD and one normal. I install Blender on the SSD and the textures in one folder on the other disk.

I have tried to run Blender as administrator, to download it in .zip on the normal disk and open it without installing it, to load the texture saving it in "my images" but the failure continues.

I have loaded a .blend file with the packed textures and renders perfect. If I unpack the textures and load them, Blender reads them but in some objects it does not show them (the purple color of warning comes out).

The problem happens when I try to load from any other location. Textures do not have restriction permissions.

Finally I found how to solve the problem.

I have downloaded blender in the C drive, in which I have windows instaled.
I have downloaded in the folder Users / user (me).
I installed it and click right mouse button, repair option.
Then I restarted the computer and solved problem.


Can't move nor scale the mesh in Object mode I just bought a Character, with a C00 license. And the mesh seems to be locked some how. I'm able to use it in Pose mode. But only in the 0 0 0 position.

HERE IS THE BLEND FILE: I modified everything to the minimum, I just kept the mesh data, and here are the eyes ( with a different UV ).

http://nearfy.com/EYES_S-A.blend

In Edit Mode:

I can move and scale it but when I move it, each eye moves in opposite direction.

However, in Object Mode:

if I add a new Cube, yes I can modify the cube, move it and scale it, but still can't modify the original mesh.

The only thing I can do with the Eyes in Object mode is select them, and delete them.

I've been playing with the icons in the outliner, but even if they are all active ( eye - arrow - camera ), still no success.

I saw a similar post in here:

https://blenderartists.org/forum/archive/index.php/t-196654.html

But I removed all the modifiers and no success.

I also tried to append it from an empty file, and didn't manage.

I'm running out of ideas, and the seller is not answering.

Any suggestions?

Thanks in advance
Sebastian

Maybe you are talking about the "X Mirror" option?

And... yes, about object mode, transformations are locked:


Can image texture parameters be accessed from python? I would like to create a new image texture and define its name and size entirely via Python. The closest I can get is to generate the popup window where I change these parameters. I can't seem to find the answer anywhere. Is this possible?

I'm trying to create a script that auto-bakes a color ID map, tied into a single fat "Bake" button. I want the image texture's name and size to be predefined when generated.

Ah, nevermind! I found the answer almost immediately after posting.

bpy.data.images.new("StringName", 1024, 1024)

...I wasted an hour looking for this simple answer...


How do I render just one frame of a smoke animation using Blender Python API I have a smoke animation that is 50 frames long and I want to render only the last frame as an image.

I tried:

bpy.context.scene.frame_set(50)
bpy.ops.render.render(write_still=True)

But this doesn't render the fiftieth frame of the animation properly. The smoke animation doesn't update to what it should look like at frame 50 and instead stays at its frame 0 state

I managed to solve this by:

hbpy.data.scenes['Scene'].render.filepath = "FilePath"
frame_start = 1
frame_end = 50
bpy.context.scene.frame_set(frame_start)
for frame in range(frame_start, frame_end+1):
    bpy.context.scene.frame_set(frame)
    if frame==frame_end:
        bpy.ops.render.render(write_still=True)


How to apply a several modifiers with python (but not necessarily all modifiers)? Apply modifier button will write this into the console:

bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Box Right ")

Adding this line after "bool_mod.object = obj" does not work as expected stating that object has not attribute 'modifier'

ERROR:

  File "C:\Users\info\Desktop\Boolean.blend\ui_panel_simple.py", line 38, in execute
AttributeError: 'Object' object has no attribute 'modifier_apply'

CODE:

def execute(self, context):

    target_obj = bpy.context.active_object
    tool_objs = [obj for obj in bpy.context.selected_objects if obj != target_obj]

    for obj in tool_objs:
        bool_mod = target_obj.modifiers.new(obj.name+' ', 'BOOLEAN')
        bool_mod.operation = 'DIFFERENCE'
        bool_mod.object = obj
        target_obj.modifier_apply(modifier=bool_mod.name)

I went to blender python website to read about the modifier command and values and to my surprise found nothing that explains what options there are for operation for example.

https://www.blender.org/api/blender_python_api_2_70_5/bpy.types.Modifier.html

Objects don't have a .modifier_apply(), you can't do active_object.modifier_apply(). That's what the main Error message is saying.

modifier_apply is an operator of bpy.ops.object, which works if there's an active object. Confused? :)

# pick any object
obj = bpy.data.objects['Suzanne']

# set the object to active
bpy.context.scene.objects.active = obj

# this operator will 'work' or 'operate' on the active object we just set
bpy.ops.object.modifier_apply(modifier="my_modifier_name")

In the event that you want to apply a subset of modifiers, you have to start applying from the bottom up. You could put checks in place to skip certain modifier by type, but in your case you have only Boolean_Modifiers.

import bpy

def execute(self, context):

    target_obj = context.active_object
    tool_objs = [o for o in context.selected_objects if o != target_obj]

    BOOL = 'BOOLEAN'
    # first add them.
    for obj in tool_objs:
        bool_mod = target_obj.modifiers.new(name='diff_' + obj.name, type=BOOL)
        bool_mod.operation = 'DIFFERENCE'
        bool_mod.object = obj
        obj.hide = True

    # then apply them individually.
    for modifier in target_obj.modifiers:
        bpy.ops.object.modifier_apply(modifier=modifier.name)

execute(None, bpy.context)

This is one way to apply the modifier, there is also a direct way to apply all modifiers at once to the Mesh without such a loop. See this answer for details


Change saturation of rendered object without changing the background Image I´ve recently rendered a hand sanitizer on to a background image, and although it looks half ok, I noticed I had to reduce the saturation of the model to match the background image.

Unfortunately, when I go into render settings and change the saturation, it also affects my background image. Does anybody know how to apply saturation only to the model?

Look forward to your comments.

Many thanks,

Karl.

You can use an ID mask to do this.

Select the object you wish to color, go into object settings and change the pass index to 1.

Now go into the layer properties menu and enable "Object index" under passes.

Hit render. Now go into the compositor and add a viewer node so you can see what you are doing. You can use the "id mask" node as a mask for the object. Here I have setup a simple node network that will achieve what you want:


I accidentally dragged the timeline, and now it covers the entire screen. how do i put it back? Im new to blender, I accidentally dragged what i think is the animation timeline at the bottom of the screen upwards, and now It covers the entire screen. I dont know how to put it back, I tried dragging down from the top but it doesnt work. Please help.

You can just change the Editor Type.
Or, if you want more editors side by side, drag the tiny corner to split the area.

Change the editor type or split the area.


How to make a 2D balance weighting scale? So, I want to make a 2D weighting scale in blender like this guy does in After Effects in this video

Any ideas?

The simplest way to get the job done is create a three bones armature, setting their heads in every pivot point needed, then parent left and right to main bone (keep offset), then unceck the "inherit rotation" option for both arms.

Then parent every 2D object to the respective bone (Ctrl P - Bone).

After the programming of the animation you can add some noise generator to the f-curves in the graph editor, where you need some random movements.


Overlapping faces / texture painting i am learning the blender program following BlenderGuru videos: https://www.youtube.com/watch?v=nht2RoYBUfA I was drawing the donut texture. When I use the brush I don't have a single stroke but fragmented or reproduced in other points. the problem should be overlapping faces?
Does anyone know how to do? help me please

HI .
1- Just make two cuts like Picture by selecting Edge loops and Press CTRL + E > mark seam
2- go to uv and press U to unfold it
GL .


Non-Manifold after boolean modifier (difference).... Why? I've made a simply (big) knob for potentiometer. After applying boolean modifier (difference) for create a starred hole (starting from a starred cilynder), the object come with "Non-Manifold"... Why? Anyone can help me? Thamks in advice.

It looks like the cut has its normals inside out. In edit mode select everything with A. Then recalculate the normals using Shift+N. If that doesn't work make sure that your cutting object is manifold before cutting.


smoothing the placement of vertex I'm trying to model a car, when joining two hood and the fender I had to tweak to geometry to make everything quads but I ended up with sort of bump as you can see:

Here is my topology:

each time I try to move a vertex to remove the bump I create another,

Is there a way or an add on to get perfect curvature?

Here is the file:

Maybe you should use a simpler topology. I've done this from scratch, using your object underneath, first I've used the Snap option then the Shrinkwrap modifier so that it sticks to your object. Maybe you should use the same method, but starting with a duplication of your own mesh so that you have the right amount of edges...


Timeline input fields, how to display? in this my project I see for first time input fields in the left of the timeline; I don't know how I did it..
in other projects I don't know how to show/hide these very useful fields!!


vertex paint final rendering I painted my object in vertex paint (cycles) and it looks great in rendered view, but on final picture render it has white spots on it. Did anyone had the same problem? Thank you

nodes: attribute - diffuse BSDF - material output

There are two independent switches to make an object visible:

The Eye icon toggles visibility in the viewport

The Camera icon toggles visibility at render time

Pressing H to hide an object will only make the object invisible in the viewport, but not for render. The object will be visible when you render unless you switch off the camera.


Python script renders a collection even when excluded from view layer I have the following code to render child collections within a collection:
sideplates = bpy.data.collections["RACK 1 - 1 RACK FRAME"].children

for s in sideplates:
    s.hide_render=False
    s.hide_viewport=False
    n = s.name

    # render 800 x 600

        scene.render.resolution_x = render1xresolution
        scene.render.resolution_y = render1yresolution
        bpy.data.scenes["CONFIGURATOR 800 x 600"].render.filepath = '/BlenderPythonTest'
        bpy.ops.render.render(write_still = 1)

    s.hide_render=True
    s.hide_viewport=True

The collection structure looks like this:

I have tried to untick the box, excluding the child collections from the parent collection. Running the script will still render the "Nuage" collection et al, when what I would like from the picture above is just to render "Sable", "Souquillou" and "Cab".
Is this possible and if so, how?

I did this recently, you have to access your collection through specific view layer.
You should try :
my_view_layer = bpy.context.view_layer #up to you

#append to sideplates only checked collection
sideplates = []
for collection in my_view_layer.layer_collection.children["RACK 1 - 1 RACK FRAME"].children :
    if collection.exclude == False :
        sideplates.append(collection)

##render individually checked collections
for s in sideplates:

    #exclude every other collection
    for sp in sideplates:
        if sp != s :
            sp.exclude = True

    ## RENDER STUFF ##

    #restore exclude attribute
    for sp in sideplates:
            sp.exclude = False


The animation looks really slow in the rendered video I am rendering some Skeleton Anim (.psa) animations with the Eevee engine but the animations in the rendered video looks like it's in slow motion, the character is doing its moves very slowly. The animations are from a game and they are looking very unnatural as they are rendered now.
Does anyone know what might be the problem?

CPU: i7-6700HQ, RAM: 8GB, GPU: Nvidia GTX 960m

Can it be because of system specs?
Render settings: resolution: 720x800

The problem was the distance between the keyframes.
After scaling them down, the animation looks fluid.
To scale up or down keyframes, in the Dope Sheet, select all of your keyframes press S and use the mouse to resize the length of your animation.


Can't find smoke and color mapping options for Fluid Simulation Blender 2.9 I am trying to make an explosion with Blender Mantaflow, but I do not see the following in the Properties view in the Physics Properties:

Color Mapping
Smoke

I am using Blender 2.91.
Can you help me solve the problem?

I believe this was renamed to "Grid Display" after blender 2.90. See here for some usage info. Compare the docs between versions 2.83 and 2.91.
The Smoke settings Buoyancy Density, Buoyancy Heat and Vorticity are now labeled Gas, you can see them in your screenshot.


My quad looks like two triangles I'm a beginner and I don't know what's going on.
Some faces I've made look like two triangles glued together with different angles.

Removing doubles didn't do anything, nor flipping normals.

All faces (quads and n-gons) will be divided into triangles when they are rendered. Depending on the engine the solution for that triangulation will differ a bit. This is a normal thing. If you don't like how they are triangulated you will need to do it your self.


Smoke Render Problem I don’t have time to add an image to show what I mean, so I’ll have to do that later, but I’m having an issue rendering out an animation of smoke in Cycles. Every time I do it, I’ll set the necessary frame that smoke is visible during the animation, hit the Animation render button, and the smoke looks barely visible. It’s thin. Whispy. Transparent. I’m not sure what to do. I’ve checked a few tutorials, but they all seem to be for a single frame render rather than an animation. I set up the smoke using the Quick Smoke effect, so it has an emitter and domain etc. I even tried adding a plane behind it and gave it an emission material, but the same thing happens. What am I doing wrong?

Save file

Thanks.

Thanks for the .blend file @DustyShinigami it really helped me answer the question.

To create a more dense smoke sim, you need to select the domain, then go to the node editor. There should be a Multiply node, ramp up the adjustable value. I set mine to 50 and got some good smoke. I also upped the Anistrop to 0.2.

I also recommend expanding the domain up and out as the simulation is hitting the sides and makes it look fake.

As for the waterfall, I recommend using a fluid sim if that is what you are trying to make. It is there for a reason, use it :D.

Rendering in open GL should work fine. It may be something to do with your save location so double check it. Also, make sure you have run through every frame first.

Your project looks good BTW. :P

Good luck with your project and I hope I helped,

BFB


missing files blender 2.82 Missing UVs, Textures, detected! Missing UVs, Textures, detected!
Missing UVs, Textures, detected!
Missing UVs, Textures, detected!
Missing UVs, Textures, detected!
the message seems like this, can't use shapes and color pls help urgently. blender 2.82 version
and its look like this pic

I had this problem too. In mode select Single Image instead of Material and you'll see an Add UV button. Just add that and you should be able to paint on the object. If not I'm not sure what else to do. It worked for me. Hope this helped!


why my mesh get weird shading when I click smooth? why I get this weird shading?
I think the angle of edge loop is not extreme enough,

You can mark sharp edges then use an edge split modifier and an subdivision modifier set the edje split modifier so it splits sharp edges.This way you can add more geometry and reduce these "shadows"
Edit:The subdivision modifier goes first and also adding edge creases might help)


Invisible Proportional Editing Circle I was in edit mode and I wanted to move a vertex with proportional editing on. So I clicked on a point and pressed "g" to move things with it enabled. However, instead of the usual circle to indicate how many points would be moved, the circle did not appear at all but I could still move a bunch of vertices at once. I could tell it was working because when I scrolled up or down on my trackpad more or less vertices were being moved as if the circle was still there, but it's still really inconvenient because I can't see how big my circle is. I have no idea what caused this. I've tried closing and opening the project in blender as well as restarting my computer to no avail.
edit: The circle is back when I opened a new project, so it may be a problem with the specific file I was working on. Maybe I did something to make it go away but I do not know.

Found the answer. I had to the "pivot point" set to the 3D cursor and had to change it to median point. Answer by courtosy of developer.blender.org


Viewports broken on RX 580 Blender was working fine until recently (I can't pin point what happened). I have not knowingly changed any settings in Blender or on my PC in general.
I've been working with Blender daily and hadn't noticed the change since most of what I was doing was in Cycles Render View, which does seem to work.
Here's the problem.
Doesn't matter if it's a file I open or a default object on a fresh file.
In Object mode, if I add any object (example monkey), then switch to wire frame, I get an outline of the object only, no wire frame. Solid view seems to show correctly. Material Preview only shows a filled outline, the fill color is the same as the grid color, but applying a color does not make any difference. Render View EEVEE shows a filled outline, not a render, and the fill color disappears as I rotate the object. If I switch to Cycles, it seems to be ok.
I was using Blender 2.90, and hoped that switching to 2.91 would resolve, but it's exactly the same. I also tried going back to 2.8 and got the same result. I then looked at my graphics card RX 580 which recently did an update...I reverted back to the previous version, but to no avail.
I'm out of ideas, and cannot figure out if this a Blender issue, a hardware/software issue....or if I inadvertently clicked something. I've looked through Blender settings repeatedly but can't see what could be wrong.
I did see a post here from another user who is having the exact same issue, and he/she uploaded a youtube video showing their issue. I would have preferred to comment on theirs, but this forum doesn't let me, so I had to load my own questions.
[UPDATE Dec 4-2020]
I did a system restore back 1 month (to ensure no new updates were present), tested and Blender was working fine (V2.90). I began re-installing updates one at a time and test after each.
Summary of results - All Windows updates installed to current, Blender works fine.
Radeon updates - v20.9.2 (driver v27.20.12031.1000), Blender works without issue.
Radeon update 20.11.2 & 20.11.3, Blender is broken.

Started having the same problem just after a Radeon update[I think 20.11.1]  (AMD RX580 8gb),
GPU viewport rendering is broken(was using portable Blender folder, tried installing updated Blender and still no fix).
After some googling found some people were having similar problems and decided to leave it for a couple of weeks in case of a fix-patch.
No update patch yet but I tried switching to "High Quality Normals" and it totally worked for me!
TEMPORARY FIX: Render Properties > Performance > High Quality
Hope this can help others too.


How can I animate something being constructed? I'm trying to animate something like a wall being created out of the ground.

Like this, per example:

What I want is to make the ice appear (being stacked and you can see is it forming into a "puddle" like) on the ground first.

Being created like this

Followed by the walls being pushed out of the ice in order to create the wall.

Can anyone tell me how can I do that?

If your "wall", as in the first picture, is "icy" meaning that it should grow from something like "water", another approach could use a reversed fluid animation, maybe:

You could use better (reverse) "start" shapes, and/or add displacements to final result, and also animate materials/textures to make the  fluid > solid transition modify the final shape, adding more interesting details...


Make Part Of Material Transparent I want to make the blue part transparent and the non-blue part not transparent, there are no vertices where the grey part is so I can't just make a new material.

What you can do is that you can edit a copy of the texture in an image making program like Paint.net.

First, make the area where the non-blue strands are black and the blue areas grey or white. If you want the blue area to be translucent (between opaque and transparent), choose grey. If you want it to be fully transparent, choose white. After you do that, save the image as a separate image file (I'll call it alpha.png).

Now go to Blender. Go to Cycles Render.

Then, go to the material's nodes in the Node Editor. Add an Image Texture node and load alpha.png in it. Connect its Color to a Transparent BSDF's Color. Then, add a Mix Shader node. In one Shader socket on the left side, put the Transparent BSDF. In the other, put the BSDF your actual texture (NOT alpha.png) is connected to. Finally, take the shader socket on the right side and connect to the Material Output.

Here's the explanation; connecting alpha.png to the Transparent BSDF creates something called an alpha. White means fully transparent, grey means between transparent and opaque (translucent) and black means opaque.


How do I eliminate the white outline on my layered textures? I have a texture that I split up into layers so I can change the color of each part of the design, however, there seems to be a slight white outline around some of them. Is there a way to avoid that when layering my textures? It wasn't like that before I split it up.
I took my illustrator design and split it up into color layers: blue background, pink design, black design, and a transparent grey design. Then I used a UV map to apply the images as textures and layered them using MixRBG nodes. My material setup is below. I am pretty new at this so thanks for the help!
Also I'm trying to learn about "baking" textures, is this an instance where that would be helpful?
[]     [1]

I tried masking my pink and black layers but that just resulted in this:

Here's what those black and pink layers look like in my uv editor:

The white artifacts are from the white background of your pattern images and the way you mix them.
A transparent PNG file has 4 channels (RGBA). The red, green, blue channels (RGB) create the color image. It's the colored pattern on a white background in your case.Note: There is no real foreground and background color, just an area of pixels.
The alpha channel (A) is a grey value image. It's automatically used as a mask by most image viewers. A black (0) means transparent, a white pixel (1) means the final image is opaque at this spot.
To avoid harsh edges the alpha mask is usually blurry and has grey values (between 0 and 1) at the edges for anti-aliasing.
You may have created the images as vectors but the PNG file format is a raster image format - unlike SVG which is a vector format. So there are grey pixels.
You can see these grey pixels of the alpha mask in Blender when you just use the Alpha output of the Image Texture node:

This is original image:

Long story short, how to get rid of it?
You could use a Color Ramp node to map the grey values. But this also destroys the anti-alias effect and you will get blocky edges.
After a short consideration, you come to the conclusion that you don't really need the color information. You can take a B/W image, which separates the image into the foreground (pattern) and background color. That is, you simply colorize it in Blender.

With help of the Fac values, you can blend between the 2 foreground colors and 2 background colors.
After looking at it, you can move this all into a Node Group:

Now you have 2 foreground colors to choose from, 2 background colors, and 2 mix values to blend the colors 1 and 2. The mask image defines the pattern. I've used the Alpha slot here but all you need is a B/W (grey value) image. Of course, you can use another image for the color slots. And you can have it all without any artifacts.

Example with 3 masks to replicate the given image in the question:


Scene with multiple objects - Is it possible to export everything as a single object, but maintain multiple objects in the outliner? Ok, yeah, that might have been a bit confusing as a title...let's see if I can clear it up!

I'm working in Unity and building the geometry for scenes in Blender. This can involve quite a few objects.

Ideally, I want to join everything up to export it as a single FBX. I could do this by joining.

However, I also want to preserve in Blender everything as a seperate object which allows easier editing.

Does that make sense?

Are there any ways to temporarily join everything up just for export?

Historically, I like to make two files. A working file for editing and a flattened or joined file, saving over or making a new copy of the joined file each time I edit the working file. It stays quite organized with proper naming conventions. I am not aware of another way to accomplish what you are asking.


.PDB Files are not capable of importing to blender 2.8 .pdb files arent able to import to 2.8 due to unicode decoding error

Does anybody have a solution for this because not one .pdb file is working. I can make the molecules but long term, this would be an issue for massive proteins that people have put months of work into.

The issue is that your files have the wrong encoding. The byte 0xFF is not valid in UTF-8. You need to convert the file to UTF-8 then it should work properly. A good editor will be able to do this for you, for example Notepad++ offers a function to convert encodings.


Subdivision and solidify sharp corners I've made clothing for a character. I want the clothes as simple as possible. I use a Solidify modifier and a Subdivision modifier after it. There is one problem. I can't get the corners sharp. Edge creasing only works with at least 2 connected vertices.

This is an example. A plane without any active modifiers.

Now it has a solidify modifier

And now it has Subdivision after Solidify.
As you can see, the corner gets rounded or smoothed out. I don't want that. Also, I want to keep the Subdivision modfier BEHIND the Solidify modifier to make the cloth look more realistic.

Or else it will look like this.

I tried creasing the edges... but it only creases the edges, not the corners.

Also it defeats my purpose of having the Subdivision modfier BEHIND the Solidify modifier.

Using the Rim Crease in the Solidifer modifier setting I found a way that almost brings me to my goal...

...but as you can see, it comes with a negative byeffect when the edge vertices are moved. You can definitely see the crease takes place to all edge vertices, making them look bad.

Are there other options I can get my corners sharp?

Have you tried using an angle-limited bevel modifier after the solidify?  You can tweak the angle as appropriate, but that ought to dynamically add more geometry exactly where you need it to convince the subsurface that you want more defined corners and edges.

It has the advantage that it's dynamic and doesn't care about the shape of your objects - but the disadvantage that it DOES care about the angles involved, and it will most certainly add more geometry to the mesh - but then, the manual method of adding loopcuts also does that.  You get to pick how and where though, which can help.

I had a play around and using the other limit modes on the bevel doesn't seem to help much, but if angle limited isn't working they are potential options also.


Why when I'm inserting a key frame it's adding only 1 but in the tutorial it's adding 4 ? How can I make it to insert 4 keys like in the tutorial? My blender version is : 2.83.1
This is a screenshot from the tutorial on youtube he his doing right click on the offset and insert a keyframe. Like in frame 1 it's adding 4 keys same when he is doing in the frame 120.

This is a screenshot of my blender and it's adding only 1 keyframe on the first frame on frame 120.

So the answer is: You only need the one key frame to achieve the desired result. : )
But I looked at your file and here are some tips to help make this work:

After you insert a keyframe on the Offset value 0 of the Follow Path constraint, you might also want to insert a keyframe on the Offset value 100 at another frame in the Timeline.  Here it means 100% of the path is traveled, so The difference between the Timeline frames will determine the length of one cycle ( how long it takes for the light to go around the curve once)

Press Numpad 7 before you change the shape of the curve, otherwise you might also move its vertices in the z axis (and change their height), which could change things in an unwanted way.

Before you add the light (and also the curve actually) to the scene, press Shift + C to move the 3D Cursor to the center of the scene. Then the light will be in the will be better aligned with the curve and the "moving in a very small area" will be reduced

Alternatively you can move the light close tho the curve and check the box next to Follow Curve in the Follow Path constraint. This will allow the light move either around or inside the curve depending on the distance between the light and the curve. (If you have the box checked next to Relationship Lines in the Viewport Overlays menu, you can see a dotted line between the light and the curve indicating this distance.)

Hope that helps : )
Edit:
I also realized the answer to the actual initial question : ) Why does it sometimes look like more keyframes are added? If you extent the panel on the left in the Timeline window (by clicking the tiny ">" icon) it will show a Summary of used keyframes. If you extend this summary, more diamond icons will be shown but they are the same key frames by a different name or UI location. If the summary is extended and the panel is hidden, it can give the illusion more keyframes are added.


How can I make a neck and body for my head mesh? I tried to create a neck and I succeeded. But when I try to turn the neck into shoulders it just doesn't work. (I mostly sculpted) (most of the mesh is sculpted)
can anyone help?

If you want to stick to sculpting you could click the Dynamesh button (in this gif I also checked constant detail and upped the resolution).

I used the snakehook brush here, but the normal clay brush works too (the grab brush does not work though, it does not add new typology).


Edit Mode Wireframe + Translucent View? I'm trying to texture a model I made with a texture pallet I imported into the Compositing View with Smart UV Unwrap, but when I'm in Edit Mode, the entire model is in a sort of mid-way-to Wireframe View in which everything is grey but still see-through and selectable through. When I key Z to toggle to wireframe, the grayness goes away and my model is simply shown in regular wireframe. From YouTube tutorials, I see no one with this issue. Please help!

I assume you're talking about something like the following.

This is enabled by the Limit Selection to Visible button at the bottom of the 3D Viewport (). Clicking it will toggle the transparency.


Deaktivate Rigid Body Object after a certaine timeframe due to the jittering of Mesh Collision Shape - I would like to deactivate Rigid Body objects e.g. after a certain timeframe.

In blender2.79 I found this Python API for making an object with a certain name a passive object:

bpy.data.objects['name'].rigid_body(type='PASSIVE')

However, this results in the following error: 'RigidBodyObject' object is not callable

Any help on how to attribute "PASSIVE" to an rigid_body object of a certain name as Python API for blender2.79 would be fantastic.

bpy.data.objects['Cube'].rigid_body.type = 'ACTIVE'

This is how you do it. If someone can explain further why I'd be happy to read it :)


How can I evenly split a cube? I am trying to make a mold to model the airway.  Is there a way to split a cube all the way through in multiple parts. I am trying to cut the cube in this fashion.  Is there way to cut it like this? I tried using the knife tool, but that only cut the surface, as opposed to cutting all the way through the object.

If you say the knife does not work for you, as it only cuts the surface, then you may want to use the option Z to Cut Through, for a snapping on angles to ensure a clean cut, you can also use C, so a cut from the front or any orthogonal view can be made in a straight line.

Here the optional functions of the knife tool:

A cut through cube:

Another option would be to use bisect, where you can also find some optional functionality mentioned while the tool is active.

Here a bisect example, bisect has the advantage that you can select the fill option and it will generate a surface that closes the cut:

I believe bisect might be a good idea as you can adjust not only the direction but also the position interactively.

Happy Blending.


Sculpting with Dynamic Topology, using Inflate Brush, blue Artifacts appear I sculpted with Dyntypo enabled, but then there appeared those strange blue artifacts. If I use the smooth brush, it minimize the problem, but some artifacts stay.
Why does this happen? And how can I fix this?

Many thanks!
And happy modeling :)

This is because of bleed through from the inner faces, facing the opposite direction. The darker color indicates the Normals direction. Try to never have interior faces near the sculpting surface while sculpting. If the hair is a separate object, you can completely remove inner faces, as they serve no purpose.

Notice that you will have to do this before you begin sculpting, as sculpting directly affects changes to the mesh. In order to salvage your mesh, you will have to just clean up as carefully as possible, using the Smooth brush and such tools.


Display Texture in viewport I am new to using Blender 2.8. Actually to Blender as a whole. I am creating a game in unity and needed a .obj file. Currently I have an obj file, but is has no colour at all. It's just plain white. The textures(.png files) came separately unfortunately and I have to join them myself. The problem is though when I import the obj files I can see the design in shader view, but not in the viewport. And so I can not see any colours when I export it. I don't know how to make Blender export the version I see in Shader View, not in the ViewPort. I have attached some pictures to make it clear. Please remember that I just started using Blender and have no experience. I just want to use Blender to add the texture to the obj file. I took some time on other sites for help, but there were too confusing for me(since I am still new to Blender). I would appreciate an answer that I can understand.
I can't seem to upload the view from the viewport, but it is the same model, but without colours. Can anyone help me or point me in the direction on how I should fix this?
Link to file example
https://drive.google.com/drive/folders/136JAU39QuD3YjroLCU9UfEzixqg6PBRa?usp=sharing

I believe your problem's issue is that you are in the view Material Preview instead of the correct view Rendered View.
You can also easily toggle these views with the Z key shortcut menu.


Simple Blender script in VS Code causing EXCEPTION_ACCESS_VIOLATION, but works in Blender I'm trying to use Visual Studio Code to develop Python Blender scripts, and I've run into an odd problem.
I already had Visual Studio Code installed (1.49.3) on my Windows 10 box, so I downloaded Blender (2.90.1) and the latest stable version of Python (3.9.0). I also installed Jacques Lucke's Blender Development extension.
I was able to connect Visual Studio Code to Blender. But when I ran the following test script:
import bpy
bpy.data.objects["Cube"].data.vertices[0].co.x += 2.0
bpy.ops.mesh.primitive_cube_add(location=(1, 0, 0))

Blender crashed, and I got the following error message:
Error   : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF6091405F3
Module  : blender.exe
Thread  : 00002968
Writing: C:\Users\aschn\AppData\Local\Temp\blender.crash.txt
The terminal process "c:\Program Files\Blender Foundation\Blender 2.90\blender.exe '--python',
'c:\Users\aschn\.vscode\extensions\jacqueslucke.blender-development-0.0.12\pythonFiles\launch.py'"
terminated with exit code: 11.

However, the script works just fine when I run it directly in Blender (in its Scripting workspace).
So, I tried eliminating the line that creates a cube:
import bpy

bpy.data.objects["Cube"].data.vertices[0].co.x += 2.0

This script works fine from Visual Studio Code.
In short, from Visual Studio Code I can manipulate existing objects but I can't create a new one.
Any idea what's going on? I found a bunch of posts about the EXCEPTION_ACCESS_VIOLATION error, but the code that was causing the problem described in these posts was far more complex.

I tried to apply a fix for a similar problem you described about the Exception Access Violation error.
The sequence to follow apparently is to go under the Advanced tab under Windows System Properties selection.  Under Performance Options, there is a radio button selection to Turn on DEP for all programs and services except those I select:.
Upon adding Blender 2.90, The DEP prompt displays

You can not set DEP attributes on 64-bit executables".

I have a 64-bit Windows operating system, in which Blender 2.90 worked temporarily after adjusting the compatibility settings to Windows 8. Apparently a particular Microsoft update doesn't like the software.


Modal Operators: Click Object Event I'm currently working on a python tool using a modal operator.
Now I know to finish the operation I can use:

if event.type == 'LEFTMOUSE':
    return {'FINISHED'}

However it seems not to count as a 'LEFTMOUSE' when I click (select) an object! I also tried 'SELECTMOUSE' which doesn't do anything.

What I would like to do is store the clicked object, and then automatically finish the modal operator.

Any ideas? Thanks in advance!

Why type.event ?

You should get your event.type, and you may want to compare the event.value as well:

def modal(self, context, event):
    if event.type in {"LEFTMOUSE"} and event.value == "RELEASE":
        return {'FINISHED'}
    return {'PASS_THROUGH'}

Also, it might be possible that an event been stop propagate in most of the event handling system. You might need to check the context carefully to see what is the main problem.


When I export a game the executable file hasn't got any textures I have a game with textures and I want to export the game into an executable file. I know how to export it but when I run it, it hasn't got any textures? Please help.

When you want your application file include the textures then you need to perform Mainmenu/File/External Data/Pack All Into .blend before creating the application file.

Each asset that is not included will not be found and therefore not be displayed.


How to offset root position of an animation? I have a mocap animation that i want to blend into my Idle pose at both of the ends. The problem is, this animation has its root (Hips bone in this case) in different position, lower, to be exact:

Here is what happens when it blends between Idle position:

How to offset position of this mocap animation, so it would not sink into the ground? The Hips bone needs to be lifted up, but i don't know how to offset it with whole animation. Here is my .blend file with this scene:
http://www.pasteall.org/blend/36228

In your mocap animation, Make sure your active action is set to the mocap action, either by selecting it in the dope sheet - action editor mode, or in the NLA editor, select the strip and hit tab to turn it green (this is known as tweak mode).

Change into the graph editor, and select the hip bone. Hide and lock all but the z-location channel. Select all channels (a key) which should only select the z-location and "grab" (by pressing the g key) the channels in the positive "y" aka up direction (constrain to up-down motion by pressing y after g) and adjust its z direction for all key-frames to one that lines up with the ground plane.

Keep in mind I usually work with the dope sheet when working with 1 action because if you edit the animation, it may not always update the NLA strip. I think some of the interface inconsistencies in blender show here and are actively being worked on (eg. the tweak mode which is new in blender 2.74ish)


UV's not updated in Textured view when in GLSL material mode When Viewport Shading is set to Texture and I set the Shading section's material mode to GLSL instead of Multitexture, the UV's are incorrect and do not update when I adjust them. But when I set it to Multitexture, the material properties are incorrect (normal maps ignored, etc.)

Only when I set Viewport Shading to Rendered does everything appear correctly.

Am I missing something about GLSL mode? I created a UV sphere, and it always shows the original UV's from before I did my own unwrap on them.

Blender behaves in a way designed to help make UV Editing/Texturing easy. Which can be a bit confusing at first.

When using Blender Render and the 3DView's draw mode is set to Solid and Textured Solid shading is enabled both Multitexture and GLSL behave as follows -

When you are in edit mode, you can select one of an objects UV Maps, then select an image in the UV Image Editor to associate with that UV Map. While still in edit mode selecting another UV Map will also switch the image displayed in the UV Image Editor to show the image associated with it, which will also be the UV Map and image used for display in the 3DView.

In object mode selecting a UV Map will still switch the UV Map and image used in the 3DView but not the image shown in the UV Image Editor.

When unwrapping objects this is helpful but it does override the texture setup for the material. So for the texture shown may not be the same as what gets rendered.

When the 3DView shading is set to Texture, multitexture continues to behave this way but GLSL will use the image set to be used in the texture. If multiple image textures are defined then the image used in the texture lowest in the texture list will be used and if the UV Map to use is also defined in the same texture then it will be used instead of the selected UV Map in the UV Map list.

For a material with one texture and UV Map then GLSL will look closer to the rendered result, but using multiple textures will still vary from the rendered result.

When using Cycles it can seem a bit trickier. With Texure shading it uses the UV Map selected but uses an image from the active Image Texture node (the selected -or last selected- image node in the node editor) from the objects material.

When using Material shading it gets an approximation of the images used in the material, that is image nodes connected to the output with other nodes mixed in also altering the appearance but they don't give the same result as when rendered. Any uvmapping adjustments being fed into the image nodes also effect the result seen in the 3dView.


Fluid Inflow Fails To Fill Simple Tank Depending On Position In Tank A simple tank (fluid obstacle) is filled by an inflow object.

If the inflow object is positioned inside the tank at about half the tank's depth, it begins filling the tank at a reasonable rate, but then the level stagnates despite the inflow's continuing constant rate.

If all is identical, except that the inflow object is positioned just above the tank. It fills the tank at a reasonable rate and then overflows (reasonably correct behavior).

(I am only allowed two links, so can't post the blend file)

Why does the first case fail to fill the tank?

Other Info:

Scene is set to Blender units.
The domain dimension are 1.1x, 0.8y, 0.8z
The domain Real World Size is 0.5m (Setting it to 1.1 makes little
difference)
All scales have been applied.
All normals are correct and meshes are manifold.
The inflow Volume Initialization is set to Volume, with an inflow
velocity of z = -0.5
The obstacle Volume Initialization is set to Shell.
Bake resolution is 80 (Running at 200 makes little difference)

I have varied the obstacle impact factor, the domain optimization grid levels and compressibility, simulation speed, and a few other things. The only things that have significant effect are the height of the inflow object, a significant decrease in domain real world size, or a significant increase in inflow velocity.

In the real world, if I remember, the inflow velocity would equate to some sort of velocity head. And I suppose if this is low, the inflow might be cut off due to increasing static head on the inflow object. But I didn't think the fluid simulator took account of these types of things(?). That is, I thought the inflow velocity was supposed to be non-changing.

Thanks for any explanations.

EDIT: Attempting to upload .blend for case where inflow is inside tank.

Blend file for inflow object inside tank (Second upload try)

I had posted this question on blenderartists.org a week or so before posting it here.  I just received a particularly good answer from the fluid sim coders themselves.  You can read their response in the link below.

In summary, this is a known limitation of the fluid simulator.  They discuss the low-level details and propose possible modifications to the simulator code.  In the meantime, fluid inflow objects generally should not be submerged, and (I gather) should also not be at an elevation lower than the final fluid level of something they are intending to fill (even if they are outside the vessel to be filled). Of course, this all depends on the level of accuracy of the simulation you are after.

Here's the link.

https://blenderartists.org/forum/showthread.php?410338-Fluid-Inflow-Fails-To-Fill-Simple-Tank-Depending-On-Position-In-Tank


Python Scripts with Blender, Make Human, and Sheepit I am trying to render a project through the online render farm, Sheepit, but it does not allow python scripts. My characters are made in Make Human. I then import it into blender using MHX2. The characters I create in MakeHuman use python scripts. Is there any way to convert the file to make it not need python scripts? This way I can use the online render farm again.

UPDATE:
I have figured out a way to use a MakeHuman model with SheepIt without any issues. Here is a link to my GitHub, where you can find code for the python console and instructions on how to use it: https://github.com/Brody-Adelman/MHX2-Python-Fix

If the scripts are used to rig the characters - try to bake it. If you want to render physics simulation you have to bake the simulation into keyframes to use the render farm...


Material choice does not update render view It seems that switching from one material to another in Object mode is not updating the real-time render view or the full "Render" output window with the newly chosen material - instead, only one material in my list is still being used.

In attached screenshots "peep blue 01" is the initial selection and render output - it's a light blue material.

When going to the Materials tab and choosing "peep blue 02" I see the correct Preview for that darker and more glossy material, but the change is not reflected in either the real-time render view or when I run a full Render in a new output window for that object.  It did show correctly in renders when I first created the material, but switching back is not taking effect.

I figure this is something simple, but this amateur Blender user is kind of stumped.  Advice welcome!

Answering my own question, because I happened upon it in another post:

How can I swap Textures and Materials

To change the active material assignment, I noticed a couple options:

Option 1:

Go into Edit mode for the object
Choose your desired material from the Materials list
Click on the "Assign" button to apply that material to your object

Option 2:

Go into Object or Edit mode for the object
Click the black down-arrow to the right of the Materials list, a menu opens below
Choose "Assign Material" -> {name of desired material} and it will apply that material to your object

Somehow in my "beginners" reading and tutorials, I missed this detail.  Leaving this answer here in case it's useful for others.


Can I map a vector image on a mesh? I often run into a situation where I create Image Maps in Illustrator, export them as PNG, and when I apply them into my mesh and zoom in, pixelation from the PNG appears. This annoys me a lot in 3D and games (see this model imported from a Wii U game, which gets pixelated as soon as you zoom in)

Wouldn't it make more sense to be able to import an image map as a vector format, since Blender accepts (in some instances) SVG files?

I haven't been able to do this...

EDIT: There are a lot of great answers which are also very tedious and can't really be incorporated in a regular workflow. The question was more about mapping SVG like this one on a cup object like this one to show a client an idea quickly, etc.

The requested feature doesn't natively exist within Blender, hence recreating the behaviour is very complex and tedious.

Download the accompanying blend file with various node setups.

Creating shapes with material nodes

If a shape can be recreated with mathematical functions (plotted shapes) it can be created with cycles math nodes.

Let's create a procedural rounded rectangle group. (If you know Blender and math, skip to step 3.)

On a large plane, add a material with an Object Texture Coordinate input.

We're going to focus on the X, Y positive area (marked blue) first.
Let's by defining the bounds for the rectangle, separate the XYZ channels and add two greather than nodes for X an. Add them together clamped.

The black is the interiour of the rectangle in the XY positive area. Make sure your object's scale is applied as we're using local coordinates. Strangely enough, we don't need these nodes, discard them!
Create a circular shape using the unit circle functions.
In our case it is simple: radius^2 = x^2 + y^2
This means, that for every point inside the circle, the following is true: `sqrt(x^2 + y^2) < radius.
In nodes, add a Power node for each x and y, then an add node to add them together, then another Power node for the square root. Finally a greather than to determine if the point is outside of the circle (= if the radius is to great).

The 2nd power node with a value of 0.5 is missing in the image.
Don't forget, the effect of the nodes is seen in material view and rendered view only.
Offset the X and Y coordinate by rectangle-"radius" minus rounded corner radius.

Regardless of the value of the CornerRadius, the circles bounds are clamped to the RectangleSize bounds.
Clamp the values left and below of the circle respective X and Y diameter.

These are the desired areas. To get the red area we multiply x < rectangleRadius - circleRadius with `y < rectangle radius, and for the blue area switch the inputs. Then add both results together.

This is the node graph, after multiplying this rectangle restriction onto the circle, a neatly rounded corner.

To make the rounded corner XY symmetrical, add an abs node each to the X and Y outputs form the separate RGB node.

Before the abs node, add a subtract node, to be able to shift the x and y coordinates.

Make the end result influence a color mix node.

Make it a group with an input for inputColor, Vector Coordinates, offsetX, offsetY, Size and CornerSize.

Nodegraph before grouping
But wait, add support for a different height and width. Figure it out yourself or download the blend.

Go wild, this is rather slow.

Creating shapes based on functions with nodes

Let's recreate this easter egg.

The first function will be converted as we did with the first example. I will interpret
(x-10)^2 / 300 + y^2 / 600 = 1
as

I added some arbitrary sine functions.

Creating a shape with OSL

The open shading language enable us to use a custom script node. Knowlegde of C and Python is required for the following part. (Since I don't really know any C or Python, the code samples are messy.)

You might want to head to BlenderSushi and complete their OSL series.

We'll create a stop sign polygon octagon.

I'll hard code some coordinates. Store the points in a string and convert them to a c style array with this python snippet. I just manually copied and pasted the coordinates separated by spaces and commas and the manually copied and pasted the generated code. Execute the snippet in any python interpreter.

pts = "-1,2 1,2 2,1 2,-1 1,-2 -1,-2 -2,-1 -2,1"
pts = [[float(n) for n in m.split(",")] for m in pts.split(" ")]
pts.append(pts[0])

pt_array = "point pts[" + str(len(pts)) + "] = {"
for pt in pts:
    pt_array += " point(" + str(pt[0]) + ", " + str(pt[1]) + ", 0),"
pt_array = pt_array[:-1] + "};"

print(pt_array)

This generates the following output.

point pts[9] = { point(-1.0, 2.0, 0), point(1.0, 2.0, 0), point(2.0, 1.0, 0), point(2.0, -1.0, 0), point(1.0, -2.0, 0), point(-1.0, -2.0, 0), point(-2.0, -1.0, 0), point(-2.0, 1.0, 0), point(-1.0, 2.0, 0)};

In Blender, create a new text block and start off with a basic osl shader

shader simpleColor(
    point Vector = P,
    output color col = color(0.0))
{
    // insert our custom point array here
}
Select the textblock in a script-node in the material nodes. Activate Open Shading Language in the Render Settings.

Now we got our polygon in our osl shader. To detect if a point lies in the polygon, we are going to implement a simple version of the Ray Casting algorithm. There are plenty of resources on point-in-polgyon topics on stackoverflow. I'll cast a ray from the y minimum and check with how many polylines it intersects. If the number is a multiple of two, the point must lie outside the polygon.
Create a simple function, which will take two points of a linear mathematical function and an x value and return the corresponding y value.

float linear_function(float x, point p1, point p2) {
    float x1 = p1[0];
    float y1 = p1[1];
    float x2 = p2[0];
    float y2 = p2[1];
    if (x1 == x2)
        return 0.0;

    float m = ((y2 - y1) / (x2 - x1));
    float n = y1 - m * x1;

    return (m*x+n);
}

7. Now, we'll add another function to detect if a point lies above a polyline. First we'll check if the x coordinate is inbetween the two points of the line, then we'll compare the y value of the function between the two lines with the y value of our point.

int hit(point p, point p1, point p2) {
    float x = p[0];
    if (p1[0] == p2[0])
        return 0;
    if (p1[0] < p2[0])
        if (p1[0] > x || p2[0] < x)
            return 0;
    if (p1[0] > p2[0])
        if (p1[0] < x || p2[0] > x)
            return 0;

    if (linear_function(x, p1, p2) > p[1])
        return 1;
    return 0;
}

With these two functions added, the shader can be tested with 2 points. Note, that osl shaders are only visible in rendered preview mode.

We can also use our stop sign coordinates.

Notes on svgs

With these tools you are equipped to start writing your svg plugin. The hit function has to be implemented for curveto, smooth curveto, quadratic Bézier curve, smooth quadratic Bézier curveto and elliptical Arc and the python script has to convert all types of the svg path. It's actually not that hard to compute further intersections, but parsing the svg is going to be a lot of work.

The final goal is to write a python script, which parses an svg (with python's xml parser) and converts is to a osl shader script. The points and curves would be hardcoded in the shader.
Unfortunately, we have to first implement the most basic collision detection for beziers (see the previous link), because most svgs will use them, and possibly for all other svg elements (see the previous2 link).


Apply Transform and Rest Pose Not Working After Restart Blender I've been working on a character model, and all seems well during a single session. However, after exiting and restarting blender, my model is scaled several thousand times larger than it was when I saved it, and the pose always defaults to this strange pose:

When it is supposed to look like this:

I can still use "ALT+G" AND "ALT+R" in pose mode to fix the pose issue, but "ALT+S" does not fix the scale issue. And in object mode, when I try to scale the model and armature back to the original size, the changes are not saved the next time I re-open blender (the pose reverts to the undesired pose as well). Even if I goto "object> apply> Location / Rotation / Scale."

Any help would be much appreciated. Thanks!

I determined the cause of the problem! I must have accidentally set a keyframe for the the armature scale and rotation! The strange part is that I never once placed the armature in that strange position, but I checked the graph editor and found keyframes on all joints. Once I deleted the keyframes everything looked good after saving and re-opening blender.


Is it normal to wait 50 min for baking a "simple" fluid animation? As said in the title, is it normal for this to take so long? In this video it takes them seconds to bake (video: https://youtu.be/xIxUZpRk4Ac?t=147), they stated that they had a GTX970 but I don't think GPUs affect bake time.
Also while I'm writing this, it says elapsed time is 20 min and time remaining 30 min.
Here are my specs:

CPU

Intel Core i7 6700K @ 4.00GHz
Skylake 14nm Technology

RAM

16,0GB Single-Channel Unknown @ 1069MHz (15-15-15-36)

Motherboard
ASUSTeK COMPUTER INC. STRIX Z270F GAMING (LGA1151)
Graphics

ROG PG278QR (2560x1440@144Hz)
4095MB NVIDIA GeForce GTX 1080 (Gigabyte)

Storage
931GB Samsung SSD 850 EVO 500GB (SATA (SSD)
465GB Samsung SSD 840 EVO 500GB (SATA (SSD))

This seems quite normal - fluid simulations are very CPU intensive to bake and the workload increases exponentially based on the simulation Resolution (eg, doubling the Resolution results in 8 times the number of 'cells' in the domain (2x2x2)).

If you look closely at the video, shortly after the guy hits 'Bake', the mouse jumps to slightly above the bake button. Most likely he paused the video midway, allowed it to complete the bake, then carried on as if it had only taken seconds - whereas, really, it likely took a similar amount of time as you are experiencing.


Is there a setting in hair particles to make flat planes face the camera? This sounds a bit weird but let me explain what I'm doing.

I'm trying to create a space scene with planets and stars, so I created a sphere to represent the darkness of space, then placed my planets inside that and used the hair particles with some spheres.

Previously I was following a tutorial but for some reason when it come to nodes, my blender absolutely hates them(trust me I tried all the tutorials and such) but back to the main point, I decided to use flat planes instead and just add a texture of stars but this is where the problem lies.

See with the hair particle effect it's random and most of the planes are showing up sideways and not facing the camera, which is causing a bit of a bother for me.

I wanted to ask if there's a way to make all of the planes in the hair emitter to face the camera?

Also due to copyright reasons, I can't upload any part of the blender file, sorry guys :(

I would consider my blender skills around the basic level so if you could include screenshots to help me, that would be a huge help :)

What you might want to do, is set your hair particle system to advanced, and enable Rotation in your particle settings, set your Particle Orientation axis(under Initial Orientation) to Normal, that should make all of the hair face up as away from the sphere's faces.

Other than that, if it still doesn't work, try enabling Rotation under your render tab, and rotating the planes until they line up with the sphere.

Note, this won't make the planes face directly toward the camera, but it should make them face the correct direction, which would give nearly the same result.


Cloth simulation staying in plane I'm working on a bathroom interior, and I was trying to shape the shower curtain by following this tutorial:
Modeling with Cloth Simulation in Blender

For some reason, after I selected the pinned verticies group, and ran the simulation, the cloth was affected by the pinned verticies, and also sagged, but all the movement was done in one plane, so there were no wrinkles.  How can I fix this?  Here is an image of one of my tests so you can see what is happening:

Here are my Physics Settings (As far as I know, they are the same as what he has, and also, I have animated shape keys so that the cloth would fold).

Here is the .blend:
https://drive.google.com/file/d/0B5Rj7h_MP4waeU5yc3ZyV0VZQlU/view?usp=sharing

The problem was that I was trying to do a cloth simulation inside a scene with several objects already inside.  Many people had the same problem in the comments on this video:

Modeling with Cloth Simulation in Blender

The trick was to do the cloth sim in a different scene and then import the mesh into the scene you want to use it in.