Issues with intersecting faces and how to unwrap a maze created from svg file I'm pretty new to this field.I have used a svg file from maze generator to create a maze. On extruding (and applying solidify modifier), I found that several faces are overlapping and intersecting with each other, which is messing up with the textures. Is there a way to fix this? Can the 2 intersecting objects be merged as 1? and how to unwrap the image?

The problem you are facing is, that the svg from maze generator is not well suited to be imported in blender. Here the problem is, that the maze is made out of lines and not of shapes. Basically you want to convert the outline of the lines into a shape. This means you have to "clean" it before you can use it.

I tried it with Inkscape (Download-page), which is free to use. But basically you can use any advanced vector-image-editor to do this, I guess.

Using Inkscape, these are the steps which lead me success:

go to Path>Object to Path (or press Shift+Ctrl+C). This will put every line into it's own object.
First select a line in the objects viewer and then press Ctrl+A to select everything else, since it does not seem to select all the lines if not one is selected in the first place. Then go to Path>Stroke to Path (or press Ctrl+Alt+C). This will convert the stroke, drawn by each line into a shape.

With everything selected go to Path>Union (or press Ctrl++). This will combine all created shapes into one.
Now you can save the svg and import it into blender
In Blender you can set the thickness of the walls by changing the "offset"-value in the curve-properties

Then select the curve and press Alt+C to convert it into a mesh
Go into Edit-Mode, select all, press delete and select "Dissolve faces". This will delete all the unneeded triangle-shaped faces.

To delete all unused point keep selected all, press delete and select "Limited Dissolve"

If you have some ugly connections between points, just select all, press Delete and select "Only Faces", then select everything again and press F to fill the faces again.

Now you can extrude your mesh and have a clean maze

I hope I could help!


Is there a way to move an object file to file? I've made a human head and a body in blender but I don't know how to combine this 2 separated objects to 1 blender file.

Any solutions?

two ways i know,

file> append on one of the blend files, I don't find this as good.
have both files open and copy one object Ctrl-C and paste it Ctrl-V in the other blend file.

Hope this helps.


Blender 2.83 Cycles Not Rendering New Objects I added some new objects and changed the HDR rotation in an existing blend file, but whenever I hit F12 or Ctrl+F12 I only seem to get a render output of the scene before my recent additions and changes.
As the attached image shows, the added items are outlined/selected and visible in all viewport versions including render view and the new HDR position shows correctly.
Some objects are newly created within this file, some are duplicates (not instances) of objects in this file, and others are copied/pasted from other blend files. They are all scattered within several existing collections and render layers that have previously rendered correctly.

All the visibility and render options are correctly set in the outliner.

Composite node is set up correctly.

I've saved/closed/reopened blender and the blend file.

I've gone through the checklist of all likely causes for objects not showing
Why does my object not show up?

Although I am not a newbie to blender, I have just switched from 2.79 to 2.83 so I'm not sure if there is something new I haven't learnt yet but it seems like this is rendering a cached version of the scene or something and not what is currently there.

From a similar question on SE I found the solution. The VSE has a previous image that is over riding the render result....
Why is my image sequence render using an old version of my animation?
I solved my problem by unchecking "sequencer" in the "post processing" tab.
Alternatively I could remove the existing images in the VSE


Incompatible operator return type in simple empty adding operator I have a simple script:

import bpy
from bpy.types import Panel,Operator

class MarkerAdd(Operator):
    bl_idname = 'marker.add'
    bl_label = 'Add Marker'
    def execute(self,context):
        bpy.ops.object.empty_add(type='PLAIN_AXES',radius=0.5,location=context.scene.cursor_location)
        return '{FINISHED}'

class AddObject(bpy.types.Panel):
    bl_label = "Add Object"
    bl_idname = "add_object"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"
    def draw(self, context):
        layout = self.layout
        scn = context.scene
        row = layout.row()
        row.operator('marker.add')

def register():
    bpy.utils.register_class(AddObject)
    bpy.utils.register_class(MarkerAdd)
def unregister():
    bpy.utils.unregister_class(AddObject)
    bpy.utils.unregister_class(MarkerAdd)

if __name__ == "__main__":
    register()

Which seems to work, but after pressing the button, a huge error appears:

RuntimeError: class MARKER_OT_add, function execute: incompatible return value , str(, Function.result expected a set, not a NoneType)

which I have no idea why. Is the execute function from MarkerAdd operator supposed to have a different result type? It does not matter whether I put there '{FINISHED}' or not.

OK, I realized that I made a typo/mistake. In the MarkerAdd operator, in the function execute I've put

def execute(self, context):
    (....)
    return '{FINISHED}'

which is a string, while it should be a Set:

def execute(self, context):
    (....)
    return {'FINISHED'}

Notice apostrophes. That simple mistake caused me to get lost in and I waste hours trying to understand what's wrong. I hope somebody could avoid similar mistake.


Keeping Texture Mode Appearance While Exporting to Unity I am attempting to export my Blender model to Unity but I'm having trouble retaining the view while in texture mode. The issue is that I actually haven't added a texture layer to the model (at least that I can tell), but it still looks much different when I switch modes.

Does anyone have any ideas on why my model would look different in texture mode (as opposed to solid or material mode) and what I could do to retain that appearance when exporting to Unity?

I've attached some screenshots to see the differences below:

Solid mode:

Material mode:

Texture mode:

To make your model while rendered have that bright red color you see in Texture shading 3D view mode you can setup it in 2 ways:

Make the material shadeless:

The result:

However, it's not good approach as it's much less flexible; you will loose possibility of the material to have shadows and thus it may not suit your needs.
You can setup a texture for your material.

With that material selected ("red full.001" in your case) go to Texture tab and create new one. Select it's type Blend and check Ramp option in  Colors scroll. Delete one of the color stops, select another and copy the color from your material setup to this color stop (it may be easier to use Hex triplet for that):

Note: the texture should be checked to influence on the material (near its name in the list); I forgot to check it back when I made screenshots

The resulting material is bright, at the same time receiving shadows:

I also checked Color checkbox in Specular options in the Influence scroll (so the texture to influence on the specularity, instead of material; to return material specularity color uncheck that).


VSE: How to set a custom Proxy percentage size; for example 10% Is there an option to set custom % on Proxy sizes?

No, you can only choose between 25, 50, 75 and 100%.

It's hard coded as you can see when you try to autocomplete the following in a python console:

