Rig a rope spanning two objects I am trying to rig a rope so that it spans between two objects. Technically it is a fuel line, regardless I am trying to get it to work with the soft-body physics, primarily because A, it will be affected by gravity, and B, the engine rotates in relation to the body of the vehicle.

As you can see, I have two bones that I want this fuel line (red line) to span between.
I have been trying to use a bezier curve with soft-body enabled, but it only connects to one bone and flops around on the floor like a fish at the other end.(Why does it flop around if no forces are acting on it?)

Thank you for any assistance.

One way to do this is to use Constraints and a mesh:

Instead of a curve, use a mesh object made up of two vertices:

Subdivide it with loopcuts (CtrlL) or W> Subdivide.

Hook each end vertex to the corresponding object (or bone) with CtrlH:

Assign a Vertex Group to the end vertices.

Make the line object a Soft Body object and set the vertex group to the end vertices group:

Add a Skin modifier to the line object, and use Vertex scale (CtrlA in edit mode) to scale the size of the hose.

Add a Subsurf or Bevel modifier afterwards to round the hose out.


Is there a way to fix these weird faces without adding more polygons? Imported mesh from Maya over to Blender. The shading and faces are weird.
Here's the blend file, mega.nz/#!N3RTgRwD!b2t7DqLzu3H7MyUrZ5SDdfC8wZW3mngz2LzeHe6jY2E

Here it is in Maya.

While we model using quads, blender always draws to screen using triangles. The current triangulating algorithm for quads always triangulates the same way, while the newer ngon triangulating is more intelligent, see this question for some more insight.

While the vertex order used to make each face could be re-arranged to get a better result, I don't think there is an easy way to do that.

You should find that a subsurf modifier will hide most of the effect you are seeing.


How to get sharper shadows out of an HDRI I used my Ricoh Theta S (360 camera) to take bracketed pictures of a scene, for the purpose of creating an HDRI. This is the result in photoshop (too large of a file to upload directly). Looking at this, It seems like I captured enough lighting data for the scene to understand how bright the sun is, therefore producing accurate shadows. I used the highest and lowest exposure values my camera would allow, with 10 different photos.

When I plug this into blender, the reflections and colors are accurate, but the shadows are way too weak. As you can see in this GIF, even when I adjust the strength of the environment texture it doesn't make the shadows any more defined. Compare the CG shadows to the shadow of the tripod to the left.

Does anyone have a solution for this? Any hacks or tricks to make the sun strong enough to produce accurate shadows without using a lower exposure value?

Here is a thread over on blender Artists, maybe this helps

https://blenderartists.org/t/how-to-setup-a-hdri-to-get-sharp-shadows/578712/24

or you can use this blogposts by Greg Zaal with a lot of helpful Information
http://blog.gregzaal.com/2016/02/23/what-makes-good-hdri/

http://blog.gregzaal.com/2013/07/24/cif-2-hdr-lighting/


Exported Uv maps have no color (Fixed) Whenever I export Uv maps from blender and open them in any program like unity and gimp, they miss all color and only have the basic Uv outlines for the object, anyone know what I am doing wrong?

I think you are using Export UV Layout function - this just exports an image containing a wire so you know where to paint the texture.

If you already have the texture and just want to save it, open it in UV/Image Editor and press F3.


Can an object ever "own" an AN node tree or are the trees always independent? I'm a Blender noob.  Came from C4D where I made a lot of custom tools ("CSTools") using the Xpresso system.  In C4D, the Xpresso was "owned" by the object because the Xpresso tag lived on that object.

So if I import that object into another C4D file or duplicate it, the wiring for the object animation and followed it wherever it went.

I'm trying to wrap my head around what "owns" AN node trees.  It appears it lives in it's own free space and one has to directly ref the specific objects that it acts on (opposite of how C4D works where the object refs the node tree)  So if you copy the objects, then they don't have the animation anymore.

And I tried appending objects and collections into a new file and the AN nodes did not follow along.

The dream for AN to me is that they can live "on" the object and be part of it almost like code has an instance as a component on each object in UNITY.

It seems weird to make tools when AN appears to be completely independent and you have to manage them separately. It seems cumbersome to have all-in-one tools that are fully encapsulated.

In C4D I could have nicely packaged master object with custom controls on the front page of the inspector and all the 3D parts and node stuff lived happily tucked away "inside" it (folded in parenting).  Looking for this with blender and AN.

Hope this makes sense.  And forgive my extreme newness to the blender universe and AN.  Any guidance would be helpful.

EDIT:

Could an AN node ever live as a modifier?  Would be cool to be able to instance in the mod stack and set your targets there where if the target is "self" you can duplicate it and it re-refs whatever object is "local".

I'm very new to AN so this might not be accurate.

I think the answer is no, you can't associate an animation nodes graph with an object; it's part of the scene. I think this is very much by design however, as you can have one node graph control many objects, even selecting an entire collection of objects at once.

This doesn't mean you can't have the features you want! Because AN is open source, you can always visit the project on GitHub, and under the "Issues" tab either request new features, or ask for further explanation about the design of the project.


No sound in Blender, what do I do? Out of a sudden sound in my project disappeared. How can I debug this? Volume is okay, the clip is not muted. It happened after a crash. I have sound in the same version of blender, in a fresh project, when I drag and drop an audio file onto Video Sequencer, but not in my current project? Please help, where should I check for some settings?

you have Mute ticked on in Playback. To fix it, you have non-standard workspaces setup, so you need to do the following:
Switch to Compositing workspace (top of viewport)
Open Playback menu (towards bottom left of viewport)
Untick Mute in Audio section (towards top of menu)


Transparent faces in Edit Mode I am not sure how it happened but all my faces are now semi-transparent in Edit Mode.

I have tried multiple settings to get solid faces back. I am not in wire frame mode and I made sure that "Limit selection to visible" is disabled as see in the picture. I have no idea why I can't get my solid faces back.

Any help is greatly appreciated,

BloodHound27


How to make each scene keep its viewport position? The viewport camera position is global, so when I'm switching between scenes that have stuff at different locations in the 3D space, I have to continuously move/rotate the viewport so that it looks at something meaningful.

Is there a way for each scene to retain its viewport location/rotation?

You can use local camera in each scene/viewport.
It works reasonably well.

Choose a camera and set it as Local Camera.
And then check Lock Camera to View

Set the View panel like in this gif.
Note that I use a different local camera in each scene/viewport.


How to compose/ transform 2D object views (front, back, L/R sides, top & bottom) into a single 3D image [
Can Blender compose/ transform 6 seperate 2D object views (front, back, L/R sides, top & bottom) that have been created in Illustrator (native vector file, 2D) into a 3D image? For example, make a 3D golf bag from 2D flat images

I don't think there's any automatic way to do it. You can use your image as a blueprint, create the 3 shapes (top, front and side):

Then extrude them:

Boolean the front and side (Intersect mode):
*
Use top and bottom faces to model the top and bottom of your mesh:


Render shadows over a transparent background in cycles I'm trying to make a logo that will be on the header of a website.
What I'd like to achieve, and the reason I'm using Blender, is the projected shadows on the background looking perfectly real (as opposed to doing a drop-shadow in Photoshop).

The only thing is, the background has to be transparent because the website might use different background colors / gradients that make it impossible to match with the exported 3D background.

I made this dummy file (not the real logo... duh!):

If I use the file as is, the grey borders of the image will be impossible to match with the website's background color.
Here what I want:

So obviously, I tried masking the plane, which made the shadows disappear. I tried having a plane set to glass, which didn't work either.
And I looked around for a similar question, but didn't find one.

I am not trying to render an object without a shadow, or a shadow without the emitter object. I've seen this question which has a very difficult solution to this problem, and this one that is very similar but in Blender Internal. This one is similar too but has never been solved.
I'm only a beginner at Compositor, and I'm trying to learn more any chance I get, so any solution in Compositor is welcome if detailed enough. Although if there's a simpler or faster way, it's welcome too!

.blend file:

UPDATE:

As of Version 2.79, there is an option to make an object become a shadow catcher in Cycles.

From the release notes

  This option will make object to only receive shadows in a way that it could be alpha-overed onto another image.

The workflow is following:

Enable Film: Transparent.

Then (Quote from the develpoer's notes)

  Create an object which matches real-life object on which shadow is to be catched.

  Create approximate similar material on that object.

  This is needed to make indirect light properly affecting CG objects in the scene.

  Mark object as Shadow Catcher in the Object properties.
  Ideally, after doing that it will be possible to render the image and
  simply alpha-over it on top of real footage.

Once the plane has been marked as a shadow catcher, just render!

Again from the release notes

  It is to be noted that shadow catcher objects will interact with other CG objects via indirect light interaction. For example, shadow catcher will be reflected in the glossy surfaces.

OLDER ANSWER:

You can do a shadow catcher using a shadow pass and different render layers to create an alpha channel for the scene:

Move the plane object (shadow catcher) to layer2.
Make a copy of the other objects and move them to layer 2.

The idea is that on layer 1 you only have your objects but not the plan, and on layer 2 a copy of your objects and the plane that will act as shadow catcher.

On all of the objects in layer 2, except for the shadow catcher plane, disable Ray visibility for camera. You want the plane to be visible, but the other objects should be transparent to camera and projecting shadows on the plane:

Make sure your lamps and camera are active in layers 1 and 2.

Set up two render layers:

One for the objects in layer 1 that excludes information from layer 2.

A second render layer for the shadows that includes a shadow pass and excludes layer 1.

Enable Transparent on the Film section.

In the compositor you can use the shadow pass to alter the values of the alpha channel of the object's layer.

Add an invert node to shadow pass and plug the result as factor on a mix node (in add mode). Plug the alpha channel of the object's layer to the top socket and leave the lower socket empty.

You can control the transparency of the shadows by changing the color on the empty socket of the mix node. If you make that color white the shadows will be fully opaque, if you make it black you'll have no shadows.

Alternatively you can use the values from the shadows layer and the transparency of the shadows will be set using the values from the original scene:

For softer shadows you can add some blur:


Cant get add-ons to work cant get any addons to work or anyone to answer what folder hidden or not to delete for clean install. I need these addons to work i wasted the last 8 hours i couldve been working trying to get blender cloud working. I need it for texturing. I quit. Last time this happened i had to take a year off due to the lack of resources to help me find and solve issues. I really love blender but im at my wits end with it . beta everything worked fine, now full release and i lost every add on i am paying for other then hard ops no issues with its operation whatsoever.

erase C:/Users/[USER NAME]/AppData/Roaming/Blender Foundation/Blender). and reinstall


How can you transfer details from high poly to low poly? I sculpted a hand with dyntopo and since it got too dense I tried to retopologize it. I want to transfer the details from the high poly to the low poly mesh. I tried baking the normal map, but the result is not what I was expecting. Is the low poly mesh's geometry bad for this approach ?
Here are a few pictures:

I wanted to have the nails, knuckles, veins etc more visible, but this is my result (material preview mode)
EDIT:
I baked the map again(I used the jbake addon) (both hands were at the same position this time and the result is slightly better)

Here is my node setup of the low poly mesh.

And this is the normap map:

Here is my blend file: https://drive.google.com/file/d/1yUh3FVXKVvFmVQt5IQbHaO__fRTtEA-Y/view?usp=sharing

It's easy to fix. You just took the wrong baked image ;-)
Switch the Rendering workspace. There you can see all images in your scene easily. Check the dropdown list (Rendering result) and you'll see that "hand_lp.001_normal.001" is the correct baked normal map. In the Image Texture node you have selected "hand_lp.001_normal.002", a black one. Just select the correct one.


White squares in eevee render While I render using the new eevee engine, the render has squares in it.

I have Intel HD 620 integrated GPU and all GPU drivers are up-to-date. I can render it good in Cycles but not in Eevee? Why?

When I used add material option it added a principled bsdf node, I replaced it with Diffuse BSDF and it worked correctly. I don't know how. It's a possible workaround.


How Do I Make A Trace Effect Similar to Tron: Legacy Light Cycle Scene I am trying to make an effect similar to the effect in Tron: Legacy in the light cycle scene. I am aiming for the effect found from 0:04 through 0:12 in the video I linked. I feel like using a wireframe would be good but I don't know where to go from there.

Link: https://www.youtube.com/watch?v=3GBLtnxxtzQ

Edit: Cegaton already answered a very similar question here.

You'll find a lot of tutorials on Youtube about light streak effects, there are a lot of ways, it really depends on how it is supposed to look like and how sophisticated you want it to be... I guess in the Tron movie they use several combined effects so even if I knew it would be hard to sum it up in few words. One of the most basic way to make a light streak could be this one:

Create a curve, create a second one that will be its Taper Object (its profile from its start to its end).

In the Properties panel > Data, play with the parameters to give your curve its thickness and its profile. The taper allows you to make the streak slightly disappear at its end.

Play with the End value (and also maybe its Start value) and give it some keyframes to animate.

Now in the Node Editor > Compositing mode, give a blur effect or else to give the glow effect.


Multiple UV Maps For 1 Object I have a problem that is occurring when I try to add multiple UV maps to one object. When I select a vertex group and unwrap, it works fine, unwrapping just that vertex group to a UV map. The problem is when I select another vertex group and make a new UV map then unwrap, it unwraps that vertex group, but in the UV editor it still shows the previous unwrap in that UV map. I know that it is not just showing up because of "keep mesh in sync" because when I select the previous UV map, the vertex group from the UV map made after that one does not show up in the previous one. It seems every time I make a new UV map, the UV map from before automatically shows up in the new one, regaurdless of using a different texture. I am also making sure that I have just the faces that I want selected when I unwrap. Any help would be greatly appreciated.

Blender allows multiple images to be assigned in one UV Map. If I'm not mistaken you want one set of UVs, just across multiple textures. To do this select only the faces you want to use a specific texture, and in the UV/Image Editor click the "browse image to be linked" rollout, and select the that texture.

This will map any faces you have currently selected to that texture in the "textured" viewport shading mode.

Alternatively, in the UV/Image Editor use "image > open image" to open an image file not already linked to the blender scene, or the + icon to make an internal image.

If you want to render this object or export it to another application, not just view it in the "textured" viewport, you will need to assign a material to your faces, and assign your texture to that material.


Path not filling correctly I have some paths that have been imported via SVG from Illustrator, and as I was splitting them up, some would fill and some wouldn't. Even after removing extra points and ensuring there wasn't any redundancy or open ends, the path still won't fill.

Even weirder, if I translate certain points enough, it will fill.

Unfilled:

Filled after severe deformation of an anchor:

What gives? I fixed the G earlier but now the T (consisting of only straight lines) won't fill. I have one other letter with many more points and I'd rather understand why it's doing this before spending more time fiddling with it before it works.

The object has a scale of over 40,000. If you apply the scale (CtrlA> Scale) everything will work correctly:


How to model window into wall I have an architectural scene that I imported from 3ds max, however there is no windows in walls. Problem is, the scene doesn't have strict scale (I don't know measurements of the holes).

How this problem should be approached, because there is quite a few windows in my scene.

Just scale things properly and use Archimesh's windows. (Blender 2.78c comes with latter and you just need to enable it in User Preferences -> Add-ons.)


My camera is set to an object, and every time i change that, it automatically goes back to the object when i click render When ever this normally happens i go the the scene tab in properties and just change the camera, or i go to view-camera-set active camera and it works fine but now, when i click render it switches the camera back to the object/rig. not sure why, this is an animation, I don't know if that effects anything

You've bound the camera to a marker.

And the active camera is not a camera, but an object.
When you bind a camera to a marker, it becomes the active camera starting on that frame in the timeline. Binding cameras allows you to switch cameras at a certain point in the animation. But since there are no other active cameras bound to other markers, the object becomes the only camera that will be used for rendering the whole scene.
To fix it just delete the marker. Go to the frame where the marker is and Select marker > Delete Marker

From the blender manual:

Bind Camera to Markers is a special operator only available in the Timeline. The operator allows markers to be used to set the active object as the active camera.To use this operator, select the object to become the active camera and select a marker to bind the active camera to. If no marker is selected when the operator is applied, a marker will be added. When an object is bound to a marker, the marker will be renamed to the name of the active object. These markers also have a camera icon next to the left of the name to easily distinguish them from other informative markers.These markers can be moved to change the frame at which the active camera is changed to the object the marker is bound to.


How to use Clone Brush in Image Editor? I can use 3D cursor as reference point, when painting with the clone brush in the 3D viewport. But how can I use the clone brush in the image editor?

I guess I will have to use the 2D cursor as the reference point. The problem is that the 2D cursor is available in the UV editor but not in the image editor (paint mode).

Does anyone know a solution to this?

Clone Brush in the Image Editor (2D) doesn't work at all the same -you cannot use the cursor as a reference - you instead use a transfer or clone image that is the same size as the target image, and then move it about with rmb to position it and then paint through to clone. This is a VERY limited functionality, and there is no rotation of the image. For this reason, I prefer to use Stencil Brush Texture instead since we can rotate/scale/move and even set the UV to be upside down/repeating etc. Honestly, that is why it is sometimes better to just work on a 2d image plane in the 3d viewport than to waste time with the image editor for anything other than fast paint dabs or Fill tool control.


BGE - how to create a menu that pops itself up I would like to create an ingame menu which pops up after some time of player inactivity. How could I go about making something like this?

You want a menu to open after the player is inactive for a while. You can do this relatively easily. Instead of trying to detect if the player is moving, or if something is happening to the player, we can instead check to see if any input devices are being used. If not, we can make a timer increase until a certain value, when a menu will appear.

    In this logic setup, I have an always sensor with true level triggering, sending a positive pulse every tic to the property actuator "Add to Timer"
This means that every logic tic, the property "Timer" is increased by 1.
When the property "Timer" is equal to 3600, it broadcasts the message, "Open Menu" I chose the value 3600 here because by default, the BGE is set to 60 logic tics per second. 60 tics per second times 60 seconds for a minute of inactivity is 3600 tics. Now is the interesting part - I have a whole bunch of sensors connected to an "or" controller, which then assigns "Timer" to 0. I have a keyboard sensor set to all keys, and a whole bunch of mouse sensors. If any input is received from the mouse or the keyboard, the timer will reset. Only if the player is not pushing any buttons or doing anything with the mouse will the message "Open Menu" be sent.

    Of course, if you are using a different method to control your character, such as a joystick, you will need to use a joystick sensor also attached to the "or" controller. You essentially want any input that could control something in your game to also reset the timer. I am using an "or" controller because if it receives a positive pulse from any of the connected sensors, it will send a positive pulse to the connected actuators. If I used an "and" controller here, you would need to be pushing a key on the keyboard, as well as moving the mouse, clicking the left and right mouse buttons, scrolling, and pushing the middle mouse button. Using the "or" controller here, any input will reset the timer.

    This logic setup only broadcasts the message "Open Menu" once there has been 60 seconds of inactivity. You still need to make your menu, and have it open upon receiving the message "Open Menu" This as simple as using a message sensor, with the subject filled in as "Open Menu"

    You can see a working example here. While you are pressing any key or doing anything with the mouse, Suzanne will shake her head. After 60 seconds of not using the mouse or keyboard, the game will pause and the inactivity menu will open.


In game engine, all texts change color to white Before render:

After render:

The render is set to blender game. How do I fix this?

When I want add a material for a text, in first step I'm selected text then set a material color on diffuse option (like green color) for that:

but in the rendering time, this problem is occurred:

This problem only occurs to texts.

Set Object color in Properties panel > display
If you want text look similar as in the 3D view just convert the text to mesh. Alt+C > Convert to mesh


Beginner Rig Problem - Model spinning around root bone I'm not quite sure what's changed, since I didn't have this problem a half an hour ago with the same bone. Except for my "root" bone, each of my bones deforms the surrounding model correctly according to its weight paint. The root bone, however, while painted, moves or rotates the entire model when posed.

That is the expected behaviour. The root bone is the parent of every bone in your armature, by moving the root bone you are also moving every bone in your armature.