>>> bpy.ops.sequencer.enable_proxies(
enable_proxies()
bpy.ops.sequencer.enable_proxies(proxy_25=False, proxy_50=False, proxy_75=False, proxy_100=False, override=False)


One image for all objects I created a wall with over 100 bricks. I want a logo on the wall. So some bricks will need a part of the logo. What's the fastest way?

You can get there with UV projection.

Select all bricks and switch to Edit Mode
Get in front view (View > Viewpoint > Front)
Select all vertices and go UV > Project from view
Rearrange your UV map

Useful hack:
• Use a BW logo with black background
• Set the image to clip (so it doesn't repeat)
• Use MixRGB node to control the colors inside Blender


Reparent object with transformations of new parent To begin, I had an empty as a parent of a bunch of objects (think books with many children). I wanted to duplicate this as a set so I followed the following instructions:

Select Parent.
Shift+G, Children.
Shift select parent (by default it will be deselected when the children get selected).
Alt+D to duplicate.

However, after duplicating many times, and translating and rotating the empties (think duplicating and positioning books on a bookcase), I realized that one of the children was hidden so it did not get duplicated.

So I'm looking for a good way to duplicate this child and reparent this to a new empty, applying the new transformations. As far as I know, there is no way to transform an object by parenting it. Whatever advice I am given here will not only help me fix my problem, but allow me to make use of this technique for new projects.

The best solution I have found thus far:

Select the child and its parent.
Press Alt+D to duplicate linked.
Manually copy the transform, rotation, and scale from the destination empty to the new empty.
Select the new child.
Press Alt+P > Clear [Parent] and Keep Transformation
Parent it to the destination empty.
Delete the duplicated empty.


How do I crop everything in Video Editor? I have made a video composed of several videos with transitions etc, but they all have a 80px black strip on the top and bottom, and I'd like to remove it (so that the video's height is 160px less). How do I crop the video?

You can group your clips in to a meta strip by selecting them and hitting Ctrl G. If you want to edit the clips inside it after grouping them, select your meta strip and hit Tab.

You can now apply an Image Crop to the meta strip in the properties panel (N). Be sure to check Image Offset. You will also need to change the render dimensions to the correct size.

Screenshot:

You can avoid the need to crop in the video sequence editor entirely by performing the crop in the render dimensions. Simply set the dimensions to the target aspect ratio for you image.


How to make an object appear to be buried in sand? My first thought was to use a fluid simulation, but that would act too much like liquid and too little like sand, unless there's some way to configure it differently.

Ideally, I want it to look like the object was dropped in the sand a long time ago, and wind has slowly buried it.

A result like this can be obtained using the particle system (without physics) and vertex weighting in cycles.

Steps

Create a sand surface object and a watch object. You can partially cover the watch in sand. Adding modifiers to the sand to displace with a rough texture can simplify creating this surface. If you render them, you should get something like this:

Add an icosphere to act as a grain of sand. Move it out of the camera view. Add a shader to the grain of sand which changes colors and transparency depending on the particle number. The idea is to use the particle number to set the color and transparency of each sand grain, so the result is varied. The shader is shown below:

Add a particle system to the sand surface. Set physics to 'No'. Set all particles to emit at time 1. The example image was generated with about 250K particles. Since physics isn't used, this runs reasonably fast.

If this is rendered, the results should look something like this, looking like it was dropped on the sand.

To partially cover the watch with sand, use vertex weights. This requires going into 'weight paint' and using the brush to indicate where you want the sand grains to overlay the watch. For the image above, this weight painting was used. The red color indicates where sand grains will be dense and deep blue indicates where the sand will be absent.

Set up the sand particle system on the watch. However, to control where the grains go, use the vertext groups and specify the 'group' vertext group. This will refer to the vertext weights generated in step 4.

Render the image! Since no physics simulation is required, the rendering should occur relatively fast. On a 2 core, 1.5 GHz machine, 4Gb ram, with >250K sand particles, the image rendered in less than a minute.

Download the blend file here:


Blender scripts not showing in Blender Started using Blender yesterday (Blender 2.8 on windows 10 system) and created two small blender scripts.

Today I opened blender and the texteditor and I wanted to open a previously made blender script but the list is empty. As you can see from the photos, I have two scripts in the folder but even with that directory open in blender it doesn't see the scripts.

I have checked all types to be viewable.

What am I missing?

The file needs to have the proper file extension. Files without the proper file extension gets filtered out in the dialog.

Or you need to turn off the file filter. This can be done up right in the filter settings. The better way is to name the scripts proper though, with its correct file extension. Python scripts ends with *.py


Color differences driving me mad? So I've been struggling with color discrepancies between Blender and other softwares, or just Windows.
When I export my render as a .png file and view it within Windows, the colors appear desaturated or oversaturated even though my image is in the sRGB color profile and so is my monitor (LG 27GL850).
I'm struggling to understand which one is showing me the truth, and which one isn't.
When testing via Instagram, the preview image will be oversaturated, but as soon as I get to the filter page, it's desaturated. Pretty confusing.
Has anyone found a fix for this ?
Thank you very much.

I would suggest disabling color-management all together to see if that solves the issue.
This can be done by going to Render Properties > Color Management > Display Device -> None


Glare Effect Transperancy Problem when I use the glare-effect with a background it works perfectly, but when the background is transparent the glare-effect doesnt overlap the objece, meaning it doesnt show on the transparent background.The glare streaks shoud go beyond the space of the object, but doesnt.

There is nothing wrong with your file. Blender's viewer is broken, and has been broken for many years.

It cannot display pixels that are luminous and transparent (it cannot do proper Associated alpha). Switch to Color (RGB) view instead of color and Alpha. You should be able to see the halos and blurs.

As an alternative composite over a black background.

Beware that if you try to save the image as png with alpha you will get no halos or blurs, as the format doesn't support associated alpha either.

More details on these links:

Glow effect invisible on transparent background

How do I get the Glare node to output transparent instead of Black background

Render semi-transparent volume with cycles


How can I keep the text resolution and sharp but resize the rectangle? This is in the rendering mode I want to cut from both top and bottom and maybe some from the sides the black rectangle background :

This is how it looks like in the layout :

When I mean to cut from the top bottom and sides I mean something like that. I did it in pain just to show what I mean but I want it in the blender so the animation when doing later CTRL + F12 to be in that rectangle size and not like in the first screenshot :

When I'm doing CTRL + F12 to render the animation it's creating on the hard disk 100 frames that's 100 png images this is the output properties settings :

And this is example of image on the hard disk how it is now before making the cutting :

Tried changing resolution :

But this is when I changed the mode to Rendering it looks like as before like there are no changes at all :

And this is one of the images on the hard disk after did CTRL + F12 after changed the resolution on Y to 260 :

You change that in the "Context", which is the printer-like symbol:

It has Resolution X and Y properties that will affect the cameras:


How to properly smooth edge What is a proper way to make edge (marked with marker) seamless in a situation below. I can't bevel it, also bevel modifier does nothing. Tried cutting it and bridging it back together. Removed doubles, recalculated normals... Running out of ideas... I could theoretically make one big face, but once converted to triangles in game engine it looks broken.

EDIT: So as requested more informations. I am modeling a 3d model of a glider plane. I need to create a seamless transition of object 2 on object 1(Old pictures were cutout of that section). Basicly i must smooth out edge marked with yellow color (all around the profile) so it would be like one part with fuselage. One the picture below is a look from a real plane i am trying to achieve.

File:

So as your demand has changed, here is a proposition for your plane wing, tell me if it's ok:


Get pose from bones that get motion from parent objects I have various rigs with bones following physics items using the Child Of constraint with Set inverse (although this issue isn't really specific to that constraint, but to any issue where bones follow objects in any sort of way.) What I want to do is run my simulation, which puts my rig into a certain pose, then save this position as a pose that I can later restore without running physics.

However, I cannot do this, as bones that inherit rotation or location from parent objects do not show any rot or loc changes, so there is nothing to save. But there must be some way to get the current positions and convert them to a pose?

You need to Bake the pose into an Action using visual keying:

Pose > Animation > Bake Action
You can bake 1 frame by setting the start and end to the same frame
Set Visual Keying ON
Set Clear Constraints ON
Set Clear Parents ON
Bake Data to Pose

Now you should have an action with desired pose keyed.

You can load this action into Pose library (make it suitable for pose library with help ring icon)


In Blender 2.82a what is the shortcut to get out of loop cut state? I am stuck with the loop cut tool enforcing me to click and by not vanishing when I use Esc key.
Could someone tell me what the shortcut is come out of this state.

To get out of loop cut mode, one can simply click on the select box in the left toolbar.


How to convert from Magicavoxel to Blender to Unity, without losing the texture/colors I'm trying to make an animated model, and I make the model in magicavoxel, then animate it in blender, then put it in my unity game, but when I put it in my unity game, it shows only white, that's it. Help? Any file type is ok, except obj. I have been looking for the answer all day btw, so I've done research on it, but none of the solutions work.

If just import the OBJ file(exported from MagicaVoxel) into Blender, animated it and want to sent it to Unity with textures I think this will help you:

On Blender

Export the model as FBX

On Unity

Import the FBX
Import the voxel PNG(palete) file into Unity as a texture
Drag the FBX file to the Scene
Create a new Material
Associate the new material to the model on Scene
Drag the PNG(palete) image to the ALBEDO field of the material

Another solution would be this: If you export an OBJ from MagicaVoxel and want to send it to Unity with the textures/colors you have to send to Unity all the 3 files MagicaVoxel generates when you export an OBJ file (.obj, .png, .mtl)

On the file explorer you have to select all these 3 files and drag-and-drop them all at once into a unity folder inside the Asset folder (need to drag from file explorer and drop into Unity software interface). This way Unity will receive the 3D Object model, the texture and the info about how the texture will be used into the 3D model.

Well, about that and a lot more you will find on this MagicaVoxel/Blender/Unity course: Modelagem 3D com MagicaVoxel para criação de games em Unity


Is it possible to inverse selection in Object mode? I imported a 3D apartment model from an Archicad .3ds file.

Scale and coordinates were all messed up and I solved this by resetting location, scale, rotation and origin. Now the model seems fine except that when I press "zoom to all" it zooms out so much that the screen is empty. I figure that there must be something left to original imported scale (0.000001) that is causing this. To find it I planned to select everything visible on my scene and invert selection. Just can't seem to find the function. (The scene has over 250 objects.)


Enable shadow catcher for layers In cycles we put enable shadow catcher for a geometry. Is there a possibility to enable the shadow catcher for the entire layer which has 50 components.

There's a weird setup which can make it work. We stumbled across that by accident here in the studio and initially wanted to report it as a bug, but it came in useful at times.
How the weirdo thing has to be set up
The thing is that when you put a plane between the camera, assign a transparent shader to it, and enable the Shadow Catcher option at the same time, any ray that passes through that plane seems to be altered somehow, resulting in the stuff behind the plane to be treated as a shadow catcher object. In this screenshot, I have put a small rectangle in front of the camera. Where it covers the scene behind it, objects become shadow catchers, in all other areas they remain unchanged:

The shader on the plane is really simple:

You can mix it with a diffuse shader if you want. The Mix Factor will then act as a strength slider. This way you can control the strength of the shadows!
Now, put that plane on the render layer where you need the override. Scale it so it covers the entire camera view area. If you have animated the camera, also parent the plane to the camera:

You can set the Max Display mode of the plane to Wire, so you can see through while working in the viewport.
This is how that layer looks rendered:

And here is that very .blend file to play with:


Change layer of multiple objects For some reason the cell fracture addon put all the shards (about 50 of them) to be on all the layers, instead of keeping them on the first layer. I use these layers for other things, so leaving them isn't an option. How do I set all of the shards to be in the first layer, without having to do all of them by hand?

Select them all. Without knowing the layout of your scene, it's hard to say what the best way to do this is.

Manual:

Try pressing ` (the key below Esc, at least on qwerty keyboards) to set all layers visible. Then use Border select (B) or circle select (C) in wireframe mode to select all the shards (you may also want to try hiding (H) any other objects which are in the way, or just deselect them afterwards)
Automated:

If the shards have anything in common, you could try using Select similar (ShiftG). For example, this can be used to select them if they are all part of the same group (rigid bodies are automatically part of a group called rigid body world, so that might help if they are rigid bodies).
Or Select Linked (ShiftL). This will select objects sharing a datablock such as a material or a texture (so you could use this if the shards all have the same texture).

Note that ShiftL and ShiftG only select visible objects, so you may want to set all layers visible first (`).

Press M and click the layer which you want the shards to be on (you can use ShiftLMB to select multiple layers).


pose bone drivers through python Background: I am trying to do a animation of the deformation of a thin sheet, that has its motion at each point that is modeled as a sin wave (something like z = A*sin(freq*t + phi), where A and phi are the amplitude and phase offset of each point, and t is time.  Much like water wave simulation, but I do need to be able to set each point amplitude and phase precisely.  I modelled the surface as your standard grid, but with two planes so it is a sheet.  I then added an armature with a bone for each point ( I tried shapekeys, but bones seemed to be easier), and also added a driver for each pose bone. I can access the drivers through Python with code like the following

obj = bpy.data.objects['Armature']   # the armature my model is
drivers = obj.animation_data.drivers
for d in drivers:
    d.driver.expression = "%f *sin(frame / %f + %f)" % (amp, frame_div, phi)

However, then problem I have no idea which driver applies to which pose bone. The driver data structure seems to give no indication which bone it is driving.  I assumed the order in which I added the drivers is the same as the order of the bones, and this cam close but some seemed off.

So, the basic problem is, how do you know which driver applies to which pose bone, in Python?

Alternatively, is there a better way to do what I am trying to accomplish, without using bones/drivers?

You might try this:

import bpy

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

#get pose_bone
pb = obj.pose.bones['Bone']
#add drivers
driver_loc = pb.driver_add('location')
driver_rot = pb.driver_add('rotation_quaternion')

#search for a driver
for d in obj.animation_data.drivers:
    if d.data_path.startswith('pose.bones'):
        id = d.data_path.split('"')[1]
        prop = d.data_path.rsplit('.', 1)[1]
        if id == pb.name and prop == 'location':
            break
else:
   d = None

if d:
    #... settings
    d.driver.expression = your_expr


How to cast/teleport a ray in a material for a squinching illusion? In short I'm wondering if there's a way to not only refract a ray, but also moving it, or somehow cast another ray from a different position in a material shader for an illusion I'm working on.
This situation is pretty complex but I'll do my best to explain what I'm doing.
I'm working on methods to implement squinching, a way to trick the viewer into thinking that a curved (projection) screen, isn't a screen, but extends into a larger 3D world (Like with the Trompe L'oeil illusion).
You can read more about what squinching exactly is in this expired patent: https://patents.google.com/patent/US6462769B1/en
I already got most of it working. I set up a simple shader for the screen, that refracts the light in the opposite direction from the viewer's position (the audience position)

The current result is already working really well, however one situation isn't covered yet.

The render camera (Marked with a P) shoots a ray (blue line), once it hits the screen it refracts in the right direction to show the squinched perspective, which will look normal from the other audience position (The other camera in the image).
However I need to somehow make the green line part of the blue ray so that I can project anything that is in front of the screen, onto the screen itself, the same way anything behind it is shown.

In this image I mixed the refraction with a glossy shader to create a representation of what I'm hoping to achieve, a pretty much need that glossy shader's ray in the opposite direction

I'm using cycles
In the end I need to be able to export a flat image from the curved screen (e.g. by baking), so ideally I'd be able to handle this with a material
In addition to baking, I also need the option to render the screen from the position of a projector (In the example image marked "P")
In this example the screen is curved, but it may have any shape, so a distorted camera frustrum isn't an option.

What I've done so far:

Tried looking for a way to somehow "teleport" the ray back. But it looks like I can only influence its direction.
In the past I've succesfully done this with multiple render passes, where I first render the scene from the position of the audience, and then project it onto the screen, to then capture that from whatever angle I need. This technique however loses a lot of quality as some parts end up being more stretched then others.
Looked into making a custom node using OSL, however the "ray" function doesn't seem to be able to sampling colors.

My thinking is that I should somehow be able send a ray from the audience camera in the direction of the hit position once the camera "P"s ray hits the material, and use the color from that ray to use on the material. But I've been unable to find a way to do something like that.
Any help would be greatly appreciated!

In the past I've succesfully done this with multiple render passes, where I first render the scene from the position of the audience, and then project it onto the screen, to then capture that from whatever angle I need.

This technique seems to be the most viable to me. If you want to project what the audience is seeing onto the surface, this approach does exactly that - and the simplest solution is often the best.

This technique however loses a lot of quality as some parts end up being more stretched then others.

You can increase the resolution until it satisfies your needs. Yes, you might "waste" some pixels, but that doesn't seem like a critical issue.

A way to somehow "teleport" the ray back. But it looks like I can only influence its direction.

Yeah, I don't think Cycles is designed for custom ray transformations such as the one you describe. This is likely not a common use case, and there is a flexibility-performance trade-off when designing renderers.
Edit: alternative suggestion
Since you have already gotten the projection to work for objects behind the "screen", I can suggest scaling the screen down towards the audience - so that everything, including the cube, is behind the screen. Then you would also need to adjust the camera, and the projection would appear as you intend.

If you need to render the rest of the scene as well, you could combine that render with the rest of the scene during compositing.


Mesh/Shading Issue in Blender 2.8 I'm not too sure what is going on here to be honest.

I had seperated the part of the mesh where the cockpit windows are, but when I joined it back up together, It shows me a weird shading that I can't get rid off.

I've tried removing doubles, and recalculating normals.

Any suggestions?

Look forward to hearing,

Karl.

First you have faces that don't stick together, you can fix this with an altM > Merge By Distance, and play with the distance parameter in the last operation box (bottom left of the 3D view).

You'll still have artefacts where the triangles are very stretched, you should better use quads, but if you are lazy you can cut your triangles with additional edge loops (use the knife tool) and it will improve the shading.


(Video Included) Addon Wont Activate after Installation I'm trying to enable an addon from a basic python template I saved, but it wont let me check the box to activate it. Here's what the problem looks like:
https://www.youtube.com/watch?v=tGFOwwfikAA&feature=youtu.be

Is there any reason it's not letting me do this?
Thank you very much for your time!

import bpy

def main(context):
    for ob in context.scene.objects:
        print(ob)

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

bpy.ops.transform.translate(value=(0, 2.20362, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()

You have put your operational code in as part of the Class SimpleOperator.

This means that when the register creates the Class your code is run, which is the wrong time and has no context.

Take the bpy.ops.transform.translate code and move it out of the Class definition and move it into the main function e.g.

def main(context):
    for ob in context.scene.objects:
        print(ob)
    bpy.ops.transform.translate(value=(0, 2.20362, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

Now when you run the test call

bpy.ops.object.simple_operator()

It will print out all the Object names and then try and Translate the currently selected Object


Adjusting a texture's color temperature I'm fairly new to Blender. I have a HDRI background and I wonder if it's possible to adjust the texture's color temperature using a blackbody node.

Thanks in advance.

Multiplying the color of the HDRi with the blackbody color seems to do what you want. I don't know if it's physically accurate however.

Multiply node is added by adding a Color > MixRGB node and changing the operator to Multiply


How to import obj and convert and export as fbx from command line in Python I would like to import an obj file and export it as an fbx file without having to use the Blender GUI.
The command: blender --background --python myscript.py
Is not working for me from Terminal on mac. My first real problem is I'd like to be able to do anything (even open blender using .exe) using Terminal. I've tried including the path to the Blender app but nothing seems to be working and I am just given the error "blender is not a command"

The link @HikariTw should give you an answer; for example on my system the path to Blender is /Applications/Blender.app/Contents/MacOS/Blender.  The error you're getting is because the Blender binary isn't in your path.
As for importing/exporting; your script should be pretty simple, just remove the default cube, call bpy.ops.import_mesh.stl to import and bpy.ops.export_scene.fbx to export.


why is part of my mesh clear in solid view port even though in the render view it is white diffuse? how do i make the clear part opaque again?

i pressed alt h in edit mode and that fixed it


selecting and moving lamp using right mouse button I just registered in the forum and am asking my first question. I am new to Blender and 3d animation. A reference work I am using to learn Blender states that the lamp can be selected and moved by hovering the cursor over the lamp and clicking and holding the lamp with the right mouse button. When I first tried it the click kept producing a contextual menu but suddenly a RMB click did allow me to move and adjust lamp. I don't know what I did because I cannot now replicate it: a RMB click just produces a contextual menu. I am running Windows 10. Thanks for your replies.
Monty

The selection behavior in the user interface has changed significantly between versions 2.79 and 2.80 of Blender (as well as many other changes to the user interface).
Use the Help/Tutorials menu option within Blender to like to official online tutorials
and resources that will be suitable for the appropriate version of Blender.


How do you export an ambient occlusion map to an FBX file? I want to send a model to someone who needs it in FBX format, but it has an AO map. Every tutorial I’ve been able to find says that you need to connect your BSDF shader to an overlay node with your albedo image and the AO map. However, FBX doesn’t allow overlay nodes and just deletes both of your maps if you try to export with it.
Is there any way within Blender to associate an AO map with an FBX file on export (so that the FBX file has a path to the AO file, the same as it does for the albedo/metallic/roughness/normal maps)?

.fbx doesn't include textures. You can save the AO map as a separate image file and have the other person apply it to the mesh once they import the .fbx into whatever app they are using.


How can I set the Lamp type using Python scripting? I am trying to set the Lamp type using Python scripting. I've got the Lamp object:

Lamp = bpy.data.objects["Lamp"]

But Lamp.type seems read-only. How can I set it without creating a new lamp?

Confusion between object and its data

Blender has many object types, 'LAMP' is one of them. It is set by the data type on creation and is read only.

>>> D.objects['Lamp']
bpy.data.objects['Lamp']

>>> D.objects['Lamp'].type
'LAMP'

>>> D.objects['Lamp'].type = 'LAMP'
Traceback (most recent call last):
  File "/usr/lib/python3.6/code.py", line 91, in runcode
    exec(code, self.locals)
  File "<blender_console>", line 1, in <module>
AttributeError: bpy_struct: attribute "type" from "Object" is read-only

A 'LAMP' type object (bpy.data.objects) has a lamp (bpy.data.lamps) object as its data. Just like a 'MESH' object has a mesh (bpy.data.meshes)  The type of lamp can be set on the data part.

>>> D.objects['Lamp'].data
bpy.data.lamps['Lamp']

>>> lamp = D.objects['Lamp'].data
>>> lamp.type
'SPOT'

>>> lamp.type = 'HEMI'
>>> lamp.type
'HEMI'


How do you make a armature and connect it to a mesh? I am making a spider and can’t find any YouTube videos on armatures. How do you connect an armature to the spider so I can animate it?

If you have an armature ready to go, then in Object mode, select the mesh and then shift select the armature. Then press Cmd+P/Ctrl+P and parent it with automatic weights.
Now you can select the armature and move the individual bones in Pose mode and the mesh should move with it. If certain bones have too much/too little influence on the mesh, you can alter it by selecting the mesh, going to Weight Paint mode, and select the bone that you want to edit in the Object Data Properties tab under Vertex Groups.
It might also be useful to apply some inverse kinematics to your armature to make animation easier and more realistic. Blender has a good video tutorial on how to do that here and this one is also useful.
As mentioned previously, this YouTube playlist is a really helpful resource that walks through almost every aspect of adding and editing armatures.


Mesh is deformed when exported to Unity I exported my finished model + animations to Unity, but some parts of the model ended up being a bit deformed. I tried to redo the UV map and normalize the normals, but none of them worked. I'm stumped.

*How it looks like in Unity

*How it looks like in Blender

Check “Selected Objects”>> At the right bottom, open the “Armature” settings and check “Only Deform Bones”, uncheck “Add Leaf Bones”>> At the right top shift-select “Armature” and “Mesh”


Why my blender animation broken after exoprt fbx? in blender the animation

in fbx reviewer the animation

the animation is baked and remove all constraints. but I got wrong result when export fbx.
is blender bug?
My engish is not well. I hope you can understand it. thanks.

First of all, I'm no expert in Blender at all, but I animated a bit recently and had a similar issue with broken animations when exporting an animated armature.
In particular, the jaw bone of the character jittered around whenever the character moved his head (the jaw bone was an unconnected child of the head bone).
In the end, I found no way of preventing this from happening, until I added a new bone connecting the jaw to the head, so the jaw bone is now a connected child of the new bone and the new bone is a connected child of the head bone.
So connecting the problematic bone(s) to the rest of the mesh seems to fix it and as far as I know, additional bones shouldn't be an issue when set to not-deforming.
I can only explain the initial issue with a bug or something, but I am not sure...
I just hope that this fixes your issue, too.


How to Have two copies of an Object I am new to Blender. I want to make Minecraft animations. I have been taking a 5-episode tutorial on how to do that by BlackPlasmaStudios.

I am using their custom-made easy-to-use MineCraft character model, but I can't figure out how to have two of them in the scene. When I have two, I can't delete the second one, I can't move it, and I can't switch modes with it. And when I have it selected, it has no X-Y-Z axis to move it, and the outline is blue.

I cannot figure it out. Also, when I go to delete it, it just says, Cannot Delete. Indirectly used objects need at least one user.

It is disabled rendering for itself, selecting for itself, and viewing for itself. I just can't figure it out.
Tell me if you need a screenshot of it.

I figured it out. What the problem was is that I didn't move the 1st object above the surface of the scene before appending the other. But thanks for the help anyway.


Export .obj in 3ds Max and render in Blender Cycles Wondering if it is possible to export .obj with texture in 3ds Max and render the .obj (with all texture attached) in Blender Cycles? Or I need to do all the unwrap and texturing again in Blender?

Thank you.

.obj files do not contain textures, but they do preserve UVs. In other words, you will not have to re-unwrap the whole thing, but you will need a copy of any textures when importing into blender.


How do I make an animation from a curve? I have a set of tank tracks that rotate around a curve constantly. This works very well, and it is precisely what I am looking for in terms of movement, however I cannot seem to make this into an animation. I have searched for dozens of hours to find a solution but I am just at a loss on what to do. I have uploaded my blend file here.

I cannot export this file to other software and use this animation, since technically without the blender curve modifier, the only thing that is happening is that the Y transform is being moved by - 1 over the course of one second. Is there a way to convert this curve into an actual animation?

Select your object and Export as .MDD - you might have to enable it under preferences. Apply the Curve Modifier to your object.

In a new file append your object and remove any animation curves from the Graph Editor. With the object selected Import the .MDD file - you will see per frame that curves have been added to the graph editor. You might have to move the frames to correspond to the peaks of the action. In my example I just started before the first frame and stopped before the last...

Update: While the above method does work, there is also Alembic .abc export which you might try. Export the number of frames you want - when you import the .abc file in a new Blender you will see the animation is baked in. There are no key frames in this export.


How can I make Blender to exit with the same exit code as the python expression? I am running a python expression through blender from the commandline. I want to know if the python expression is executed correctly or not. But Blender always exits with a 0 code. Is there any way to make it exit with the same code as the python expression?

For example I would expect the following command exit with a non-zero code:

"\Program Files\blender foundation\blender\blender.exe" --background --python-expr "2/0"

You will have to put the expr in try and explicitly exit with an error code on exception.

E.g. following exits with exit code 10 (user defined):

"\Program Files\blender foundation\blender\blender.exe" --background --python-expr "exec('import sys\ntry: 2/0\nexcept: sys.exit(10)')"


Can't get Mesh to unwrap properly I'm trying to get this chair (the back part) mesh
Unwrap smoothly but it keeps coming out like this

which causes extreme distortion when i try to put a texture on it.
i'm trying to get it to unwrap smoothly like this

Can anyone explain to me how i can get my mesh to unwrap like that?

without an blend file i have to guess, but it seems to me, that you missed some uv marks on one end of each of the objects. A cubic object needs to have 3 UV Marks on each of its ends. I made a picture to explain it futher:  If that does not solve the problem, please upload the blend file.
For getting the top and bottom face separated from the object, mark the howl face:


OS cursor location in Blender Windows first,  I mean to Operating System Cursor... NOT TO  blender's 3d cursor

second... this location is different to ct.windll.user32.GetCursorPos(ct.byref(pt)), I think because blender made here own calculation from blender UI...

blender allow me to set the location of this "real" cursor using bpy.context.window.cursor_set, but.. how to get the actual location?

thanks

here an example http://www.blender.org/api/blender_python_api_2_57_release/bpy.types.Operator.html#invoke-function

import bpy

class SimpleMouseOperator(bpy.types.Operator):
    """ This operator shows the mouse location,
        this string is used for the tooltip and API docs
    """
    bl_idname = "wm.mouse_position"
    bl_label = "Invoke Mouse Operator"

    x = bpy.props.IntProperty()
    y = bpy.props.IntProperty()

    def execute(self, context):
        # rather then printing, use the report function,
        # this way the messag appiers in the header,
        self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
        print((self.x, self.y))
        return {'FINISHED'}

    def invoke(self, context, event):
        self.x = event.mouse_x
        self.y = event.mouse_y
        return self.execute(context)

bpy.utils.register_class(SimpleMouseOperator)

# Test call to the newly defined operator.
# Here we call the operator and invoke it, meaning that the settings are taken
# from the mouse.
bpy.ops.wm.mouse_position('INVOKE_DEFAULT')

# Another test call, this time call execute() directly with pre-defined settings.
bpy.ops.wm.mouse_position('EXEC_DEFAULT', x=20, y=66)


Partly Ignored PNG Alpha? I just selected some pixels in Photoshop and deleted them, so this part became transparent. I save it as PNG. And imported this image as texture for cycles material.

What surprised me is a "Material" and "Texture" view in 3D window, that displays pixels that should not exist anymore in the image.

From result it seems to me like Ph deleted completely only all pixels (color information) out of a box (rectangle) that determinate pixels with alpha. And for pixels inside this "non alpha" box he kept colors and alpha info.

Blender than displays only color info without alpha inside this rectangle. That is probably a bug, but I just even didn't know that PNG saves this pixels as well.

Am'I right?
Or what is going on here?

Since the node tree consists from a "Transparent" shader as well, it displays alpha right, but not in a "Texture" method anyway.

Note: Render is OK.

So, the questions are:

How PNG file stores color/transparent data
(this doesn't seem to be blender related, but only blender displays data in that way for me)
Is this behaviour expected or is it a bug? (or any other user fault :)

Edit: probably more descriptive illustration

The issue is one of the many problems with the PNG format: Unassociated Alpha

Blender will display the RGB information because it is part of the file and the alpha channel has not been associated correctly, and Blender expects associated alpha.

Quoting from the PNG specifications:

  PNG uses "unassociated" or "non-premultiplied" alpha so that images with separate transparency masks can be stored losslessly.

  An alpha value of zero represents full transparency, and a value of (2^bitdepth)-1 represents a fully opaque pixel. Intermediate values indicate partially transparent pixels that can be combined with a background image to yield a composite image. (Thus, alpha is really the degree of opacity of the pixel. But most people refer to alpha as providing transparency information, not opacity information, and we continue that custom here.)

  The color values stored for a pixel are not affected by the alpha value assigned to the pixel. This rule is sometimes called "unassociated" or "non-premultiplied" alpha.

  "premultiplied alpha", stores pixel values premultiplied by the alpha fraction; in effect, the image is already composited against a black background

A different way to think about the problem is to blender sees the RGB information on those pixels as luminous and transparent at the same time... (like the fire on a candle, for example).

What would happen if you switch from Straigth Alpha to Premultiplied?

Not a real solution, because the RGB information is still there (though this will display correctly in rendered view). When you premultiply blender would expect black instead of RGB information.

The proper way to deal with this situation is to multiply the alpha with the RGB information.

Split the RGB information, use a converter>math node in multiply mode to multiply the information of each channel by alpha and recombine the RGB channels.

(click on the image to enlarge)

Or use the color and alpha information on a color Mix node in multiply mode and use 1 as factor.

Other ways to use unassociated alpha information.

Unassociated alpha could then be thought as a mask to determine how two elemements mix. White (1) would be one element, black (0) would be the other and any shade of gray would be a partial mix.

You can then use such a mask to control the mix between two different shaders(like emission and transparent) plugging alpha directly as a factor for the mix.

Or if what you need is to control the color of the sader only, use a color mix factor and have the alpha information work as a mask for the mix.

Further reading

Why does blender then use associated alpha and why shouldn't I use PNGs you might be asking...

Quoting from this very clever answer:

  ONLY associated alpha (often called pre multiplied) allows the
  compositing of pixels that are luminous and transparent (Like halos, blurs, fire, glares, etc) so choose a file format that supports associated alpha (the most common for visual effects is EXR)
  It's impossible to produce that kind of alpha blending with
  unassociated alpha, so formats like PNG are completely ruled out.
  Image editing programs like Photoshop and GIMP work internally with
  unassociated alpha, so they are not suitable for compositing that
  kind of effects with alpha blending. You need to cheat and use an RGB
  only image with an addition instead (those programs are also likely
  to destroy the RGB information of every pixel with alpha=0, so be careful).

Suggested links:

https://wiki.blender.org/index.php/User:Sobotka/Alpha/Associated_and_Unassociated_Alpha

and

Compsiting Digital Images, by Porter & Duff


i cant bake save or bake udim textures I want to save udim tiles textures and bake but it doesnt allow me. Here an example:
enter image description here

Probably you should create all the UDIM tiles first. And seems like currently (2.91.0) Blender can't bake all UDIMs at once, but you can try this addon https://github.com/anfeo/blender_addon_bake_UDIM


Cycles single side floor problem I have this strange shadow behave on render in Cycles. Simple one side floor is rendered correctly if Z location is > 3cm. There isn't any other geometry and no overlaping with walls.

I'm new in Blender and I newer saw something like this in other 3d software/ rendering system. Thank you for the explanation.

First of all, it was looking like Z-fighting but it is not. I've checked twice normals, doubles, holes and everything else what comes to my mind, nothing was an issue but...

Vertices are not on the same Z location (I don't know which one) but after selecting all floor vertices - A then S > Z > 0 (it will place all of them on Z=0) everything is ok.

Little tips: this machine is hovering over the floor and use Filmic Blender for this ;)


How to get to FCurves from specific strip? In my script I get access to all selected strips using below code:

selection = [ seq for seq in context.scene.sequence_editor.sequences if seq.select and seq.type == 'SPEED' ]

Now, this gives me a list of speed effects from the selection. I want to modify (basically remove and insert new) the FCurve for the speed_factor property.
However I can't see how can I access the FCurves for this specific property.

I see than I can access all scene FCurves through bpy.context.scene.animation_data.action.fcurves. However this seems to have at least two problems:

I don't know how to properly create data_path having only SpeedControlSequence instance (the only thing I can think of is some string concatenations, but it doesn't sound like right solution),
even if I had data_path value I am looking for I would have to scan through all FCurves for the whole scene to get to the one I want, which doesn't sound very efficient.

How can I access, modify and replace FCurves if I have specific instance of Sequence?

edit:

One solution seems to be:

seq = # code to get one sequence instance
f = None
for f in bpy.context.scene.animation_data.action.fcurves:
    if f.data_path == seq.path_from_id("speed_factor"):
        break
else:
    f = None

However it seems to be highly inefficient way of approaching that issue. Is there a better way to do it?

I will wait few days before accepting my own answer. Maybe someone else will have a better
idea.

Due to lack of other answers and request to do so I will give what I am currently using.
I still feel like it is not the best approach, but it as well may be (I don't know Blender's API that well, just started learning).

I've created an operator that takes all selected speed effects and given the original frame rate of clips (I haven't found a way to get that automatically from movie sequences) creates linear interpolation curve for speed effect.
It is is more useful than constant speed value as you can then go and edit curve not having to work out how it should look like to get original speed in your final edit (it also creates meta strip that actually is trimmed correctly so it appears in correct size in VSE, but that part is omitted as it is outside the scope of the question).

def execute(self, context):
    # filter out non speed effects
    selection = [ seq for seq in context.scene.sequence_editor.sequences if seq.select and seq.type == 'SPEED' ]

    # get render frame rate and calculate how to scale input movie fps
    fc = context.scene.frame_current
    fps = bpy.context.scene.render.fps
    fcurves = bpy.context.scene.animation_data.action.fcurves
    factor = fps / self.original_framerate

    # remove current fcurves for speed_factor if there are any
    # we create set for faster lookups (at least I'd home it would be faster than naïve approach
    paths_to_remove = set((s.path_from_id("speed_factor") for s in selection))
    for f in fcurves:
        if f.data_path in paths_to_remove:
            fcurves.remove(f)

    for s in selection:
        s.use_default_fade = False
        s.use_as_speed = False
        factor = fps / self.original_framerate
        final_duration = s.input_1.frame_duration*factor
        final_duration = s.input_1.frame_duration*factor

        # create curve for this speed effect and add two keyframes
        curve = fcurves.new( s.path_from_id("speed_factor") )
        start_key = curve.keyframe_points.insert( s.frame_start, 0 )
        start_key.interpolation = 'LINEAR'
        end_point = curve.keyframe_points.insert( s.frame_start + final_duration, s.input_1.frame_duration )
        end_point.interpolation = 'LINEAR'


Vertex Group from part of Material I have a terrain in Blender (see red inset) and in the material node setup for that terrain I have separated an area with certain geometry features (height, orientation). Its the white area in the picture. (Nodes used : Geometry, Mapping, Colorramp)

My question is if there is a way to select the vertices in the mesh that correspond only to the white area, in order to create a Vertex Group. Now, if I create a vertex group directly from that material it obviously includes de vertices of the black area as well.

Thanks in advance !
Lynxx

UPDATE

Thanks Serge and Ray for your comments. I think I am closer to the solution but I cant seem to find the last step.

I have baked the texture and used it as a mask in the Vertex Weight Mix modifier, but I still not clear on how to select only the vertices with a weight of 1 (red ones on the left in the image bellow).

When I go into edit mode, to assign vertices, all are selected not only the ones corresponding to the red area. I have even applied a Mask Modifier as show below, to mask the blue area, but again when I go into edit mode the whole mesh appears not only the red part. So I cant select only the red vertices.

Just to clarify, I want to select only the vertices (red part of Weight Paint), to assign them to a new Vertex group, so I can then assign a material to only that part of the mesh.

Thanks again.

Assigning weight

Add Vertex Weight modifier, create empty vertex group, enable group add and tweak few sliders to get it work.

Selecting vertices

Add Mask modifier and select same group as in Vertex Weight modifier. Also enable all display options to see modifiers working in edit mode (inside green box on screenshot)

Next, you enter edit mode and select everything. Press A twice to toggle selection. It is mandatory to select all NOT by pressing A, use selection tools instead (like border B or circle C) with wireframe view  enabled Z to speed up things a bit. Once you have select everything, assign it to new vertex group.

To check if you done it right, disable viewport visibility of modifiers.


Placing object on uneven surface Is there a way to put an object on uneven surface? For example: if I make a food object, let's say a toast, and put it on a plate, it's all well if I just put in on the center of the plate, which is mostly flat surface. But what if there are other objects on the plate, and I have to put the toast on the side edge of the plate, which is curved?

I have tried using proportional editing and dragging faces of the toast as near as possible to the plate's surface, but the result is really ugly (perhaps due to my lack of experience and skill). Snapping to the surface seems only worked the best when the objects have flat surfaces.

If you don't want to go to the expense of simulation, a rig can get you quite close:

Prepare a copy of the plate's top surface, its rim (E,right-click, S) extended, as a Shrinkwrap target.

Make a triangular face from some vertices of your toast,ShiftD duplicated, and P separated to a new object. This will be the root object, and control the gross orientation and location of the toast.

Additionally, create a flat Lattice, (1 segment in Z) which will bend the toast.

With the toast and triangle selected, triangle active and in Edit Mode with all verts selected, CtrlP parent the toast to the triangle's vertices
in Object Mode, CtrlP parent the Lattice to the triangle.
Assign Shrinkwrap modifiers projected in Z, to both the triangle and the lattice, aimed at your newly created Srinkwrap target.
Assign a Lattice modifier to the toast, targeted on  the Lattice.

Now when you move the triangle, the toast will more-or-less conform to the plate. You can tune the resolution of the Lattice and influence of the Lattice modifier to make the toast more or less soggy, and the offset in the Shrinkwrap modifiers to control the proximity of the toast to the plate.

EDIT: A duff version of the blend replaced: 1400 GMT 19 March.


Meshing a smoke simulation I have followed a tutorial on how to create explosions in Blender and now I want to export the explosion as OBJ. So for that I first need to create a mesh. I have seen multiple solutions, with using fluids or using the add-on CubeSurfer but nothing is working.
So how can I mesh my simulation or directly export it as OBJ. I am new to simulations in blender so a detailed answer would be very nice. I am working on 2.83
This is the blender file (this is a low quality example, so testing can be faster):

So thanks to vklidu I'm almost there, here is my current state, so that he can see what the problem is:

Sorry, my post covers generating smoke as a single mesh in Blender 2.79, and not an entire smoke sim anim, due a buggy particle system (or smoke cache).
Blender 2.83 doesnt have texture type Voxel Data, but there is a Voxel Mesher Modifier on the way https://developer.blender.org/D4960

In meantime my goal with 2.79 was to ...

use voxel data to generate particle cloud from texture (01) or vertex weight (02)
particles represent by metaballs
animation export as Alembic or Wavefront, that converts metaballs (smoke) into Mesh Sequence animation

test 01 - Mesh from Voxel Data Texture
Blender 2.79 contains texture type Voxel Data that use this kind of data as 3D texture. Blender Manual describes this quite straight forward. And it works for 8-bit RAW and Image Sequence file format (like CT scan or MRI).

It means - it is possible (with some headaches*) to generate mesh from particle system represented by metaball objects, like this ...

Troubles comes with voxel file format Smoke (that should be able to reuse data of existing Smoke Domain on another object) and Blender Voxel (that should use externally saved simulation bake) ...

... I could see Material Preview in Texture Properties, but nothing was rendered.
Usage of these baked smoke simulations (externally) is buggy for years. Smoke doesn't appear in domain at all / or is shifted / or just a few frames of sim is visible. Not always, and that it makes more difficult to hunt issue. (One for all bug report here - as many of them were closed/archived.)
Anyway ... for your needs, when I assigned particle system directly to domain and Domain was set as Texture for particle density I was able to generate a particle cloud and to mesh one frame of smoke, but not entire animation. Probably for the reason mentioned above - bug. I'm not sure how  that one frame is selected, probably current frame set on timeline when assigned? Can't confirm due the refresh issue.

For those interested - in case smoke sim is baked ...

add Metaball object
select Smoke Domain
add Particle system - Emission>Start1 End1 / Source>Volume / Distribution>Grid> / Velocity>zero / Texture>New (Cycles only) / Field Weight>Gravity=zero
go to Texture (Particles) Properties - Type>Voxel Data / Voxel Data>Smoke / Color>Ramp=ON to adjust density / Influence>Density=ON

set render particles as Object>Mbals
export (Mball) as Wavefront(.obj) or Alembic (.abc) that converts metaballs into Mesh Sequence animation
(in case someone will fix the bug :) )

... another pain as hell is particle system refreshing https://developer.blender.org/T52160 . Even you have visible particle cloud, opening file again hides the particles. To make them visible again I discovered only one weird way - switch to Blender Internal engine into RenderView mode in 3Dview, change particle resolution to something, it refresh particle appearance, switch back to Cycles if needed.

test02 - Mesh from Dynamic Paint - Weight
Dynamic Paint in video of Miikah can use a smoke sim as a "brush" to paint, so I wanted Weight paint into a dense grid using voxel data. Vertex Weight becomes Particle size solver. But ... I don't even thing this was implemented or I do something wrong here.
(I could only approved dynamic paint vertex-weight can generate animated particle cloud, but not driven by smoke.)

Resume - faked Fluid Particles seems to be a way to go ... :(

Notes to fix setup of your second blend file
(this part I will delete later)
Particle System Properties

Influence > enable Density
Field Weights > Gravity = 0
Render > Size is very small, try 0.4
looks better to use Random for Emission>Grid

Texture (Particles) Properties

Color > enable Ramp and move White to left to increase smoke density

Mball Properties

keep in mind all metaballs in a scene use resolution from first existing meta object in a scene (doesn't matter what other meta objects are set). That means - lowres for Preview and small particle size value make them invisible for its low res grid.

Time range

you have set Smoke cache frame range 1-90 even scene is set 1-150
also particles system Life Time is only 50 should be 150

Screens below use – Grid Res 200 / Particle Size 0.1 / Mball Preview 0.2
Smoke Default Preview

Smoke Viewports Display Color Ramp

Mball Particles

Hight Grid Resolution + Smaller Particle Size + Smaller Metaballs resolution = More detailed final mesh
Bake smoke sim first. If particles are not visible check italic paragraph under my first blend file.


Can't get the model weighted, all faces are red painted I've been following this tutorial: Blender 3D Wolf Rigging tutorial.
The difference is that I used a custom model, when I'm about to do the mesh to armature link the resulting weight are wrong, can't move the mesh using the pose structure, I've been trying to redo the process in different ways and also removing the constraits (IK) in the "elbows" and tail but with no luck:

I also tried to remove the vertex group, somewhere it was said that it might work. I'm new to Blender and this is driving me crazy, don't really know what else to do.
Here is the .blend in case it might help: Blend file

For a reason or another the Deform option of most of your bones is deactivate, which gives them zero weight on the mesh, so reactive it for all bones that are supposed to have weight (and deactivate it for the master, the IK controllers, pole targets...).

To toggle several undeformed bones at once, as explained here by  Jaroslav Jerryno Novotny, you can select multiple bones, at last select one with the Deform activated, then right-click the Deform checkbox and Copy To Selected.


How do you copy and paste keyframes from one Rig to another? How do you copy and paste keyframes from one Rig to another?

I opened a walk cycle on a loop that I made.  I tried to copy and paste the walk cycle to sevral characters that I have, but I'm stuck at how to do it.  Any advise or suggestions?  Thanks in advance!

Rick

Link the Animation Data.

Select object without the keyframes first.
Select the object with the keyframes to be copied second by holding shift and left clicking.
Press ctrl+L
Select "Animation Data"

This has in effect, copied the animation data from the second object to the first. Note that you must change the current frame of the animation for the cache to update, change to take effect!

This method works for rigs as long as the names of the bones are the same! Please note that the same animation data may not affect two different rigs the same way, if they are not identical in bone rotation, location, and scaling.

(Also, please note that this may not work for complex objects or movements, like armatures or movement that effects individual vertices, unless they are identical. Blender will do it's best, but on objects or armatures with different geometries, it does not know which vertices to effect unless the movement is simple directional and rotational movement applied to the object as a whole. Your best method would be to map the data with a modifier.)


Can't write bmesh object back to mesh datablock I'm struggling to learn Blender's structures and types and use Python to modify meshes.  In trying to sort out image updating, bmesh and mesh data, I copied the following code from the Blender 2.64 API reference (Blender 2.74 installed):

# This example assumes we have a mesh object selected

import bpy
import bmesh

me = bpy.context.object.data

bm = bmesh.new()   # create an empty BMesh

bm.from_mesh(me)   # fill it in from a Mesh

for v in bm.verts:
    v.co.x += 1.0

bm.to_mesh(me)

me.update

(I added the last line as suggested by another question here.)

Using the startup cube, and switching to Edit mode, I tried the script.
It fails, pointing to:

bm.to_mesh(me)

What have I missed?

The mesh me must not be in edit-mode when writing the bmesh object bm back to me - like the error message tells you:

  ValueError: to_mesh(): Mesh 'Cube' is in editmode

So, either run the code when the mesh is in object mode, respectively change the mode: bpy.ops.object.mode_set(mode='OBJECT')

Or use a wrapped bm, which means to directly manipulate the editmode mesh through the bmesh module:

import bpy
import bmesh

me = bpy.context.object.data

bm = bmesh.from_edit_mesh(me)

for v in bm.verts:
    v.co.x += 1.0

# Update mesh, so we see the changes.
bmesh.update_edit_mesh(me, False, False)

# Because we did not add or remove geometry,
# tessface=False and destructive=False can be used.
# DO NOT DO THIS IF YOU CHANGED GEOMETRY!
# Blender will crash otherwise.

As you see, you can either fill in a mesh, manipulate it (purely in memory, the original mesh is not changed) and write it to a mesh datablock afterwards if desired OR gain access to the editmesh and edit it directly with all changes being applied to the original mesh without copying (the update at the end is required though).

You can chose which way to use based on the current mode to avoid unnecessary mode switches:

import bpy
import bmesh

me = bpy.context.object.data

if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

for v in bm.verts:
    v.co.x += 1.0

if bm.is_wrapped:
    bmesh.update_edit_mesh(me, False, False)
else:
    bm.to_mesh(me)
    me.update()

BTW: update is a method of the Mesh type, you need to call it: me.update()


Are there any placeholder models included with Blender? Sorta related to this question. Long story short, I want to pose models so I can use them as the base for my drawings. For some of the drawings, I don't need specific models. A regular, featureless human figure (male or female) would do. Does Blender come with any such "basic" models? Or is there a quick way to create a simplistic human figure with realistic proportions?

Blender does not natively have humanoid characters installed, but MB-Lab is an open source Blender add-on (v2.79 and v2.8) - creates rigged, textured human characters

https://mb-lab-community.github.io/MB-Lab.github.io/


View clipping by script I have a scene with very large objects. I can change the view clipping manually:
3D Viewport => View properties panel on the left => Clip Start // End

By doing this, the script console shows the following line (for example with End = 1e+06):

bpy.context.space_data.clip_end = 1e+06

But if I use this line in a script, or directly in the console, an error is raised:

'Space_console' object has no attribute 'clip_end'.

Where am I wrong? Any idea to work around the problem?
Thank you!

My Blender:
version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f54494e, type:
build date: 2019-07-29, 09:44 AM

The current screen you are in has context.  A screen is made up of a number of areas.  Each has a "space".

The property panel displaying the clipping is in the 3d view space its context area type is VIEW_3D

The console has its own area and space types, pertinent to (... in the context of ...) running script in the console. There is no clipping or view angle etc needed for the console, it displays text and runs code.

Hence the error, the python console space has no clipping distance.

As an example,  I have a screen with 4 areas open, the 3d view, the python console, properties and the outliner.  as Illustrated below with python console code

I am interested in the view 3d area, and see that it is index 3 of all my screen areas.

Once I have the area of the right type the space is area.spaces.active .. (often seen as area.spaces[0] I prefer the former) to which I can set the clipping distance.

See docs.  https://docs.blender.org/api/master/bpy.types.SpaceView3D.html#bpy.types.SpaceView3D.clip_end

Notice how the space of a 3d view is type SpaceView3D

>>> for i, a in enumerate(C.screen.areas):
...     i, a.type
...
(0, 'PROPERTIES')
(1, 'CONSOLE')
(2, 'OUTLINER')
(3, 'VIEW_3D')

>>> v3d_area = C.screen.areas[3]
>>> space_data = v3d_area.spaces.active
>>> space_data.clip_
                    end
                    start
>>> space_data.clip_end = 1
>>>

If I write an operator or panel to be displayed in the 3d view, then the space would be in context and I could simply use

space_data = context.space_data


How do I check to see if my object unwrapped properly after export? To clarify: I know how to unwrap and texture a model. I know how to export an object. I know how to import an object. I simply want to know how I can ascertain the UV unwrapping is the way I unwrapped it in Blender after import in another program.

The idea is to provide models with maps for use as game assets in other programs, and I would like to know how I can make sure it works as expected before trying to sell it. Importing it back into Blender isn't a feasible solution for me, since it might read the file differently than another program. This is really the only 3D program I've ever used with any seriousness, although I have some passing knowledge from online discussion of others, and one difference I've heard about is Blender's Z-up approach. I'm concerned this, or something similar, might affect how my export will work in other programs. I'd like to make my product as plug-and-play as possible.

I would suggest making sure you have the up and forward re-assigned in the export screen, For Example in FBX export at the lower left hand side:

I would suggest creating an 'Operator Preset' once you have the right export result.
Please don't take this screen shot as the exact settings you need. You would for example have 'Selected Objects' probably ticked for what you are trying to do.

There are a range of other tools and programs to re-open the file.
You could try importing directly into Unreal Engine or Unity. Perhaps even GODOT, (Godot tutorial here)

There is also 3D model review software like:
Autodesk FBX Review

I hope this helps.


How to access object instance from property instance? (in `update` callback) I am trying to create an add-on to create parametric objects (Blender 2.8rc1)

I have defined a custom PropertyGroup, i.e.:

def _update(self, context):
    print(repr(self))

class FurnigenProperties(types.PropertyGroup):
    width: FloatProperty(
        update=_update,
        unit='LENGTH'
    )
    length: FloatProperty(
        update=_update,
        unit='LENGTH'
    )

When I change property I can see out of _update:

bpy.data.objects['GeneratedObject'].parametric_properties

What I essentially want to get access to would be bpy.data.objects['GeneratedObject'] however I am unclear how to get from self in callback function to actual object that property we just modified.

Looking at documentation for bpy.props.FloatProperty there isn't much detail on what I should expect context to be.

I.e. would context be the place to retrieve object reference? I was thinking about context.object, but I am not clear how object is determined. Is that object selected by user in viewport? In which case it wouldn't work if I modified property from some other Python code (as it would be most likely for a collection of objects of which none would be selected by user).
Or is context.object in callback guaranteed to point to object that self belongs to in above callback?

edit:

context.object doesn't seem to work. I just tried setting value of one of my properties through Python console and the object that I get from context.object is (as I expected) object selected in viewport and not the object I modified property of.

id_data

the id_data property of any blender object is a refernce to the ID type object it belongs to.

def _update(self, context):
    print(self.id_data)


Blender 3D - Movie Frames around an arc I'd like to create an animation in which several movie segments are playing in separate plane objects that follow one another around an arc within the camera view. I can get a single movie playing on a plane object but I'm not sure how to get the plane to not only move along the arc but also rotate so that the plane faces the camera through out the movement. I will be having the objects moving only through a 1/4 circle.

Thanks!

An object can be animated along a path by Follow path Constrained to set its orientation toward the camera you need also a Track To Constrained

The duration of the animation can be controlled in the curves settings:


armature deform with automatic weights mesh deform I am new to blender. I was following a tutorial. When I applied "armature deform with automatic weights", the left hand of the cartoon works fine while moving the armature. But the right hand gets messed up.

I have added inversekinetics constraint to move the hand. The armature name is ik.hand.l for left hand. and ik.hand.r.001 for right hand.

The attached blender file is given for reference.

https://drive.google.com/file/d/1ubYjsbgMNf39_UVACdkFKYhfEJmcph1R/view?usp=sharing

Apply the Mirror modifier, then Apply the Subsurface modifier but only 1 level. You can see from the picture that it's plenty smooth enough. Then in object mode select the mesh, shift select the bones and Ctrl P>Automatic Weights


Is it possible to show the history on a detachable window? My question is: Is it possible to show the history of what I did in blender, possibly as a separate grab-able window that stays on top of the other windows?

I am a blender novice, with no prior experience of any kind and I am open to any solution to the following 2 problems:

1) Blender has so many functions I sometimes accidentally hit a key on my keyboard and I am unsure if I actually did anything. I am then concerned about hitting ctr-z since I am not sure if anything happened or if I'll see or notice the change if I do in fact undo it.

2) Sometimes when I am selecting (vertices especially) I am afraid my hand moves too much and I translate one by accident. Since the movement would be small, it would be hard to see it happen, but if history showed that a translation when I did not want one occurred, I could keep an eye on the history.

Thank you so much for your replies!

Every action you've done is listed on the Info Window, you can view it if you pull it down.

The commands are listed in Python and list changes to your file as they are made. They're not editable, nor can you go back or undo form here.

For those of us whose language skills are limited to spoken languages and are code illiterate, the option is the Undo menu, accessed by pressing CtrlAltZ.

It will display a list of steps you can undo. Note that the list cannot be kept open permanently.

Form the manual

  Rolling back actions using the Undo History feature will take you back to the action you choose. Much like how you can alternate between going backward in time with Ctrl-Z and then forward with Ctrl-Shift-Z, you can hop around on the Undo timeline as much as you want as long as you do not make a new change. Once you do make a new change, the Undo History is truncated at that point.

The number of undo steps is determined by this setting on the user preferences:

Depending on your system's RAM, you can set up to 256 undo steps.


Some faces left behind in pose mode I have rigged my character with automatic weights, and everything seems OK except for a few faces which are left behind when I rotate the head. They are the faces that make up the iris and pupil in the eyes.

These faces were modelled separately to the rest of the eyes but they were joined to the eye objects so I don't know why they don't follow them! I'm not able to select them as separate objects, yet rotating the bones in pose mode leaves them behind as you can see in the image below.

First of all put the armature modifier before the subsurf and check the two buttons of armature modifier so it acts in edit mode also.

As you can read in the N properties panel, the not moving vertices heve been weighted to the wrong bones (shoulder and upper arm), instead of "spine.006".

Then go to the vertex groups tab, select all wrong moving vertices, remove them from the wrong vertex groups, and assign them to the "spine.006" one.

In general, when an object has to move exactly with one bone, without any deformation, you should avoid automatic weighting, and parent the object directly to the bone (bone option, choose the bone in pose mode), or choose "with empty group" option and manually assign all vertices to the corresponding vertex group.


Multiple textures turn to pink I've downloaded a blender file off Sketch-fab and I knew it was created with an older version of blender. I opened the file and every texture except for some blue emission thing.

Pink texture basically means that the texture is missing. I guess this file doesn't contain these textures.
EDIT: I downloaded this model, and there is separate textures folder.


Rendering multi-layer EXR leaves small gaps between layers I know this is kinda a hybrid issue, but I think the problem here lies mostly with Blender.

I've rendered a multi-layered EXR file of a character I did in Blender to color and adjust it further in Photoshop. Arms, legs, head and so on are all on separate layers for easier access.

But as you can see in this picture, there are very thin gaps between each layer of like 1 pixel. Sadly they are visible even from afar and make the image look ugly.

Is there a way in Blender to circumvent this? I know this is a very specific question, but maybe someone has an idea.

This appears to be a problem with a misunderstanding as to how to handle alpha.

When pushing out alpha, raytracing engines use associated alpha, as only associated alpha represents both occlusion and emission.

As a result, the alpha in those subpixel seams must not be composited using the standard compositing operation, but rather one of the alternate over operations. Proper imaging tools such as Nuke offer the correct set of over functionality where anachronistic applications such as Photoshop do not. See for example, disjoint over.

When you have two pieces of geometry that share a subpixel but do not overlap, such as two angled bits of geometry that are perfectly flush with each other, the proper alpha combination amounts to an add. Do not use Photoshop's broken assumptions.

The best news is that this is purely the tip of the iceberg regarding Photoshop mishandling of proper EXR based work. Being display referred by design, it will fail miserably on many fronts including bit depth and proper scene referred data will be a nightmare.

See also this question which has more examples and a fleshed out solution with more depth.


Help for creating a radar sensor with python - bge I would like to know how it is possible to create a radar type sensor with only python in bge.
To specify, he would have to fire at the Y + position up to a distance of 100 meters, starting from the cube.
The radius has to be 0, it will stay as a line.

Please have a look at the BGE API -> KX_GameObject.rayCast

Basically you measure the faces an imaginary line is crossing through.

The mesh of the game object you measure with will be ignored (you want to find another object, rather than itself).

Here is a short demo measuring between [0,-10,0] and [0,10,0]. The coordinates are given in scene space (world coordinates). The direction of the measurement matters as the nearest face to the start point gets returned. The endPosition is a reference where to point to. The measurement will stop after reaching the distance of 15 (regardless the distance to the endPoint).

Code:

import bge

controller = bge.logic.getCurrentController()
owner = controller.owner

startPosition = [0,-10,0]
endPosition = [0,10,0]
distance = 15

hitObject, hitPosition, hitNormal = owner.rayCast(endPosition, startPosition, distance)

if hitObject:
    print("Object hit:", hitObject, "at", hitPosition, "the normal at that point is", hitNormal)
else:
    print("hit nothing")

Be aware this is a one-shot. This means you need to call it each time you need to measure. The python solution fits when you need to measure:

only at specific time (rather than all the time)
with dynamic parameters (rather than fixed distance straight forward)
you need to measure multiple times with changing parameters within a single frame
you need settings the ray sensor does not offer (e.g. measure along a reflected imaginary line)

When you just want to "reinvent" the ray sensor, notice it is way easier to use the ray sensor.


No shadows with Eevee, no render with cycles This is my first time using blender in a very long time and I'm trying to make a render of a board game I'm working on. I believe I have everything set up correctly but when rendering with Eevee don't get any shadows, and when rendering with cycles I get a grey screen. I don't know what's wrong with the cycles rendering but I think there's some sort of global illumination affecting the shadows in the Eevee rendering. Thank you in advance!

I downloaded your file, and there's a shadow in both cycles and eevee. I could comment it but my rep is <50. You could try to copy paste all objects from this .blend file, to a newly created with default settings and check if it's ok

eevee:

cycles:


Add ONE constraint to several bones? So, I want to add a Limit Rotation constraint with "Limit Z" option checked for many bones at once. Now, I know about the "Copy Constraints" function, BUT in this case, the bones already have other constraints on them (with different targets) which I want to keep, and just Copying all constraints would overwrite these.

How can I add only one constraint to other bones without overwriting existing ones?

Alright, I managed to solve it myself now with a Python script, it goes like this:

import bpy

for b in bpy.context.selected_pose_bones[:]:
     rot = b.constraints.new(type='LIMIT_ROTATION')
     rot.use_limit_z = True

You need to have your bones selected (in pose mode).


Controlling object visibility with distance to other object's vertices This is my first post so please forgive any noobish errors.
Here's the problem I'm trying to solve.
I have a grid made up of hexagonal meshes. I have a cylinder that's either going to translate across the grid or scale up across the xy until its touching all the meshes.
I want to make it so once one of the verts of the cylinder gets within a certain distance of the centre of each hexagonal mesh the visibility will turn on for said hexagonal mesh.
The original method I was working with was using a limit distance and location constraints so that the hexagons would be pushed up in the Z and intersect with a Boolean object and become visible (which was working to a degree) but I couldn't get the limit distance constraints to work with the vertex group of the cylinder. It would only judge distance from the centre of the cylinder which doesn't work if you're intending on scaling the cylinder instead of translating.
Any ideas?

There is ways to do this in Python, but I will explain a way I found to do it using drivers.
You can control the visibility of an object in the viewport and in renders by right clicking on the Visibility section of the Object properties tab and adding a driver.

In the driver popup change it to Distance type.

In this case I have an empty driving the 1st input of the driver, and the object I wish to change the visibility of in the 2nd input.
You can edit the distance between the objects that will trigger the state change in the drivers editor window. Also, the expression in my example has "var-5" which adds m units to the switching distance. (try it and see)
You can use CTRL-L -> Animation Data to copy the drivers to other objects but you will need to update them to use themselves as one of the inputs.
The hard part... If you want every vertex of your cylinder to trigger every one of your hexagons, then you will need to hook an empty to every vertex, then create one of these drivers for every empty, then copy and edit every one of them to every hexagon and edit those! Sounds like a LOT of effort.
There is probably other ways to do this without Python, but this is the way I found.
As I said above, Python would be much better for this.


How to delete bone driver fmodifiergenerator my problem started when i tried to add a driver to a single bone in pose mode. That part is already solved and it was successful. The problem is 'that' script added an Fmodifiergenerator, i need your help to remove this generator with python in blender 2.74. I have seen another answers on this site on this subject. I tried it all and it doesnt work on my problem. I'm not looking for a fancy solution that will removed it from every bone in the armature, i'm just looking for a simple solution that will remove it from the specific bone that had been added with the driver_add script.
This is the script that i used to add the driver

#add driver
driver = bpy.context.object.pose.bones['Bone.001'].driver_add('rotation_euler', 2).driver

driver.type = "SCRIPTED"
#add variable
var = driver.variables.get("var", driver.variables.new())

var.name ='var'

Var.type = 'TRANSFORMS'

#add target

target = var.targets[0]

target.id = bpy.data.objects.get('armature.001')

target.bone_target = "bonectrl"

target.transform_space = 'TRANSFORM_SPACE'

target.transform_type = 'LOC_Z'

#add expression = "var*50"

Please help me.

Here is some commented console code using FCurveModifier.remove(...) I have a location.x driver on the context object's pose bone "Bone", which has an fcurve generator modifier.

>>> driver = C.object.animation_data.drivers[0]
# driver 0 is driving location.x of pose bone "Bone"
>>> driver.data_path
'pose.bones["Bone"].location'

>>> driver.array_index
0
# if len(driver.modifiers) or somesuch
>>> mod = driver.modifiers[0]
>>> mod
bpy.data.objects['Armature']...FModifierGenerator
# yep it's a GENERATOR
>>> mod.type
'GENERATOR'
# remove it.
>>> driver.modifiers.remove(mod)


add parameters (Grid, Random...) with python I created a script to generate the mesh (spheres, cubes, ...), but I must add parameters existing in the particles menu as Grid, random, ...

are you help me how to add this in my menu panel

How can add the selected  yellow portion  in particles menu to my script is to create different distributions.

After you add your sphere with bpy.ops.mesh.primitive_uv_sphere_add() the new sphere will be the active object which you can get through bpy.context.active_object, you can then add a particle modifier to it and adjust the settings which you can access through the particle modifier.

bpy.ops.mesh.primitive_uv_sphere_add(size = size, location = location)
obj = bpy.context.active_object

ps = obj.modifiers.new(name='particles',type='PARTICLE_SYSTEM')
pset = ps.particle_system.settings

pset.emit_from = 'FACE' # VERT FACE VOLUME
pset.use_emit_random = True
pset.use_even_distribution = True
pset.distribution = 'JIT' # JIT RAND GRID

To adjust other properties you can use the tooltips to find the property name to use -

And if you don't know what values can be used for enumerated options like distribution you can find them in blender's API documentation.


switching off all the emission & bounce light in Cycles can anybody help me out in knowing how to switch off all the emission & bounce light in Cycles.

Go to the node editor, remove emission and glossy nodes.
You can find node editor on bottom left corner.


Blender Crashes when Baking High Resolution Textures "Circular Dependency" error I have a high poly (1,3 Mio faces) photo scanned mesh with 17 generated 8k textures (totalling 500 MB)

All the texture are looking something like this one here:

My goal is to bake those 17 diffuse maps into one single 8k texture. But when I hit "Bake" I first get some errors, which look like this:

Circular Dependency for image "texture_xy" from object "xyz"

and then Blender crashes.

First of all I want to know why those errors occur. But I am also concerned, that Blender doesn't crash because of the errors, but rather because those textures are just to massive in size.

Any suggestions on techniques I can use to bring those 17 textures into 1 single texture?
Would it help to decrease the polygon count of the mesh?

The issue was just that I did not have sufficient memory. So I had to downscale the high resolution textures to make it work


Can I use Compositor to colorize image? I often need to change color of a texture to create differently colored models. Usually I do it in Photoshop by selecting "Colorize" checkbox in Hue/Saturation and then modifying the Hue. Is there a way to achieve similar effect with Compositor in Blender? There is a Hue/Saturation node, but it does not have "Colorize" option. It would be great to use 32 bit EXR files directly.

Yes.

Try using a mix node with the blend mode set to Color:


Export actions(animations) to FBX and open in Unity I have a Problem with animating objects in Blender.

When I add the constraint "Follow_Path" to my objects and then bake animation, I have about seven additional Actions for one object.

The animation works very nice, but when I open the FBX format in Unity, I get all these actions and only one is the right one. For example Action.007

Mabye, I do something wrong with the selection?

Actions in Unity:

Here some Code:

def followPath():
    for object in scene.objects:
        scene.objects.active = object
        object.select = True
        bpy.ops.object.constraint_add(type='FOLLOW_PATH')
        # Settings
        forward_axis = getForwardAxis(path)#I get the path from another function
        up_axis = getUpAxis(path)
        constraint = bpy.data.objects[object.name].constraints["Follow Path"]
        constraint.target = bpy.data.objects[path.name]
        constraint.forward_axis = forward_axis
        constraint.up_axis = up_axis
        constraint.use_curve_follow = True
        # animate the path
        override = {'constraint': object.constraints["Follow Path"]}
        bpy.ops.constraint.followpath_path_animate(override, constraint='Follow Path')
        bakeAnimation()
        object.select = False

def bakeAnimation():
    bpy.ops.nla.bake(frame_start=1, frame_end=250, only_selected=True,
                 visual_keying=True, clear_constraints=True, clear_parents = True, bake_types={'OBJECT'})

I have the answer now:

The first problem is, that I don't clear the old actions when I start the script twice. Therefore, it appends the new actions to the old ones.
Now in Blender there are only the needed actions.

However, when I Export it to FBX and open it in Unity I have the same problem.

You have to push the action down to a new strip:
Open the NLA-Editor and push that button next to your action.

For the export you have to select the following:

When you open your FBX in Unity there is only one action for each object.

How you do it in python:

#Add NLA-Strip
bpy.context.area.type = "NLA_EDITOR"
bpy.ops.nla.action_pushdown(channel_index = 1)#choose your index
#Export Settings
bpy.ops.export_scene.fbx(filepath = yourfilepath,
                         use_selection=True,
                         bake_anim_use_all_bones = False,
                         bake_anim_use_nla_strips=True,
                         bake_anim_use_all_actions=False
                         )


What does luminance have to do with the blackbody node? I have noticed that the blackbody node has a 'scale by luminance' in its OSL code.

This is the code:

/* Scale by luminance */
    float l = luminance(rgb);
    if (l != 0.0)
        rgb /= l;
    Color = rgb;

What does luminance have to do with the blackbody node?

Let's look at what Luminance means:

Luminance...is a measure to describe the perceived brightness of a color.
Source

Since luminance is the perceived brightness, not all hues with the same saturation will have the same luminance. The website linked above has a useful image:

From the image above, we can see that even though all of the colors have 100% saturation, their luminance varies a lot. Yellow light (2,800 K) has a luminance of 94%, while blue light (10,000 K) only has a luminance of 57%.
This becomes a problem with the Blackbody node, since its usual purpose is to provide color for Emission shaders and lamps. We don't want lights that are lit at varying temperatures to be perceived as brighter or darker than the others. We'd rather control this on our own with the Emission node.
All of the colors coming from the Blackbody node are divided by their own luminance as a kind of normalization, so that they all have the same perceived brightness.


Another Mirror Mod Issue This is kind of similar to another issue I had with the mirror mod, but this time my model that has the mod shows the mirrored version going through the main one. Even if I reposition the pivot point or 3D cursor so it's in the centre, it makes no difference, it never appears in the right place - opposite the main one.

It looks like my shoe model has far too many vertices and has made the file over 38Mb. Not sure of the best way to fix that. I've tried the Decimate modifier, but that ruins the model. :-\

https://www.dropbox.com/s/t5bjrr390g7131x/30_06_18.blend?dl=0

1 - About the mirror: you have to apply the Rotation of your object (crtl A > Apply Rotation)

2 - About the mesh of your shoe: you have too much useless edge loops, come back to an earlier version and don't apply the Subsurface and Solidify modifiers.

If impossible, Decimate won't give a good topology, so you can either:

Simplify with the method described in this video (ring selection, checker deselect, select edge loops, delete): https://www.youtube.com/watch?v=Yptda_yKQIU
Or rebuild a new shoe with retopology (create a new object and use snap to stick the vertices to the original shoe)


How get object possition after action in Blender_Game I have big problem with python scripts in the game engine. I have a cube with an action in the X axis. Another cube which after clicked with mouse, starts a script.

button=bpy.data.objects['buttonLogic1'].location
print('button[0]')

But this gives me back only the location before action, and not after the action.

Bpy does not work in the game engine. Instead you have to use the game engine modules

For this particluar application, your script could look something like:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner
scene = own.scene
button = scene.objects['buttonLogic1']
print(own.worldPosition)

The standalone modules are also available in the game engine.