Technically it isn't moving your entire model, it is moving every armature bone that in turn moves each corresponding part of the model. This is like moving the upper arm bone and having the lower arm and hand follow along.

Often the root bone is placed at the bottom of the armature and is only moved to position the entire model. You may want to add another bone to be the root and set it as the parent to your lower spine bone.


Why are shadows not appearing? Why are my shadows not appearing? I did the lever and slight shadows appeared, but I can't figure out why the piston doesn't have any shadows..... I'm using a spot light with a ton of watts and the bg at a strength of 0.

It's not shadow but reflective object for your base:

Despite you use a lot of light source in your scene, non of them actual contribute the "different" for the piston top side.
If you want it to be a little bit more realist, add a bevel modifier to it:


Reflection of transparent object is visible I have an object in front of a mirror that i only make visible later in an animation.
Therefore, i made the object transparent, but the reflection of the object is still visible when i render it it.
I use Blender Render.
The object is transparent but the reflection is visible.
How do I make the reflection transparent as well?

Thanks!

Visibility settings in the Outliner (the little 'eye' and 'camera' icons) can be keyframed by pressing 'I' on them, so you can make your object appear at a certain frame of the animation.


Generate Curve from Motion Path of a Bone (to animate steering of a fork lift) The bone in between the front wheels is following a Bezier curve (black) and the whole mesh of the forklift (all in one object) follows. I need the motion paths of the wheels (more precice of the wheel bones) as a curve!

Reason:

I want to make the wheel bones follow that curve and point in the direction of movement (for correct steering) and further make them rotate along this curve with a driver.
I want to unparent the wheel bones from the root and move them independently on their paths but in sync with the rest of the moving mesh.

Stuff thats not working:

I already tried to make the rear wheels steer by IK constraints and a driver bone which reads information of the bezier curve in front of the forklift but that does not do the job for me, since the radii of the Bezier curves I want the bone between the front wheels to follow are to narrow/ cover a too large range of radii.
I just can not bing this script to run. Perhaps somebody can explain how I do this step by step?
Btracer addon - I could'nt figure out how to follow the path of a bone which is parentet to another bone which is following another path (wheel bone)
The Motion Trails Addon isn't maintained anymore - not working on 2.8

Please help, I'm crying. The data is there in front of my eyes but blender does not allow me to use it

My good Buddy ClockMender has an excellent tutorial on this.
\


Objects clamped to curve shift after moving or extruding the curve heres an immage to show example  (I updated the image)
https://imgur.com/a/wOY5br9
Problem:
Objects clamped to curve shift after moving or extruding the curve even tho its not supposed to do that.
Like even if the change is many extrudes away, no longer moving (or stretching) the path with the object on it, it still shifts its location drastically. I tried using all paths or curves...same outcome. :C
+ It seems to not follow paths rotation... side question.

Id be very grateful if anyone could help. Thank you!

In order to make an object follow path rotation check "follow curve" in Follow Path Constrain options.
I don't know how to prevent the object's shift when curve's shape changes.


Flipping the direction of bezier curve path for a crown molding I am trying to make a crown molding with bezier curves where I make a path along the wall, and then in Bevel object, selecting a profile of the molding that I made with another bezier curve. When I do this, it works, but is in the wrong direction. I need the molding to be facing outwards, away from the wall, rather than inwards.

For the bevel object in •[edit]• mode, see yellow arrow in image below,

Try rotating in X or Y or Z axis to see result in the final mesh.
Try 90 degrees and -90 degrees.


How would I make gun animations for guns with multiple swappable parts I would like to have weapon customization in my game but I can't figure out how to animate the parts of the gun so that they can be switched out.

Switching out parts isn't an animation issue. You would do that through code. You rig your weapon and create bones or sockets for attachments and then in game you program it so that the attachments you imported separately from the gun get snapped to the right bone or socket.


how to create metric map and metric buildings/vehicles/etc in blender? I'm going to create a metric map with scale 1000 x 1000 meters then create buildings and roads and vehicles with the same size as real world size. a project for both animation and export to unity 3D.
1. how can i create a plane with 1000x1000 meters in metric unit in blender?
2. how can i create buildings, vehicles as real size in metrics?

How to scale units from blender to unity?

Go into blender
Scene > unit presets >
change length to metric
Angles: radians
Unit scale: 1

Next, in our 3d viewport, the meters at the top left. this only means the grid space now understands metric units and tells us that the grid is measured in meters.

Not that our cube is now exactly one metric meter
It is clearly 2 metric meters

Next
Select the cube  > open “n” properties tab in the 3d view port > shift + left click drag on top of the x,y,z > set scale from 0.5 to 1

Next in
Object > Apply > scale

Notice scale is now set to ones.

Next
Export as either obj or FBX from blender > remember to name your file

Make sure only selected objects  and mesh is highlighted

Then hit export
Next
Open up unity > game object > 3d object > cube

To preview a Unity cube
Next
Import our cube by right-clicking in the empty space inside assets folder

Import new asset

Browse for the FBX file we just created

import

Left click and drag the model into the scene to compare to the Unity cube


How do you programatically set grid scale? The python tooltip says to use

bpy.data.screens["Scripting"].overlay.grid_scale = n

but that doesn't work. There are no other commands that execute when I do it manually. So it's just that command. Except when I do it programmatically it doesn't work (AttributeError: 'Screen' object has no attribute 'overlay'). This pictures sums up the problem.

The error message is trying to inform you that the property lookup <screen>.overlay was unsuccessful, because that's not where that property is located (the tooltip is misleading..) . It's something you might want to iterate through screen area.spaces to locate and set. It's a little awkward, but acceptable.

import bpy

AREA = 'VIEW_3D'

for window in bpy.context.window_manager.windows:
    for area in window.screen.areas:
        if not area.type == AREA:
            continue

        for s in area.spaces:
            if s.type == AREA:
                s.overlay.grid_scale = 2
                break

or..

import bpy
for area in bpy.data.screens["Scripting"].areas:
    if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                space.overlay.grid_scale = 2
                break


Multiple animation on one rigged character I have used blender for years (modeling/texturing), I know how to rig, but I never needed to animate anything. In the past I sometimes move bones (mostly for fun) but I don't know how to deal if I want to make different animations with the same character.

as first task, I want to make my character walking, running and waving.

(I'm using blender 2.71 on linux)

You use the action editor (a sub part of the dopesheet) to create multiple actions. An object can have one action associated with it at a time so remember to add a fake user to keep other actions.

Once you have setup multiple actions you use the NLA editor to combine and repeat a mixture of actions for the final animation.

It is also possible to use multiple blend files with linked copies of your character that each contain one animation for a shot. After each shot is rendered out you edit them together into the final video.


How do I weight paint belts and straps? I have been attempting to weight paint the straps on this particular model for quite some time but have been unsuccessful in getting it to move naturally with the armature. I have approached the problem with the following techniques but have not found one that works well yet.

Automatic weighting
Transfer weight (Transfer mesh data)
Weight Gradient
Painting by hand

The straps tend to clip through the model when the hips are rotated and do not stay with the buckle.

Below is a few pictures of the model.

Any advice on how to go about painting this or link to a tutorial would be appreciated.

I had similar problem for shoulders straps. Three points here in my experience :

Weight the buckle the same weights (uniformally)
Weight the extremities of the straps the same as the buckle
Space the next straps vertices at the first point of the cat shape they need to be "linked" to

Something like that https://gyazo.com/87bf0a45e2723b477d715645ae540be6
The idea is to keep the buckle linked to somekind of tangent point of the cat belly. And for the strap, to allow them to stretch between the buckle and the next "on skin" vertices.

Another way to obtain the result (maybe) is to shape all straps starting from the cat curves (using the knife tool probably : copy the cat and cut) so that you both keep the appropriate weights (from the cat) and also give all the good bending edges inside of the model. That can probably be easily done for the straps... but more difficult for the buckle.


Blender export point cloud to vrml I need to write e blender plugin that exports objects in VRML2 from .ply. The problem is that my objects can be either meshes, either point clouds. Exporting meshes works with the already existing plugin, but it does not correctly export point clouds: creates IndexedFaceSet in stead of PointSet node, adds some extra fields which don't apply to PointSet, etc.
So I have 2 questions:

How can I check automatically if I have a mesh or a point cloud? This is part of a bigger web service and I need to check via the code, not by ticking a box.
How do I get the color of each point? The data is not in the same place as the color information for meshes.

Thanks

EDIT
Actually after a short investigation of the .ply importer, it seems that it does not properly import. It does not read the point colors in the case of point clouds

The vrml export addon is an official addon that is developed as part of blender. You could either discuss with the blender devs on irc about improving it or submit a patch yourself to be considered for addition. Or use it as a starting point for your own script.

For 1. A mesh object that has a number of vertices and zero faces could be considered a point cloud.

import bpy
import bmesh
bm = bmesh.new()
bm.from_mesh(bpy.context.active_object.data)
numberOfVerts = len(bm.verts)
numberOfFaces = len(bm.faces)

Incorporate that into the export script as it loops through objects and export as PointSet instead of IndexedFaceSet when you have verts without faces.

For 2. blender has vertex colours, without faces that would be the only place for colour info. You will find that data in bpy.context.active_object.data.vertex_colors


How to animate hair particle growth? Can't find how to animate hair particles growing. For some reason keyframes don't work on the hair length parameter.

Set the length to the longest you want the hair to be, and then keyframe the End factor in Particles > Render > Timing:


When should I rotoscope in the compositting proces? I already made my animation and I’m going to composite it in a videoclip. I’m currently tracking the clip, but there are going to be some occlusions in front of the animation that I need to rotoscope. My question is, when in the compositting proces should I rotoscope those things? Should I do this in blender?

When to rotoscope?
Whenever you need to evaluate the integration of the video element you want to composite.
Can rotoscoping be done in blender?
Yes.
You can draw and animate masks that can be used in the compositor. Mask drawing tools are quite robust in blender, allowing you to add, subtrac or intersect different masks and layers, and it allows you to create sharp or feathered edges.
Advanced and semi-automated rotoscoping can be done by parenting masks to tracking points on the video clip editor.


Problem with bluring a light which is behind another object Good night, I have a problem on applying blur effect on the node compositer on an object which is between 2 other objects, like this:

I can't find a way to make the blur look just like the shot itself :S anyone could give me a hand? thanks :D

Finally I could fix the problem by using index pass as factor for mixing the image in the compositiing nodes. I used the original image itself and its blurred version as the inputs for the mixing.


Do procedural textures have MIP maps? I am talking about integrated textures like Clouds and node setups in general.

It is working by default or not? And can it be enabled without baking textures to images?

Procedural textures don't have MIP maps. They are calculated whenever they are needed. But if you're planning to use those textures in any other engine, you should bake them, and therefore you can create your own MIP maps.


Blender is running slow I have a 3gb RAM laptop that has a 512 Nvidia quadro fx graphics card but blender is slow (lagging) when i subdivide my sculpture to make it smooth.Does anyone know why ?

The answer is actually pretty simple, subdividing creates more edges which causes it to need better hardware. Blender simply lags because your computer is not able to handle the smoothing.


How to move two parenting objects together? When I try to move two objects together they move separatelly in a weird way, here is a GIF showing what happens.

How can I solve this?

You have Proportional editing enabled.
When you move your object, all near objects move in the same direction.

It has nothing to do with parenting.

Disable it, and all goes back to normal.


Multiple Meshes Sharing 1 UV space I have a scene made up of rows of cubes stacked on top of each other.

I want to add an image texture to all the front faces of the cube stack (the image is not seamless it is a picture).

I joined all the cubes to 1 mesh then UV unwrapped them then painstakingly aligned each front face to each other then added the image texture. All good up to this point however when I unjoin the meshes the image texture is all messed up.

What I am trying to achieve is a simulation of a wall with picture on the front been smashed by a smashing ball and the individual cubes sent flying off with there part of the image texture on it.

My question is can this be achieved & what is the best method?

Thanks in advance

You can achieve this effect by creating and texturing your wall before splitting it up into different pieces.

After you created your wall you can use the cell fracture add-on to break your wall down. For smashing your wall with a wreckingball this would create the desired effect.

For an in-depth tutorial of this method see the youtube vid made by CG Geek:
https://www.youtube.com/watch?v=XUUi2AdLtmk

Good luck.


How to Sculpt Toothpaste or Paint Coming Out of Tube? I need to create blobs of paint on a palette that look like they've been squeezed out of a tube. Here's an example:

Any suggestions on how to model those blobs of paint?

just like this using a cube with dyntopo sculpting.


Animation rotates to closest angle I am trying to create an armature animation where the character spins around, but I am having huge issues. If I rotated it from 0° to 360° on another keyframe, then it won't spin at all. If I rotate from 0° to 180°, then from 180° to 360°, the character spins to 180°, then spins backwards to where it started.
How can I make it rotate the amount I want, instead of just rotating in the direction that is closest to the current angle?

When you rotate an object visually in the 3Dview, the rotation value that is used is not always the value you expect. You can get more predictable results by entering values directly in the properties of the object, which can also be found in the properties sidebar by pressing N

When you do have trouble with direction of rotation (or movement), the graph editor shows you visually how the values are interpreted and gives you full control over the keyframed values.

In this example the rotation goes to 180 then back to 0

By adjusting the third keyframe we change it to go to 180 then to 360

You can also change the channels extrapolation (ShiftE or Channel->Extrapolation Mode) to linear and have a constant rotation with only two keyframes.


How to make all quads or ngons on your mesh planar (2d)? I want the quads in my mesh to be planar, or flat, that is, the 4 points of the quad could all be on the same plane. Or in other words, they need only x and y values to describe their "local" position.

Difficult part is if you do it to one face, the vertices shared by neighbouring faces get transformed which makes them non-planar...

Doing Mesh-> Cleanup-> Make Planar Faces on all faces doesn't work right.
Every time you apply it the mesh visibly changes. If it worked the first time it wouldn't change more than once. Besides, the non-planar quads are visible to the eye.

Reason: modelling a low polygon mesh to be converted to individual flat faces in a program called Pepakura and make into a real life sculpture from flat MDF pieces.

Each quad has to be planar ("flat") so I can build this from flat MDF pieces.

Obviously the overall shape of the mesh will change, but not much.

First thing first: How to check for non planar faces and amount of their distortion:

Second thing: How to make them planar?

There is no way to make them all planar without changing overall shape of the mesh a lot or the topology. Here is why:

To make faces planar, we need to move the vertices. So for each vertex we will see all the faces around it, get their normals, from each of these normals construct a plane and where those planes intersect store a new vertex. From all these new vertices then make a new mesh with the same topology and switch it for the old one. Very simple, but it has one catch: when a vertex has more than 3 surrounding faces, their planar intersection does not necessarily exist - it would be actually very rate if it did:

To meet them at single point, some plane translation is inevitable and depending on the angles this translation can be huge and ruin the shape of object.

So to create mesh from these intersecting planes (made from normals of faces) one would have to create a different mesh with a totally new topology, different vertex count (depending on the mesh shape) by basically chiseling a solid with these planes (would you accept this solution?).

The other solution is not exact and is an iterative approach to a solution. This solution Blender offers under Mesh > Cleanup > Make Planar Faces. We call these iterative methods to a solution Numerical methods. Each numeric method (which is an algorithm) has it's stability. Making faces planar is in general a very unstable algorithm. You may find your mesh oscillating between different shapes never closing on a solution or vertices getting very far from their original location sliding away to infinity - also never closing on a solution. What will happen depends on the mesh shape and you may actually find meshes that this approach solves and converges to a single solution.

But usually it's best to apply this operator not on the entire mesh, but only to selected parts that you know will solve. That's also why the operator has limited iterations to 200 - if it does not converge in that many steps it's very unlikely it will converge in more.

So to make a mesh from planar faces one must start from the beginning:

Use the Bisect tool to make planar cuts.
Use the F2 Addon to make planar faces:

Rotate faces around edges to keep them planar: What's the easiest way to rotate around an edge that is not parallel to a primary axis?
Slide vertices on edges Shift V to maintain planar face (C to extend outside face)


Funky Shading After Boolean So I just recently started with Blender 2.8. I'm working on a model and had a place where I needed to have a cylinder blend into a curved surface. I use booleans to merge the two meshes, and created a bevel where they intersected. However as you can see, I'm not getting some bizarre shading on the curved surface:

Here is the wireframe:

I do have a Weighted Normal modifier already applied. If I switch to flat shading, the artifacts disappear, however I need the surface to appear smooth. If at all possible I'm trying to avoid adding extra edges and geometry.

Autosmoothing is turned on, and an Edge Split modifier will not work for this application. It's occurring on a curved surface, so setting it to flat shading will also not work.

A sample of the problem area is here:

It looks like it's both a topology and a Weighted Normal modifier problem:

You should avoid tris if they are twisted and stretched, so you should correct your topology with quads.
I don't know a lot about Weighted Normal modifier, here is an explanation by Cgslav on how it works, it looks like it's mainly made for bevel, I'm not sure it's made to fake a smooth shape like yours, rather use Subdivision Surface if you can, or add a bit of geometry?


Fluid, object, childof constraint animation - won't work See this video for project example

It's a simple project. I'm trying to create a fluid simulation flow out of a cylinder, but the cylinder has a "childof" constraint, paired to the cube above it. The cylinder moves, but the fluid simulation does not; it stays in the "actual" position of the cylinder.

Is there a way I can accomplish having the fluid simulation follow the cylinder, even with a childof constraint? Or is there some other way to accomplish this task?

(Using Blender 2.75a)

This is a limitation of how blender works, constraints are the last step to placing an object, which means the fluid sim will never see the inflow object in the constrained location.

The way to get this working is to bake the animation into keyframes for the inflow object then remove the constraint. Object->Animation->Bake Action... will do this for you.

You want to turn on visual keying so that you get the location after the constraint is applied.


Boolean intersect two 2d extruded bezier curves (non destructive) I understand that the boolean modifier is not available for bezier curves that are 2d and have been extruded.

However, is there a way to apply a simple "conventional mesh" modifier to this curve and then stack on top of that a boolean modifier?

Basically, I want to boolean intersect two 3d object in Blender, these objects are both 2d bezier curves that have been extruded to give them a 3d shape.

EDIT: I really need to use non destructive actions on these objects.

EDIT 2: I am very surprised there are no modifiers in Blender that simulate alt-c, Mesh from Curve for these types of purposes.

Well I found some time to try and code an add-on that will do what I think you are talking about. It is found here, or on this thread. To use:

Install

Add Curve, and Bevel

Add a mesh object like a cube

Go to the modifiers tab and select the curve's name under the Curve Conversion part

Click Update Mesh

What it does is automatically converts the curve to a mesh and replaces the current objects data. It will respect any materials or modifiers added before you press Update Mesh. The Respect Scale option copies the scale from the curve. So if you scale the curve up the mesh object does the same.
Let me know if this is what you were talking about.
EDIT: Check Blender Artist thread to get updated instructions as they come


Use skybox texture as world texture I have skybox texture which is a cubemap. Something like this:

Is there is any way to use such texture as world texture? It I just use this texture for world I get bad result:

Skyboxes are used on cubes tracking your camera's position. Then, with a little compositing, you render your scene and superimpose it over the skybox image. That's how you make it a world texture.

Attached is a way I work with skyboxes. I make the cube really small, barely larger than the camera. If I'm working on the scene in Render view, I hide the skybox by unchecking its eye in the Outliner panel. If I want to see the scene in context with the skybox, I scale up the skybox to surround most of the scene.

The thing is: it doesn't matter what size the skybox is, because if you check out the compositor, the scene and the skybox are rendered separately, and scale doesn't change the camera's perspective of the skybox.

To fly around the scene, select the skybox and scale it encompass the  4 objects in this scene. Then select the camera and go into camera view. Select Render view, and hit shift-F. You're now in fly mode. Use your mouse to turn and your WASD keys to move (shift to accelerate). The box moves with the camera, but doesn't rotate with the camera (check out the constraints).


Rice meme simulation I am trying to simulate the "rice challenge" that is the latest meme with them kids, see this youtube video for a fun example.
This is my best result so far:
  (Video: https://i.imgur.com/KxlzB84.mp4)
which isn't quite there yet.
Any general advice on how to approach this? A particle system is the obvious solution but I'm struggling to make it work.

here the "long story short" - so i assume you have some experience with BLender.

make a text

convert to mesh

remesh modifier

add particles, tweak some settings

add plane with collision, tweak some settings

rotate text mesh so that is lies horizontal on the plane

animate the plane with location movement to positive z axis and some rotation on x axis

enjoy your rice challenge animation

Result: https://youtu.be/wAtmM0UhLQo
Video tutorial: https://youtu.be/sz-6LapA_yk


Is it possible to paint only on selected vertices in vertex paint? I'm trying to add some fake shading to a model in vertex paint mode, but I'm having trouble because some parts of the mesh hide the vertices I'm trying to paint. Ideally, since I'm painting the same colour on all vertices, I'd like to select all the vertices in edit mode, and then use the fill tool (shift+k) to assign the colour to only the selected vertices.

I searched on the internet for any kind of masking in vertex paint mode, and there appears to be something called "Face Selection Mask", but this info was from an old forum thread, and doesn't seem to exist in Blender 2.74. The ability to paint or fill only the selection would be extremely helpful.

Face selection masking is available in the 3D header when in 'Vertex Paint' mode:

Because this works on faces you will only be able to paint vertices that make up a face, individual vertices or edges won't be filled.

Select the vertices you want to paint on in edit mode.
Change to 'Vertex Paint' mode.
Enable 'Face selection masking' in the 3D header. There will now be a dotted line around the selected faces.
Press Shift+K to fill the selection with the desired colours.


How can I make an object only visible through certain material Hi I am trying to make a certain object only visible through another object with transparent material

lets say object named car and the other object named glass i can see the car if i look through glass but i can't see the car otherwise like looking through another glass or looking to car directly only looking through that glass shows me the car

Basically Masking object's material transparency to another material

Example Image

How can i achieve this?
Any help is appreciated

Here is what i found with similar effect but only works with grease pencil

Here is what i found with similar effect but works for every glass material

I am new here so if i asked my question at the wrong place please correct me

It depends on your scene and what you need but you could use Light Paths node to make some condition that only one of your glass objects meet. For example you could have two glass planes, but one has another plane in front of it that has a transparent shader:

You can see the visibility of the orange shader is controlled by Light Paths node's transparency depth output that is 0 when we look through glass, but becomes 1 when there is a plane with transparent shader in front of that glass. You can see what happens if I move the transparent plane.


Is there a way to split an object by vertex index? I used umodel to rip models from an unreal engine game. However, it put a lot of meshes in one object. So, I have a black hole of 22k verts that all belong to like 40+ items. The good thing, is that the items can be separated by vertex index. Like, verts 0-277 are a model, verts 278-569 are a model. Is there a way I can split a model based on vertex indexes?

Try to use P -> By Loose Parts in edit mode. This operation separates vertexes that connected to each outer by edges.


Cycles Emit Light from area on Texture So I have a giant object that is completely uv unwrapped. I would like to make areas of the object with a specific area of texture emit light.

The problem is that this object (and it is only one object) only has one material. I would like the lava to emit light, but I cannot move it to a separate material without breaking something.

I'd like to find a method where I can select a part of the texture and tell blender that whatever has that part of the texture emits light.

Is this possible?

Thanks.

Creating B/W Material Texture Masks in Photoshop (and GIMP)

Using Black and White (B/W) Texture Masks allow you to assign different types of materials to different parts of an object's surface via a 2D Image Texture, rather than selecting which faces and vertices of a Mesh you want a specific Material to apply to, and assigning it to them in that way. This gives you the benefit of a much higher degree of accuracy and customisability, which you wouldn't normally have when manually assigning materials.

There are several ways you can do this, such as using Procedural Noise Textures inside of Blender, however for more customisation and for trickier textures I've found that using External software like Photoshop or GIMP to produce the best results in a short amount of time! :)

This is essentially the process we'll be taking here. Starting with the Original Texture, we'll create a B/W Texture Mask, and then use it when adding a basic Diffuse/Emission Material to an object inside of Blender.

Creating a Mask Using Photoshop

1. Begin by opening up the base texture in Photoshop.

2. Add in 2 New layers above the base texture, for sake of clarity I've called them 'Black Background' and 'White Foreground'. :)

3. Using the Magic Wand selection tool from the Toolshelf on the right, and with this Base Layer selected (and unlocked), click the area of colour that you want a new material to be assigned to in Blender. In this case we'll select the Orange Lava colour. If the results are not how you want, press Ctrl+D to deselect the selection, adjust the Tolerance, and check Anti-Alias, before reselecting. This will help Photoshop refine and find all of the orange colour up to the edges of the Lava, and the selection will be smooth and non-jittery. You can also Grow the selection slightly if need be by going Select > Modify > Expand.

4. With the marching ant selection still active, select the 'White Foreground' layer, and grab the Brush tool from the toolshelf. Change the Foreground Colour to White and paint across the area inside of the ant selection. You shouldn't be able to see any of the Orange colour inside of the selection after painting.

5. Change the Foreground Colour to Black and hit Ctrl+D to deselect the ant selection. Select the 'Black Background' layer and grab the Paint Bucket Tool from the toolshelf. Use the tool to make this entire layer black.

And there you have it, the B/W Texture Mask created in Photoshop. Save it out as a .PNG and you'll be ready to skip down to the Blender section below! :D

Creating a Mask using GIMP

The steps in GIMP are essentially the same as in Photoshop, however there are slight differences in some of the tools have different names, and hotkeys are varied.

1. Begin by importing the Base Texture and adding in the 2 Layers above it as we did in Photoshop.

2. With the Base Texture layer selected, grab the Magic Wand tool, check Antialiasing and adjust the Threshold as necessary to so that all of the Orange Lava colour is selected when clicked. Adjusting this process is actually slightly easier in GIMP than Photoshop, as you do not need to deselect the marching ants selection each time, after adjusting the tolerance, you can simply re-click for an instant update! :)

3. With the Foreground Colour set to white, and the 'White Foreground' layer selected, use the Paintbrush Tool to fill in the ants selection completely.

4. Finally press Ctrl+Shift+A to deselect the ant selection. Change the Foreground Colour to Black and with the 'Black Background Layer' selected, use the Paint Bucket Tool to fill it with a solid black.

And there you have the very (far too ;) ) similar way of creating the B/W Texture Mask using GIMP. GIMP's way of saving is a bit more of a hassle than Photoshop's- you have to export it as a .PNG, rather than saving and changing the file type. Go File > Export to do this! :)

Using the Texture Mask to Affect Materials Inside of Blender

Whichever software you used to get here, you now have the original Base Texture, as well as the B/W Texture Mask. Read on to find out how to use these in Blender... ;)

1. Jumping into Blender, for the sake of demonstration, I've set up a simple Sun Lamp and Orthographic Camera scene, and imported the Base Texture by using Shift+A > Mesh > Images as Planes. This will add the Texture into a simple material applied to the plain, with an Image Texture node plugged into a Diffuse BSDF. You can preview how this looks in Textured or Rendered Viewport Mode.

2. To begin, we'll mix together the Diffuse BSDF shader, with an Emission shader, via a Mix Shader Node. We can set the Emission Strength to 3.000.

3. Finally, add in another Image Texture node and open up the B/W Texture Mask. Plug the Colour output of this node into the Fac input of the Mix Shader. This will make all of the Black Values of the Mask correspond to the Top Mix Shader Input, and the White Values of the Mask correspond to the Bottom Mix Shader Input. If anything funky happens just add an Invert node, or flip the top and bottom Mix Shader inputs! :)

And we've reached the conclusion! A VERY simple end node setup for an insanely useful, and widely applicable process! :D

Hope it helps!! :)


Converting Particles to Mesh not working (Blender 2.8) I added some grass particles on a plane and want to turn it into a mesh.

When I press the convert button in the Add Modifier menu, nothing happens. Does anyone have an idea how to fix this?

I am working in Blender 2.8 for now.

In Blender 2.79,

After converting the particles to mesh,

You need to Click on the Plane and go back to Particle Tab and remove the Particles on the Plane.

This can also be helpful in 2.8


Particle System (Hair) - Rendered objects appears rotated/ off place I was working on creating a grass plane and during the process of creating it, I made a plane on which the particle system was to be applied and an object - grass blade which is to be dispersed on the plane. I created a small number of varied grass blades and joined them. Upon choosing the group of grass blades ad the hair emission object of the plane, the result appears to be: the grass blades spawn half on one side and the other half on the other side (shown in the picture) and the grass blades sometimes seem to lay horizontally on the plane rather than vertically. The grass blades also overflow the borders of the plane as shown in the picture.
best,
Jassim

You need to select the mesh you are using as hair, go to edit mode, and rotate / move till the floor emits the hairs in the correct position.


Custom NodeTree and NodeCustomGroup and bpy.ops.node.tree_path_parent() I've done a fair amount of custom PyNode tree scripting for Sverchok, but one thing remains a bit nebulous and i'm hoping someone can shed some light.

The Material node trees have this Group feature which turns the background green and enables an operator on the header to call bpy.ops.node.tree_path_parent() to go to the parent node tree.

The poll / execute code for bpy.ops.node.tree_path_parent() is (...full code link)

@classmethod
def poll(cls, context):
    space = context.space_data
    # needs active node editor and a tree
    return (space.type == 'NODE_EDITOR' and len(space.path) > 1)

def execute(self, context):
    space = context.space_data
    space.path.pop()
    return {'FINISHED'}

For a NodeGroup of ShaderNodeTree space.path becomes a collection of 2 paths.

<bpy_collection[2], SpaceNodeEditorPath>
--- <bpy_struct, ShaderNodeTree("Shader Nodetree")>
--- <bpy_struct, ShaderNodeTree("NodeGroup")>

My simple attempt at declaring a NodeCustomGroup has some superficial success.
My question is how / where can I set the space.path so there's something to .pop(), -- somewhere in the init of the custom node?

excerpt full code here:

class SvGroupNodeExp(bpy.types.NodeCustomGroup, SverchCustomTreeNode):
    bl_idname = 'SvGroupNodeExp'
    bl_label = 'Group Exp'
    bl_icon = 'OUTLINER_OB_EMPTY'

    group_name = StringProperty()

    def init(self, context):

        self.node_tree = bpy.data.node_groups.new('nooobgroup', 'SverchCustomTreeType')
        self.group_name = self.node_tree.name
        # self.node_tree.parent = self
        # space = context.space_data
        nodes = self.node_tree.nodes

        inputnode = nodes.new('SvGroupInputsNode')
        outputnode = nodes.new('SvGroupOutputsNode')
        inputnode.location = (-300, 0)
        outputnode.location = (300, 0)

I'm not sure how useful this is to people (see a sverchok branch which implements this). I'll provide this as answer to my question, because that's what it does -- whether or not this allows for a functional custom node_tree group implementation is still up in the air.

It seems the way to get the node.tree_path_parent to poll True is to repopulate the context.space_data.path with the parent tree at index 0 and the new group node (a tree under the hood) at index 1.

def group_make(self, new_group_name):
    self.node_tree = bpy.data.node_groups.new(new_group_name, 'SverchCustomTreeType')
    self.group_name = self.node_tree.name

    nodes = self.node_tree.nodes
    inputnode = nodes.new('SvGroupInputsNode')
    outputnode = nodes.new('SvGroupOutputsNode')
    inputnode.location = (-300, 0)
    outputnode.location = (300, 0)
    return self.node_tree

class SvGroupEdit(bpy.types.Operator):
    bl_idname = "node.sv_group_edit"
    bl_label = "edits an sv group"

    group_name = StringProperty()

    def execute(self, context):
        node = context.node
        ng = bpy.data.node_groups

        group_node = ng.get(self.group_name)
        if not group_node:
            group_node = group_make(node, new_group_name=self.group_name)

        bpy.ops.node.sv_switch_layout(layout_name=self.group_name)
        # context.space_data.node_tree = ng[self.group_name]  # does the same

        # by switching, space_data is now different
        parent_tree_name = node.id_data.name
        path = context.space_data.path
        path.clear()
        path.append(ng[parent_tree_name]) # below the green opacity layer
        path.append(ng[self.group_name])  # top level

        return {"FINISHED"}

However, when hitting the back button (tree_path_parent) the active node_tree isn't set. Why? I suspect it's due to using .clear() instead of .pop() and some loss of information. This means we need to roll our own version of tree_path_parent, to switch the node_tree and then set the context.space_data.node_tree to the desired parent tree.

Something like:

class SvTreePathParent(bpy.types.Operator):
    '''Go to parent node tree'''
    bl_idname = "node.sv_tree_path_parent"
    bl_label = "Parent Sv Node Tree"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):
        space = context.space_data
        return space.type == 'NODE_EDITOR' and len(space.path) > 1

    def execute(self, context):
        space = context.space_data
        space.path.pop()
        context.space_data.node_tree = space.path[0].node_tree
        return {'FINISHED'}

Bottom left in the screenshot i prepended the operator button for node.sv_tree_path_parent.


image does not render in blender 2.8 I've just passed the point where I'm no longer a total blender-newbie.

One of the most important lessons I've learned is that if something appears not to work, it's probably because there's a setting somewhere, in some panel that needs to be tweaked.

Now I'm trying out blender 2.8, and since I mainly do 2d-like animations of 3D objects (motion graphics style) - that's the first I test.

I notice that the addon "images as planes" is pre-installed and pre-enabled, but I have no menu-item 'images as plane' in the 'add' menu nor in the import menu.

Instead I try simply dragging an image in to the 2d-animation workspace, and yeah - it works!

I see my image - I don't know what kind of object it is, it seems like it may be a new kind of object called 'image' rather than a simple 'plane'-mesh with an image-texture/material - but I'm not quite sure.

However when I render - the image is not there. I've tried to add a simple cube next to the image, no texture, no material, just the cube, and the cube is rendered, the image is not.

I'm thinking "well at least they didn't take the mystery out of it" :)

So the very simple question is this:

How do I get that image to render?

UPDATE:

I just realised that the added image is of type 'empty' - so it will never render. That answers my question ... I guess

When dragging an image from a folder to the 2D-anim workspace, an empty with the image is created. This will never render, and is probably meant as an reference-image.

Use "images as planes" instead. If the menu-items are not there (that was my problem) then disable and re-enable the addon "images as planes"

Open userpreferences->addons
Find "images as planes"
Disable it - enable it
Menu-entries are now under "file->import" and "add->images"


How to combine large scale and small scale in one project I want to animate a space scene of stations and ships in the orbit of Mars.
I thought about two ways to do this:

Planet as a rendered picture on the World texture
I cannot make this to work as the picture is deformed - not suitable for a proper skybox. I tried texture mapping.

Actual Planet as a large (cubic) sphere
Either the mesh become too large (artifacts on surface when zooming out) or the planet still looks too small.
I will also try to move the Planet together with the camera to make it look static/large by connecting the coords. Have just to pay attention to shadows and mesh "collision".

Are there any general ideas on how to approach? I will post pictures or even the scene later on today.
I am quite inexperienced. Using blender 2.9+
Thank you in advance.

If you just want Mars to be a static background, you could create a HDRI image as explained in this video. You basically render a equirectangular version of your scene and use it as the background in your second scene. Note that you have to switch to Cycles, a step not mentioned in the video.


How can I merge these faces more efficiently? I'm trying to get a flat outside ring on this modified sphere for a 3d printing project. Currently I'm selected 3 faces at a time and then Delete (x) > Dissolve Faces (s). I don't mind the manual process but I would like to evolve my process for future use.

I'm trying to flatten this new faces to have a flat outer ring similar to an ibuprofen pill.

Either follow Shady Puck's technique or simply use Collapse Edge Loops operator

In Edge Selection mode use by default Alt + Mouse Select to select a full edge loop, then press X > Edge Loops


Why do my particles grow outside the density vertex group? I made a particle hair system and a vertex group for control its density, but it doesn't seem to have any influence.
as you can see in the picture, hairs grow everywhere. I checked if I weight paint the same texture as I use and I don't know, what other reason this could have. I also noticed, that if i add interpolated (doesn't change anything if it is simple children) children, everything works all right, but not in particle edit mode. I tried rendering it and the rendered image doesn't have any hair outside the density group.

One vertex group.

The other vertex group.

If you have multiple vertex group make sure you are viewing and editing the correct one.

Also make sure your blue color is exactly blue.  Paint it again to be sure.  Zoom in from different rotation angles for nooks and cranies.  Rotate the model so you are always facing the mesh face directly while painting.  Delete the vertex group, create it again, and use the new name in the Particle System.


Fill the volume area of a bounding box with a grouping of individual meshes I asked how to fill a volumn area with a hexagon. over here: Fill the volume area of one mesh with another mesh

This was marked as a duplicate, and pointed to a solution.
https://blender.stackexchange.com/a/80721/39530
I edited my question to reflect the original solution didn't work for me.

Proposed solution doesn't work for a hexagon. The rigidbodies never settle in the animation.

So I am asking again as the edited question that it is marked as duplicate isn't being viewed.

I would like to know if it is possible to fill a mesh, using it as a bounds area to then fill it entirely with a polygon(the shape) mesh.

The idea is I’ve blocked out a level design. But i want my level to be all hexagons(the shape) just like Vavle’s the lab archery level.

I have made various block sections of the level and now want to make it look like the section is made up of multiple individual hexagon meshes. So I want them all touching but would still like to modify them individually. For example I am wanting to add details to the outside hexagon meshes.

So if the rigidbody doesn't work, is there a rubber stamp solution? I would make a group of hexagons stamp them in a area. I would want each mesh to snap edges to a its neighbor if it's the same type of object.

How to use the particle emitter to create hexagonal fills.

Create a Cylinder with 6 sides as your Hexagon and define a Plane as the level shape. (I did try this with a 3D mesh but it is a bit more tricky to get everything lined up).

Add an Emitter and set the Object to be your Cylinder and the size to 0.5

Set the Emitter End to 1(so everything is done in frame 1) the Emit From to Faces and Grid, then you can check the box Hexagonal Grid. The Resolution needs to be tweaked here to get the fit of hexagons correct.

Then on the Modifiers panel click Convert to make the particles real.

and you can delete the original Plane and source Cylinder and manipulate the individual Cylinders.


Can't try Blender 2.8 due graphic card and/or driver this post may seem repetitive but among many with this kind of issue none of them can help me.
I already updated both drivers (Intel and Radeon) and BIOS, installed Radeon ProRender + libraries and still got the problem.
I checked about both Radeon 520 and Intel UHD 620 and they support openGL 3.3.
Intel driver is already disable here to don't et it create any conflict.
Please, I don't know what else I can do.

Sorry guys, just found the solution. In my case, Blender runs just after a complete uninstall (disabling not enough) of Intel driver.


Assigned Materials Show Up in Render Preview but Not Final Render Blender Version 2.77
I’ve been working on a render of a lightbulb recently and I have been having troubles with material slots.
I have the materials shows below assigned to certain vertex groups that I selected and then hit the assign button in edit mode to assign the material. Note: I have no textures, only materials.

So the main problem though is the materials that I assigned not showing up in final render. It shows the assigned materials in render preview and the material view but never the final render.
Here is render preview:

Here is the final render:

As shown above the render preview shows the assigned materials while the final render shows only the first material slot. Also remember that there is no textures and I have made sure that the correct faces are assigned as well as all nodes are connected.
Object screen:

I can provide more information if necessary.

It look more that your material isn't doing what you want it to do, as opposed to being improperly assigned. Look on your render properties tab, and see how you're telling blender to handle transparency. You might need one or more of the following:

--More transmission bounces. This lets the ray bounce around a few more times (in this case, through a few more surfaces) before giving a result back to the render engine. If it's set pretty low, you can end up with fairly opaque materials, because you have to bounce it through its surfaces (front AND back) and return through the same way to the camera. I'd recommend at least four more bounces than your minimum bounce number, but twice as many as your highest bounce is ideal. If you're trying to make less-noisy glass (my heart goes out to you friend) try increasing clamp indirect, instead, or play with the Light Path node in your material.

--More render samples. This is in the same vein as above, but it's important to note the maximum value should be your highest bounce number, and your minimum value should be your lowest bounce number. If your preview bounces are higher, this could be exactly your problem. Preview is what you see in render view in the viewport and Final is what you see when you hit the Render button. They don't have any bearing on each other, and can be totally different. Your Final value should be at least as high as your highest bounce for best results, but you actually can get away with less in most cases; you'll have to play around with it to see what works for your scene.

--Enable or adjust transparency. Sometimes, for some reason, this isn't checked. I assume for performance reasons, as it can be computationally expensive in many cases. If you can't find it, look for a collapsed menu that says 'shading'. You'll want Ratrace selected, and your alpha slider anything greater than zero. I'm not sure if this specifically was only a Blender Internal option. You might not have all of those settings, but transparency should still have it's own section or subsection. The main point is to make sure you're not using the world material for your transparency mixing.

Alternate things to look into:

--Check your material settings. Make sure your material is doing what you want it to do. It could be that it's a little too reflective, and all the light is bouncing off instead of passing through. You can adjust this by mixing in a Transparent node, with Layer Weight as a mix factor (you'll want the transparency plugged into the top slot, and I find while Fresnel gives more accurate results, Facing is more visually appealing).

--Adjust your lighting. I'd say easily eight times out of ten, if your render isn't looking right, it's because your lighting is off. From the look of your render, the light is shining directly onto the lightbulb. Because of the way Blender calculates Fresnel, which is automatically included in the Glass node, anywhere light shines directly onto something is going to be less transparent. Simply changing the position so it's on a different angle than the camera could very well improve your results. This includes the light coming from the filament. The filament should be brighter than any other lightsource, if you want it to be on.

--Thicken your glass. Instead of making it a single solid shape, make it a shell. That is, with visible thickness. This will make the glass the thin shell you're trying to tell Blender to render, instead of the thick solid mass it thinks you want. I don't remember when the thickness modifier showed up, but this is perfect for this task, and it'll save you a few vertices. If you don't have the thickness modifier, or just don't want to use it, copy your glass vertices, shrink them slightly (ALT + S is best for this kind of object) until it's the thickness you want, then flip the normals via the tool panel. There should be an option on the tool shelf, but if there's not, searching 'flip normals' will bring it right up for you.

--Adjust your environment. Give your lights more places to bounce off. As it stands, you have the lightbulb and your plane. This isn't enough for the resutls you want to achieve. Make a cube or sphere around your scene just big enough for your camera, lighting, and objects. Make sure the normals are pointed inwards. If you want it invisible, don't make it transparent, the rays will just go right on through. Either use a Holdout node, which will make it like a hole to see the world background, or mix in a Transparent node with your original texture and plug Camera Ray (on the Light Path input node) into the mix factor. This will make it invisible to the direct camera rays, but allow light to bounce off for things like reflections and indirect lighting. Your nontransparent material for this can be anything opaque, but rougher object will bounce softer light than smooth objects, and brighter colors will bounce more light than darker ones.

I hope this helps! Happy Blending!


Why is this object reflective only in Blender? I'm having some trouble with a material.
While my project was created with an OpenGL normal map format, the export setting I used in Substance Painter was a DirectX-centric template. I've since made several manual edits to my texture maps in Photoshop. I've fixed this by inverting the green channel on the normal map using an RGB curve node in Blender.

Unfortunately, the problem persists. The model appears to have a certain shininess to it. This is only apparent in Blender, and not Substance Painter or Sketchfab.

I've tried changing the normal map node from tangent space to object space, but that only seemed to have amplified the issue.

Does anyone know what's causing this? Thanks in advance!
Update: This doesn't appear to be an issue with the normal map, as it still happens even without anything plugged into the "Normal" part of the Principled BSDF node.
https://imgur.com/a/bYRKKgw
When I switch over to Cycles and change to rendered view, it works as it should, albeit appearing a bit more sharp.

Try converting your Normal Map using the method below, as opposed to using RGB Curves. As far as I know, this is the preferred method to do DX to OpenGL conversion. If it doesn't work, let me know and I'll delete this answer:


animation nodes random color setup not working I am trying to replicate the effect of random colors from this setup using set vertex color node:

but my setup is not working, it just changes the color of the original object:

Found a solution but it only works in the render view.

Inside the cycles material I just had to plug the vertex color in the color on the material using the attribute node (input/attribute) and it works!!!


How to slide geometry past an edge? I am trying to slide a bunch of selected edges past an edge, as is done at 19:27 of the blender guru tutorial on "how to make a beer".

AltRMB to select the edge loop
Press G twice
Move the mouse cursor up and down, while holding Alt

The edges only move down and also along the plane in which the circular loop resides (imagine for instance the top of the cylinder being the loop, and I'm trying to slide the edges to form a concavity in the cylinder)

I want the edges to move past the vertex loop.. Can someone help me?

With the vertices selected, press ShiftV to ensure that you are vertex sliding, not edge sliding. Pressing GG automatically picks between the two operators based on the selection, and you cannot edge slide geometry past adjacent edge loops (you can with vertex slide though).

Once you are in the vertex slide operator, press C to disable clamp (or hold Alt).

Note that disabling clamp locks the selected vertices to the edges which they are sliding on when you press C or Alt.

However in this particular situation I think GZ is a faster method, as mentioned by G.Rassovsky.


Candle stand modeling question How to model this stand? I've tried to use curve, but it doesn't look right.

Edit: Probably much easier since 2.8 with the new Mirror "Bisect" option
Former answer:

Create a cylinder (12 vertices), put its origin to its bottom.
Duplicate it with a shiftDenter.
Rotate the copy 120° on the Y axis (or whatever angle).
Duplicate the second cylinder and rotate it 120° on the Z axis.
Again create a fourth cylinder and rotate it 120°.
Now use some Boolean modifiers to merge these 4 cylinder.
Remove doubles to make the final object clean. You should not have any vertices inside your mesh but if it happened just delete them.


'Grid-like' diagonal sculpting? I'm new to sculpting in blender and I've came across this problem where any diagonal sculpt that I add to my cylinder looks 'grid-like'. However, horizontal and vertical sculpts are fine. I've tried to find solutions online but seemed few have discussing about this issue. Is there a way to make the diagonal sculpt smoother? The cylinder was divided 6 times up to a few million polycounts already. Any help is appreciated.

Try enabling Dyntopo and turning the Detail down. Dyntopo adds geometry as you sculpt, and lower detail means smaller pieces of geometry, hence more detailed. In the image below, the bulge to the lower right has the default level of 12.00, 5the one to the upper right has 0.50 and the one to the left has 2.00.


Paste X flipped post not working correctly I have made a character in blender and rigged it and happy with it. But for animation, I find that Paste x flipped pose is very much necessary for various animations like walk cycle, run cycle, etc. I named all the bones with the correct suffix ('.L' and '.R'). Paste x flipped pose works, but not as I am expecting. Where could I be wrong in rigging?

Every bone .L should have a bone roll value equal and negative to the corresponding .R.
Set a front ortographic view, select the armature, Ctrl A (Apply rotation and scale), go to edit mode, select all bones, Shift N (recalculate roll - view axis).
This procedure will make the flip pose possible, but it will break all the previously done animations.


3d manipulators and hotkeys When it comes to scale, rotation, move, there are two display modes:

One that doesn't show 3D manipulators
One that shows manipulators.

You are in that second mode, say your are in scale mode, with your scale manipulators visible that you are able to grab, it you hit hotkey R to rotate, you can rotate but it doesn't change the (scale) manipulators to rotation manipulators, to do so you have to click on the button down bellow.

It would be nice that if you hit hotkey G (move), R (rotate), S (scale), it changes the manipulators accordingly. Would this be possible?

I don't think such option exists (unless you'll do some scripting). The solution for you may be making all the manipulators visible. Enable all of them clicking on the manipulators icons with Shift+LMB.


Generate video sequencer project from a script I have a number of different MP4 files. I want to create a Blender project file that has these files in a set order and each video stream starting at a set start time.

I know the files, I know the order and I know the start time I would like. Can I use a script that generates this project file or a script to setup Blender to then save as a project file?

I use the following script to import my mts video files into a new project.

Use it like: blender --factory-startup --python script.py -- --save="path\project.blend" -m="folder_with_mts_files_relative_to_blend_file" -n="optional_second_folder".

It imports a "Textmarken.txt" (Audacity Text Labels) as well if existing and sets up the view in Blender as well as some Video Properties for my project as I need them. It should help you well to see what's possible and adapt it to your needs. It most likely does more than what you want to achieve, but it will for sure guide you into a proper way...

import bpy
import os
bpy.context.user_preferences.view.show_splash = False
channel = 1

def read_labels_data(filepath):
    f = open(filepath, 'r', encoding='utf-8')
    data = f.readlines()
    data = [w.replace(',', '.') for w in data]
    f.close()

    scene = bpy.context.scene
    default_frame = scene.frame_current

    override = {'region': bpy.context.window_manager.windows[0].screen.areas[2].regions[0], 'blend_data': bpy.context.blend_data, 'scene': bpy.data.scenes['Scene'], 'window': bpy.context.window_manager.windows[0], 'screen': bpy.data.screens['Video Editing'], 'area': bpy.data.screens['Video Editing'].areas[1]}

    bpy.data.screens['Video Editing'].areas[1].type = ('TIMELINE')

    print('---Import Audacity Labels to Timeline Markers---')
    for i in range(0, len(data)):
        seconds = data[i].split()
        frame = bpy.utils.time_to_frame(float(seconds[0]), fps=None, fps_base=None)
        scene.frame_current = (frame)
        bpy.ops.marker.add(override)

    bpy.ops.marker.select_all(override, action='TOGGLE')
    scene.frame_current = default_frame

    return {'FINISHED'}

def import_function(save_path, mts_path1, mts_path2):
    scene = bpy.context.scene
    base_path = os.path.split(save_path)[0]

    # Clear existing objects.
    scene.camera = None
    for obj in scene.objects:
        scene.objects.unlink(obj)

    if save_path:
        save_path = os.path.abspath(save_path)
        try:
            f = open(save_path, 'w')
            f.close()
            ok = True
        except:
            print("Cannot save to path %r" % save_path)
            import traceback
            traceback.print_exc()
        if ok:
            bpy.ops.wm.save_as_mainfile(filepath=save_path)

    # Set up GUI - open screen "Video Editing"
    bpy.ops.screen.screen_set(delta=1)
    bpy.ops.screen.screen_set(delta=1)
    bpy.ops.screen.screen_set(delta=1)
    bpy.ops.screen.screen_set(delta=1)
    bpy.ops.screen.screen_set(delta=1)
    #bpy.data.screens['Video Editing'].areas[0].type = 'INFO'
    #bpy.data.screens['Video Editing'].areas[1].type = 'TIMELINE'
    #bpy.data.screens['Video Editing'].areas[2].type = 'SEQUENCE_EDITOR'
    # Change Graph-Editor into Properties:
    bpy.data.screens['Video Editing'].areas[3].type = 'PROPERTIES'
    #bpy.data.screens['Video Editing'].areas[4].type = 'SEQUENCE_EDITOR'

    # PROPERTIES - Area
    override = {'region': bpy.context.window_manager.windows[0].screen.areas[2].regions[0], 'blend_data': bpy.context.blend_data, 'scene': bpy.data.scenes['Scene'], 'window': bpy.context.window_manager.windows[0], 'screen': bpy.data.screens['Video Editing'], 'area': bpy.data.screens['Video Editing'].areas[3]}
    presets   = bpy.utils.script_paths()[1] + "\\presets"

    # Set Video-Properties
    bpy.ops.script.python_file_run(override, filepath= presets + "\\render\\HDTV_720p.py")
    #bpy.context.scene.render.resolution_percentage = 100
    bpy.ops.script.python_file_run(override, filepath= presets + "\\framerate\\25.py")
    bpy.context.scene.render.antialiasing_samples = '16'
    bpy.context.scene.render.filepath = "//out"
    bpy.data.scenes['Scene'].render.image_settings.file_format = 'H264'
    bpy.data.scenes['Scene'].render.image_settings.color_mode = 'RGB'
    bpy.ops.script.python_file_run(override, filepath= presets + "\\ffmpeg\\h264.py")
    bpy.data.scenes['Scene'].render.ffmpeg.use_lossless_output = False
    bpy.data.scenes['Scene'].render.ffmpeg.video_bitrate = 4500
    bpy.data.scenes['Scene'].render.ffmpeg.gopsize = 25
    bpy.data.scenes['Scene'].render.ffmpeg.maxrate = 7000
    bpy.data.scenes['Scene'].render.ffmpeg.audio_codec = 'MP3'
    bpy.data.scenes['Scene'].render.ffmpeg.audio_bitrate = 64
    bpy.context.scene.render.engine = 'CYCLES'

    # Playback-Settings
    bpy.context.scene.use_audio_scrub = True
    bpy.context.scene.use_frame_drop = True
    bpy.context.scene.sync_mode = 'AUDIO_SYNC'
    bpy.data.screens["Video Editing"].use_follow = True

    # If existing, read "Textmarken.txt"
    marken = base_path + "\\Textmarken.txt"
    if os.path.exists(marken):
        read_labels_data(marken)

    # Sequencer Area
    override = {'region': bpy.context.window_manager.windows[0].screen.areas[2].regions[0], 'blend_data': bpy.context.blend_data, 'scene': bpy.data.scenes['Scene'], 'window': bpy.context.window_manager.windows[0], 'screen': bpy.data.screens['Video Editing'], 'area': bpy.data.screens['Video Editing'].areas[2]}

    if mts_path1:
        import_from(override, base_path + "\\" + mts_path1)
    if mts_path2:
        import_from(override, base_path + "\\" + mts_path2, True)
    bpy.ops.wm.save_mainfile()

    for name in os.listdir(base_path):
        if '.wav' in name or '.WAV' in name:
            print(name)
            # add all further wave files
            bpy.ops.sequencer.sound_strip_add(override, filepath=base_path + "\\" + name, frame_start=1, channel=channel*2)
            #bpy.data.sounds[name].use_memory_cache = True
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[name].show_waveform = True

    #bpy.ops.sequencer.view_all(override)
    # deselect all strips
    for seq in bpy.data.scenes['Scene'].sequence_editor.sequences_all:
        seq.select = False

def import_from(override, mts_path, muted=False):
    global channel
    print(channel)

    names = os.listdir(mts_path)
    frame = 1
    #print(names)
    names = sorted(names)
    for name in names:
        if 'MTS' in name and not '.lwi' in name:
            print(name)
            base = os.path.splitext(name)[0]
            avi = base + ".avi"

            # add original video strip to get the audio and delete the video again (you might omit the delete)
            bpy.ops.sequencer.movie_strip_add(override, filepath=mts_path + "\\" + name, frame_start=frame, channel=7 + channel*2)
            for seq in bpy.data.scenes['Scene'].sequence_editor.sequences_all:
                seq.select = False
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[base + ".001"].select = True
            bpy.ops.sequencer.delete()
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[name].mute = True

            # Add AVI files from AVS-folder (you might not need this)
            bpy.ops.sequencer.movie_strip_add(override, filepath=mts_path + "\\" + base + ".avs\\" + avi, frame_start=frame, channel=7)
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[avi].mute = muted
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[avi].channel = channel
            frame += bpy.data.scenes['Scene'].sequence_editor.sequences_all[avi].frame_duration

    # move first audio strip back down
    for name in names:
        if 'MTS' in name and not '.lwi' in name:
            print(name)
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[name].channel = 2*channel+1
            #bpy.data.sounds[name].use_memory_cache = True
            bpy.data.scenes['Scene'].sequence_editor.sequences_all[name].show_waveform = True
            break

    if not muted:
        bpy.data.scenes['Scene'].frame_end = frame

    # deselect all strips
    for seq in bpy.data.scenes['Scene'].sequence_editor.sequences_all:
        seq.select = False
    channel += 1

def main():
    import sys       # to get command line args
    import argparse  # to parse options for us and print a nice help message

    # get the args passed to blender after "--", all of which are ignored by
    # blender so scripts may receive their own arguments
    argv = sys.argv

    if "--" not in argv:
        argv = []  # as if no args are passed
    else:
        argv = argv[argv.index("--") + 1:]  # get all args after "--"

    # When --help or no args are given, print this help
    usage_text = \
    "Run blender in background mode with this script:"
    "  blender --background --python " + __file__ + " -- [options]"

    parser = argparse.ArgumentParser(description=usage_text)

    parser.add_argument("-s", "--save", dest="save_path", metavar='FILE',
            help="Save the generated file to the specified path")

    parser.add_argument("-m", "--mts_path1", dest="mts_path1", metavar='FILE',
            help="Open all MTS-Files from this path")

    parser.add_argument("-n", "--mts_path2", dest="mts_path2", metavar='FILE',
            help="Open all MTS-Files from this path")

    args = parser.parse_args(argv)  # In this example we wont use the args

    if not argv:
        parser.print_help()
        return

    # Run the import_function
    import_function(args.save_path, args.mts_path1, args.mts_path2)

    print("batch job finished, done")

if __name__ == "__main__":
    main()


glass of orange juice looks differently in viewport and render image i have created a very simple glass of orange juice and placed it on a wooden table.
when i look in viewport render it looks like this --

but when i render it changes to this--

in both times I have used 64 samples.
I thought it is the reflection of the table and tried to render it without table. The result was same.
can anyone enlighten me how can I achieve the render result like viewport result?? thanks in advance.

here is my blend file :

Short answer at the end, longer but more detailed way, keep reading..

Checked the file as well, had to tinker a bit as the textures were not there (used a different HDRI to lighten the scene). When i rendered and adjusted the glass/juice sizes to slightly overlap (yes, please bear with me) the picture still did not come out right, the juice was looking weird. After some tweaks on the material i could not get it better and checked the face orientation(normals) ...

Always a good idea to check normals (Face Orientation).

Option to display at the bottom of the picture(above).

As i mentioned above, i use to overlap the liquids in glasses to make it look more realistic (in regards of reflection and refraction), believe i am not the only one, but that aside, pictures are better then words.

Left side with the juice geometry slightly inside the glass walls, while on the right the juice geometry is smaller and thus not intersecting with the glass. The refraction and calculation of liquids in glass always was and most likely will be an issue in regards of realism. But with the intersection on the left the reflections/refractions are only calculated for glass then juice and not for glass then air then juice, which leads to those floating liquid in a glass effects.

Not the main issue, but i would like to also point out that the material on your table, in the "Image Texture" nodes the roughness and normal textures should be set to "Color Space":"Non-Color". Rather then me trying to explain, others did already, here a link that should clear some things up as well Understanding sRGB, gamma, color values..

Now the main issue with your juice, sorry for the long post.

It was essentially the normals(Face Orientation) of the juice-mesh that were wrong.


Viewport output on videocard we are currently looking into the possibility of adding monitoring of a fullscreen viewport on SDI videocards, like the Blackmagic Decklink or Blackmagic Ultrastudio. Blackmagic Design has a SDK, with good documentation and an implementation in C++.

What would the best approach to achieve something like this?

we have several builds that recover BGE/UPBGE for Blender 2.8.
UPBGE has the possibility to input/output to a decklink card.

In this link (https://mega.nz/#F!t9EEFSaS!JPiOPSInCZyU-SW_-rhEOQ) builds from 2019/11/04 have decklink activate:

Maybe we need to update decklink examples (as in https://docs.blender.org/api/blender_python_api_2_78b_release/bge.texture.html) to use new Opengl shader version. We are in process.