What is albedo and how to use it and how to prepare materials for games? The main question is: how to prepare materials for games? Say I model an asset. Bake all material textures (diffuse, AO, specular etc.) into one diffuse, bake normals from a high poly version of the model into one normal map. Is that correct? Or should I do it differently, say prepare separate texture for specular. I read somewhere that in games there are actually no materials, only textures. Is that right? Also I came across the term albedo and that it is used in games/game engines? What is it exactly and how to do it in Blender?

IMHO there is no single right or wrong way in how to prepare materials for games. Sometimes the engine dictates what you should prepare and often you just follow personal preferences.

Your project might also require different types of spec maps, for dry and rainy weather, for example. Cavity maps can produce all sorts of fancy effects like dirt, dust, worn edges, snow on top of rocks...

I am a big fan of model recycling. Sometimes it's only a single part of a mesh, a fancy cycles material, but I also reuse complete models with textures. To get the necessary flexibility I bake huge textures and  separate maps - sometimes even for cavity.

Albedo is basically the new diffuse ;-) Since many people started baking all kinds of effects into their diffuse maps it just seems to make sense to give the plain color without lights, ao, whatever a new name. Basically it's a "normalized" version of the "modern" diffuse map.

Edit: You might watch Joel Burgess's GDC presentation about modular level design in Fallout 4. It's a great source of what can be achieved by reusing meshes with different material setups


Blender Crashes when Switching to Cycles Engine I open a blank Blender project, I go to switch it to cycles. The entire program pauses for about a second, then crashes completely. This also happens to a project I have been working on.

Specifications:

Blender 2.76b
Windows 8.1
NVIDIA Geforce GTX 760m

Steps I have taken:

I have restarted Blender.
I have Reinstalled Blender from the website.
I have looked at any pages that seem to have this problem and nothing comes up.
I have tried the zip version of Blender.
My drivers are up to date.

Thanks for reading.

I needed to enable CUDA and use my NVIDIA GPU in the user settings.

 This is done by:

Opening user preferences under File/User Preferences
Going to the System tab
Scrolling down till you see the option entitled Compute Device
Selecting CUDA instead of None and selecting your GPU from there.

Apparently my CPU integrated is either not compatible, or the drivers are not installed correctly. Regardless, I wanted to use my more powerful GPU anyway.

Refer to this answer for a more in depth explanation on how this is done should you run into any problems.


What is thie cube around my meshes I have a model edited with blender. I selected all my meshes and made CTRL-A to reset scale and location. Since then, 8 of my meshes have some akward kind ob cube around them. What is it and how can I hide these cubes? I must have done a bad manipulation here but I don't know when and how I made it. Google is not helping me there neither.

Like Jerryno said as comment, it is a texture space visualization. that can be hiden in object tag -> Display


How to layer movie clips with black backgrounds in compositor? I am using Blender 2.76.

I want to layer this movie clip:

over this one:

So far this is what I have:

using this set of nodes:

I set "Dilate/Erode" to -100 to achieve this effect.  The compositor takes about two minutes to create the image.  I would prefer the top image be completely opaque rather than slightly translucent.

I am wondering, is there a better way to achieve the effect I am looking for?  Is there a method that will not require two minutes to composite one frame?

Thank you!

Edit:

This set of nodes solved the problem, thanks to Troy_S:

Edit #2:

I tried the "Math" version but it did not work properly.  I am hoping Troy_S will let me know how to correct my error:

Two ways spring immediately to mind, assuming zero emission backgrounds:

Take the output of the image and roll it through a node to get the maximum value.
Set Alpha on the image from the result from 1.1.
Use a generic alpha over and done.

For a more abstract glowy vibe:

Take the output of the image and roll it through a colour to BW node.
Set Alpha on the image from result from 1.1
Use a generic alpha over and done.

The former is a generic alpha over on imagery with zero emission background. The latter is a generic alpha over, but will result in some values being semi-additive akin to fire / candle flames.


How do I take a picture (of only the render and not the menu) I finished final render of the thing I'm making but I don't know how to save the image as only what is in my viewport

Yes You can do it easily
Just click on image and then here you will see a Menu with a Option to save the image.


weird bump on object and dont know how to remove was following the BlenderGuru tutorial on making a coffee cup. was making the handle when i finished i noticed there was a small bump, pimple like, on my mug. the point its on seems to be in place. im not sure how to get rid or smooth it out.

nevermind! just fixed it. apparently i created another vertices inside the mug that was making it spike out. just deleted it!


Impossible to do a simple zoom? i just want to do a zoom ,a real zoom , not a FOV adjustement

similar like using your scrollwheel when your are inside of a camera , but with the whole camera , so the border would just adjust depending of the zoom

is it possible to do so inside of blender ?

There are three things people may call "zoom" for a CGI camera :

Focal length
Sensor size
Camera position (dolly zoom)

You will find the first two here :


blender 2.78 problem with bridge edge loop When cutting a hole in the plane, I got into this problem.

v. 2.78

In the previous version of the blender (2.7), this problem does not exist.

v. 2.77

It appears to me that if you select all of the vertices of the hole you are trying to cut, and rotate them 180 degrees on the y (green) axis, you will solve your problem.


Why can I not move bones in pose mode with mouse? I have frame 16 selected in the animation timeline, I am in pose mode trying to rotate a bone. Automatic keyframe insertion is selected, so when I rotate a bone the keyframe is created.

My problem is that the bone reverts to its initial position after I left click to confirm. If I change the values manually in the properties panel then it works, but that takes a long time. In the properties panel, the text areas for all the values are yellow instead of white.

In the tutorial I am watching he just rotates and clicks, and the keyframe is created with the correct new rotate values. I am doing the same thing and it won't work.

https://www.dropbox.com/s/qb8mpy7x5vt4cvw/boneswontmove.blend?dl=0
There is a link to the .blend file in case anybody would take a minute to look at this, i'm sure any of you would instantly know what the problem is. Thanks

Edit:

[SOLVED]

Solution found on my thread here

Simply select the armature, go into the object properties panel, and set the duplication to none.

Maybe you enabled auto key only for location: the image shows the correct combination for inserting location, rotation and scale keyframes every time you move a bone in a frame.


Join roof faces together to form a top Since Blender doesn't create new edges when 2 faces intersect I wonder how can do this: I have a roof on both sides of my house but i want to join the top faces of the roof together at the center. See the red arrows. How

In Edit Mode select a vertex, snap a cursor to it (Shift+S-->Cursor to Selected) and change the transformation orientation type to Local. Enable the Snaping Tool (click the 'magnet' icon and change its type to Vertex). Press G and then choose the axis (press X, Y or Z, depending on your situation) twice and move a mouse cursor until it snaps to other vertex. Then select the whole mesh (A) and hit W-->Remove Doubles.


How can i bake an animated and extruded curve to a mesh animation? I have a text object that i want to reveal with a kind of handwriting effect. My plan is to animate an extruded curve which i want to use as a boolean operator on my original object.

How can the animated mesh (blue) be exported or converted so i can use it later on the red text? Right now i cannot select the blue mesh as an operand in the boolean operator.

The blue mesh isn't a real mesh it is generated from a curve so it can't be used in the Boolean modifier ( and other mesh dependent modifiers ) , also the text object( red one ) is a curve so it can't be used in the Boolean modifier.

You can convert  the curve into a mesh :
 - select the curve and hit Alt+C and choose Mesh from Curve
Note: beware after converting to a mesh you loose the curve editing options ( including this animation )

The animation you have can be replicated using the build modifier  on the converted mesh :

now you can have both the animation and the Boolean modifier on this mesh


How to do a simulation of still water being affected instead of flowing water Of all the tutorial videos on water simulation, they're all like water flowing from a point and then settling. How would I do it if I want the start of the animation to be an existing body of water. Would I just do a flowing animation, wait until it is still, then just cut the flowing part of the video off?

You can use an Object set to a Flow Behavior of Geometry to convert any part of the mesh that intersects with your domain to liquid particles.  You'd just have to allow a limited amount of time to settle and keyframe the visibility of the object.

Particle sims, and particularly this process, seem pretty finicky right now.  I had to go back and change the number of divisions on my domain to sort of "refresh" the sim and update the size and positions of my emitters.  Just a heads up.


Background image in blender 2.8 How do you set a Background image in blender 2.8?

It depends on the purpose of the background, but if you encounter this problem in 2.8, it means that you are confused by the loss of the sidebar, then you need a camera background


Picking two points on the 3d model surface to measure distances I'm a blender n00b and this may be a wrong tool for the job, but I've found some great features in Blender (like the caliper add on), so I'm pretty sure there's a way to easily (or at least bit easier) select two surface points of a loaded 3D .ply model somehow instead of moving the caliper/ruler points and its x y z axis individually one at a time?

Is there such a tool in Blender (or anything standalone) for selecting points from a surface of a loaded 3D model and measuring the distance of those selected points please?

Any explanation for how to do it any faster in Blender, instead of moving x y z axis of caliper (or ruler/protractor tool) one at a time attempting to align them to a surface of a loaded 3D model, or in any other tool that's able to measure that would be greatly helpful and appreciated. TIA

My favorite tool for measuring things is the measureit addon.

Once the addon is installed and enabled, simply enable Show in 3D view > Tool Shelf (T) > Measureit tab. Then select the vertices you want to measure and click Segment. You can edit and delete individual measurements in the Properties Region (N):


Does gpu rendering support on gt 730 ddr3 or gt730v2 ddr5? I have an old pc core 2 duo E6550,Ram 4gb,i know this is not a power full pc.Does gpu rendering support these two graphic cards?

According to this page in the blender reference manual they claim that

  We support graphics cards starting from GTX 4xx (computing capability 2.0).

I also found both the cards you mentioned in the list of CUDA-enabled GeForce products on this NVIDIA page with computing capabilities listed as 2.1 and 3.5 so I would claim that yes, GPU-rendering does supports those cards, especially the ddr5-model.


How can I create a similar material in eevee blender How can I create a similar material in EEVEE, because in Cycles high quality render takes forever so I thought of using EEVEE.

Is there any specific name for this material?

This is from Derek Elliott planet animation tutorial

https://i.stack.imgur.com/moJ5j.jpg

The ring looks like a frosted glass with a low IOR. You will need to enable screen space reflections to get good looking results.


How do you connect vertex groups to an armature? I downloaded the awesome Daft Punk model created by Karol Miklas from Sketchfab and have been trying to pose the figures within but I'm not able to. I'm missing the link between the vertex groups provided in the Blender file and an armature in my project.

I've watched a lot of YouTube videos for rigging characters and tried Googling for the answer but nothing I've found seems to relate to what I'm trying to accomplish. Being a newbie, I know I'm missing something that's obvious to the more experienced; can you share what steps need to be taken to connect the vertex groups to an armature for posing?

What you could do is give your bones the name of the vertex group they are supposed to control then parent your mesh to the armature with a simple CtrlP > Armature Deform. Each bone will automatically control the group with the same name.


Change the position of an Icon I am creating an addon, but I needed a small help. This is the code

    row2.label("Text",icon = 'BLENDER')

Now, if I execute it, the Icon is placed before the Text.

Is there anyway to place the Icon after the text?

You could add two labels, one with the text only, and another with the icon only:

    row = layout.row()
    row.alignment = 'LEFT'
    row.label("Text")
    row.label(icon='BLENDER')


Is it possible to render a single game engine frame in cycles? I'm looking to use the blender game engine to get my frame to a certain point, stop there and then render that single frame in cycles since cycles does a much better job of rendering for certain aspects of images.  How might I do this?

I found the solution to my problem.  I end up running the 'render game engine' while having the 'record animation' checkbox checked under the Game dropdown.  Of course, you need to change to the 'Blender Game' rendering before this otherwise it won't appear.  Then starting the 'Game Engine' by clicking 'Start Game Engine', as it is recording, all of the keyframes are created  Once I find the frame I want that represents a good image of what I wish to render.  I move to that frame and turn it over to cycles render.  Here I can play with the materials, lighting, etc in order to get just the right image to be rendered.


Scaling Texture based on distance to camera Is it possible to make a node setup to where if a camera is close to an object, the texture gets bigger, but far away it decreases in size?

It is. The crucial point is using the cycles Camera Data node, from then on should be trivial.

Just use the View Distance output socket to transform the texture coordinates as you see fit.

In my setup I just use a Color Mix node to mix between two Texture Mapping vector coordinates with different scale factors, and the View Distance as mixing factor, but you can get inventive with the distance value and use it as you see fit.


How do I join animations to create a multi-take animation? I have a single fbx that contains multiple animations. They are in a sequence, separated by times only.
Here is a screenshot from within Unity:

I would like to use them on a different model in Unity. Using the "Humanoid" retargetting is not an option because the hands are not mapped correctly.
I have found out that there is a new Add-On for Blender named "Rokoko".
It allows to retarget animations.
It's simple: You load a source and a target, then you click "Retarget".
The first problem that I experienced was that Blender wouldn't import all animations. There is a bug in Blender (it exists since ages and still does to present) which causes to only import the very first animation.
The only workaround that I found was to split the big fbx into hundreds of small single-animation fbx files using Autodesk FBX converter.
I can then import all these single animations in Blender, they looks like this:

Rokoko however requires that animation source / target are in the same pose.
Had Blender imported the FBX with the many animations correctly, I could simply pose the first frame and be done.
But I have over 100 single animations, and it is impossible for me to pose over 100 animations so that the first frame shows the same pose.
How could I solve this problem? Could I join these animations again within Blender?
Or does anybody have a different idea?
I believe that if Rokoko would include the option to load a bind pose (instead of the 1st frame being in the same position), it would solve my problem, but I don't know if Rokoko would create such an option. But I think it would be great.
Thank you.

I'm Philipp from Rokoko. I gave this a try and the animations get imported correctly. Are you sure you are accessing them at the right place? Here is how to find them: https://i.imgur.com/rJnn7Bw.gif
Also using a bind pose is an interesting idea, I will look into that. But it's very likely not going to be part of this release version.


How to rid of "seams" from texture? When I paint my model made from Blender in Substance Painter, always uv seams is visible and interrupt textures like this:

Reason of asking here because I don't sure this caused from Blender or Substance Painter(I also asked this in SP forum).

Anyway I think this caused from my UV map, so I tried to add some padding between islands or triangulate all quads but none of them worked.

Here's the UV map of my model:

Note that all faces are smooth shaded.

This issue always happens to me and I really want to fix this in this time. As you can see in the UV map, I just added seams and unwrap all together.

If this caused from my UV map, how should I avoid this problem?

I suggest using the image options in the UV Editor to better unwrap your mesh first. Try the Color Grid to see how the image flows on your mesh object first before trying to go to Substance Painter to make the texture paint, as Substance won't correct a bad UV Unwrap. Look into unwrapping each part separately using 'Follow Active Quads' to get a better alignment and flow on the mesh.


Apply or inherit view settings of parent object What is the easiest way to apply the view settings of an object to all of its (grand/grand/etc)children?
I used to put the parent + children into one collection and changing the collection's view did the trick, but I was wondering if there is a setting which lets me also inherit the view settings and not only transformation settings from a parent to its (grand)children.
If this pops up in the search, I am very sorry that I did not find it. Searching for "apply parent view" etc. gives a quite general search result without any specific questions. Any links to relevant questions are welcome!

Holding Shift while clicking the view icons in the outliner does exactly what I was looking for.
Sometimes you can look for so long, and right after you ask for help you find the answer immediately :D


Why am I not getting a sharp, creased edge? All of the sharp edges are creased, but one side is not sharp like the other for some reason.

This side

should be like this side

And if I try to add a crease on the corner, I get this

So it turns out, mediocre to bad topology doesn't sit well with creases. So I fiddled with the topology a bit and achieved wanted results.


Insert edgerings along selected edge loops This is a useful 2.6 add-on in order to insert an edge. Unfortunately, it does not work in Blender 2.72.

Is there any way to do it in a simple way ?

You can try this way:

P.S.: When using CtrlX, "Dissolve Verts" needn't being toggled every time. It will remember your last choice.


Armature pose position is different orientation from initial layout in edit mode, and automatic weighting problem So I've been trying to fix my bone axes so that my arms are bending correctly and I've been running into a lot of pitfalls. This is my third rig for this mesh so far so I'm hoping that somebody can help me.

I essentially have two problems that are going on. The first is that my hand is rotating to a weird position when I go from edit mode to pose mode and enable the pose position.

I've tried changing the main hand bone's axis positions but there seems to be no luck with that, as well as no way to apply the rest position to the pose position. This problem may extend further up the arm, but I would like to keep my arm's axis positions so that they can bend correctly.

The second problem I'm having, which is further up the arm, is that the upper arm bone is creating a deformation when automatic weighting is applied.

I think this is based on the axis orientation again, but like I said I need the axes on the arms to be Global Z Positive.

It's worth noting here that axes seem to be different when switching from edit mode to pose mode. I'm posting a link to my blend file so you can see what I'm talking about.

http://pasteall.org/blend/index.php?id=50168

I would really appreciate it if someone could help me, I'm a beginner still and just want to move past this part as it has become a nightmare to fix.

In the IK constraint of your lower arm, you have to correct your Pole Angle to something like -180°. You often have to make this kind of correction after you've parented. I see you already changed to -90° but this was not enough.

I guess there are some other corrections to do. Personnaly I would parent the hand to the handle, and deparent the pole target from the handle, and make something simpler for the foot, etc... but maybe I miss something   ;)


2 Particles systems (1 curve guide) Affecting both. I have 2 particle systems in the same scene, 1 particle system is following a curve guide (which is what I want), the 2nd particle system I just want to shoot out of the geometry as it normally would without following the curve.

From what I read online, the curve guide affects all particle systems in a scene. How do I get my 2nd particle system to NOT follow the curve guide?

You can turn down the curve guide effect under "Field Weights" on individual particle systems:


Merge two planes one above the other New to Blender here! I'm trying to build a rudimentary race track with Blender 2.79b which currently consists in:

a square plane subdivided n times to create a terrain which will have bumps
a track modeled using Array and Curve modifiers that fit to a Bezier curve.

What I'd like to achieve is merging the two planes so that:

the track will be correctly rendered
sculpting the terrain will affect the surrounding track

However, I may be going in the wrong direction trying to do this, so I'm grateful for any proposal that is better practice!

Hi Zim in this case its best to use the ShrinkWrap or KnifeProject. The 1st one is more simple to use so thats what we try. I prepared the scene looking like this:

You could see the road above the terrain so now its good to make the road subdivided (preferably more that the terrain) for ShrinkWrap being possible so use Subdivide to achieve this result:

Its enough to acomplish what we want so now the modifier takes place. Add it and as a target choose the terrain object (in my case its "Plane"). Now use the settings as below (GREEN). As a MODE use the Project and dont forgot to check the Negative projection (in our case we have road above the surface so its negative). Also dont forget to set the Offset to about 0.01 (lets try lowest value possible) to avoid overlapping faces.

Everything is done so hope it helps Buddy.

Sincerely, Jan


Can I subdivide vertices in a single direction? Is it possible to almost duplicate or split vertices but keep them part of the edge that that they're on? Subdividing basically works, but if I try to do multiple edges at once, it does it in all locations. I can do it by subdividing and then dissolving the leftover vertices or by subdividing alone and then connecting the vertices, but is there an easier way?

The closest thing that I've found is "Loop Cut and Slide", but that just creates new vertices only connected to the ones I did it from instead of inserting new vertices in the edges.

For example, if I have this mesh:

I would like to do this:

If I select the vertices on the other side and subdivide it, it gives me this though:

Is there an easier way to do this?

CtrlTab > Edge. Then subdivide as you want.

Comparison:


Distorted highlights when rendering microscratches (bump map) I'm trying to create a 'spiderwebbing' / 'swirl' effect caused by microscratches around highlights, but for some reason get triangular rays instead of a round halo. I've tried loads of scratch textures and they all have the same problem, even with different sizes/strengths.
The only solution I've found is to use a normal map instead of bump, which isn't ideal as I would need UVs for 100+ objects (or find a way for triplanar normal maps). I've seen other people create this effect with just a bump map, in cycles as well as some other render engines. One solution I've seen for 3dsMax/Vray was to change the "bitmap filtering to Pyramidal or Summed area", but changing Blender's texture filtering doesn't do much (it fixes for eevee, but not cycles).
(The screenshot is slightly exaggerated, but the rays appear with any bump value or texture size. From 2.92 cycles viewport)
EDIT: New images to show difference between normal and bump map. Both use the same texture and mapping setup:
Thanks for any help or tips you can offer
Using bump map:

Using normal map:

Nodes:

I would reccomend trying to change your bump node settings. Set the strenght to 1 and the distance to 0.01 or anything sutable. Try to mix the displacement with the normals also. Attached below is an example low strength vs low distance.


Creating cartoon animations I hope this is the right place to put this but here goes.

I was watching this trailer https://www.youtube.com/watch?v=mZXyxZK28QY

When i wondered how they made it. I have seen this style in a anime called Terror in resonance and other games.
but i was just wondering how it is done or what programs were used for this.

I have also seen something like that here https://www.youtube.com/watch?v=EEqTmym-Dds

Given that this is a site dedicated to Blender 3D, I suspect that the questions is "Are these kinds of animations doable in blender?"

If so, the answer is yes.

You might want to do a google search for tutorials on "Non Photorealistic Rendering in Blender" (Or "NPR rendering") and "Blender Freestyle"

Tire Bike by Pro Creaciones. CC BY

  Freestyle is an edge- and line-based non-photorealistic (NPR) rendering engine. It relies on mesh data and z-depth information to draw lines on selected edge types. Various line styles can be added to produce artistic (“hand drawn”, “painted”, etc.) or technical (hard line) looks.

Here are some links that illustrate some of the possible uses for freesyle:

https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/FreeStyle#Freestyle_Artwork_Showcase

To get started Read this link to the blender manual


How do you move a bone in the Blender game engine? In Blender I can move the pose of an object using:

bpy.data.objects["Rig"].pose.bones["Bone"].location[0] += 0.1

In fact, if I execute this code in the game engine, it does nothing in the game engine, but when I come back to blender the object's pose has moved as expected.

How do I achieve the same thing in the game engine? I want to move some eyes based on a simple keyboard input.

Update:

I have found that I can access, but not update, this value in the game engine with:

import bge
channel = bge.logic.getCurrentController().owner.channels["Bone"]
print(channel.location)

Console output:
<Vector (1.1683, -0.0078, 0.0000)>

Trying to update that value with channel.location.x += 0.1 does nothing in-game though.

I was missing an update call: armature.update()

More precisely, bge.logic.getCurrentController().owner.update() needs to be called after any updates to the armature in order for it to update in the game engine.


Compositing cg watersplash with water in video footage I am trying to create an effect where water is frozen in time, resembling the splash of water created by stepping in low water.
My issue is in compositing the borders of my water splash into the water covering the floor.
I've tried multiple shading settings and searched for countless tutorials, looking for one that basically lets me keep all the highlights of the lights bouncing in the splash effect but basically makes it so that its the only thing shown in the layer or a way to softly blend the edges into the water, as in mask feathering.
Further than this I would like to create an invisible layer below the foot that reflects only the particles of the water splash and not the environment map.
I'm not sure whether my solutions would be the right way to accomplish the effect and I'd appreciate whatever solution you might have.
(I'm at a semi-beginner level and would appreciate descriptive answers if possible)
Thank you in advance!
-Chris

You're not going to find a "tutorial" for this.
You are up for a very challenging task. You need to account for a lot of things, like transparency, refraction, diffraction reflection, caustics in the water, plus the reflections and shadows on the shiny floor and the shoes.
Reflections and transparency have to come from somewhere ,so you will have to put elements to be reflected and shown trough the water.
The most accurate way to deal with this would be to recreate a lot of the scene in blender to make the interaction more convincing.
Try to recreate the material for the floor as close as you can to be able to capture the reflection of the water on the ground and the reflection of the water drops. You will need also a copy of the floor to composite the shadows as a shadow catcher.
To have the transparency of the drops correctly show the background use the image in a plane that is invisible to the camera, but visible to the transparent and glossy elements of the drops.
In reality each drop of water would reflect the entire environment, the window behind, and whatever is behind the camera...
The biggest challenge is that the water on the floor should reflect the shoe as well, but from a perspective that does not exist on the original image, so most likely you need to make the shoe as as 3D element, again invisible to the camera, but visible to the glossy rays. But the water should also be reflected on the floor and at the same time the water should be transparent to show the floor, but there should be some disturbance in the surface of the water caused by the shoe.
You are in for a lot of hours of entertainment while you try things, make masks, play with different rays and multiple layers.
Some info can be found in this post:
How to get reflections from 3D to show up on real images
And then there are many more layers to this onion.
Matching the values for the light values for the scene, getting the correct perspective, etc etc,
Realistic rendering of mesh together with image?
The bottom line is this: compositing is an art, careful studying of how how light and surfaces work in the real world, and attention to small details, and ingenuity to fake things are needed to pull this one off.
Best of luck, and it would be wonderful if you could write a detailed post when you finish: the missing tutorial!


What context does save_as need? I'm trying to save a texture using save_as, because I want to use the optional Copy parameter. I'm using this code:

# locals: size (int), path (string)
tex = bpy.data.images.new("MyTexture", size, size)
bpy.ops.image.save_as({"edit_image": tex}, copy=True, filepath=path)

As a result, I'm getting this:

RuntimeError: Operator bpy.ops.image.save_as.poll() failed, context is incorrect

However, I can't find any documentation about which context is needed for save_as. So my questions are:

What is the required context for save_as?
Where do I generally find what context is required for an operator?

Have you tried looking in the Blender documentation? It covers the following

bpy.ops.image.save_as(save_as_render=False, copy=False, filepath="", check_existing=True, filter_blender=False, filter_backup=False, filter_image=True, filter_movie=True, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, show_multiview=False, use_multiview=False, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA')


Rendered textures, spots instead of smooth Rendered Image

Hello,

when I render my scene, the walls windows and ceiling have weird
spots on them.

What should I do?

Thanks, Daniel

Read this

What you have here is denoising artefacts from the blender denoiser. The solution to them is increasing your render samples or not using the denoiser at all.


Load Freestyle script using api How do I load freestyle script using api instead of the GUI?

The "script" property is a reference to a Text datablock.  You first need to create a Text datablock, and then set the "script" property to it.  Example:

import bpy
p = '/path/to/style_module.py'
t = bpy.data.texts.load(filepath=p)
m = bpy.context.scene.render.layers.active.freestyle_settings.modules.new()
m.script = t


importing (appending) materials from File I am using Blender 2.8 and cycles render I wanted to download a few materials from websites like http://matrep.parastudios.de/ when I download the files I follow what others have said to do. select file-append and then select the blender file and select the materials in the material folder in that blender file. when I do this I select the blender files but then there is nothing there is no other folders..what I am doing wrong, is there a plugin for 2.8 that helps with stuff like this there is the material library addon you can load by default.

The downloaded files from that old site do not appear to be blend files, which is why appending does not work.

While there have been a few different material library addons, there are two options that are currently working (and included) with 2.80. The first addon is listed as Material Library and was previously called "matlib vx", the other is a new addon called BlenderKit which provides a much wider library of resources that includes models, scenes and brushes.


Make a mesh inside another mesh appear over the the outer mesh I'm trying to make an effect similar to this but in blender instead of unity :

The darker inner part is a cylinder which is inside a larger cylinder with inverted normals and a solid blue material, which makes a solid blue outline around the smaller cylinder. How can I achieve this in blender?

For Cycles I use this setup (not mine, but I can't remember where i found it) :

You can also use Freestyle, it's a different approach but gives a lot of control over the edge style, thickness etc.


Rim Problem with Solidify Modifier I have a 3D egg model in blender. I seperate it from half and i want it to be solid. I try to use solidify modifer but there is weird looking problem. It's not match with other half. If i didn't check fill rim it's okay but i want rim filled too. Thanks!! (Sorry for my bad english)

The sequence of the modifiers is important here. Move the Edge Split modifier to below the Solidify modifier - the modifiers are applied in sequence so this way the edge split is applied to the result of the solidify.


Unable to reduce Blender file size for render farms? I'm hitting a wall here.
I have a 185-frames-long animation that I want to send to SheepIt for rendering but no matter what I do the file size stays around 1,5-1,8GB and the upload limit on SheepIt is 500MB..
I've tried reducing all my textures to 2K, baking the animations, applying all modifiers (except particle emitters), purging all orphaned data-blocks.. but the blend file size stays exactly the same, for some reason it's even bigger now.
I really don't know what to do here, can anyone help ?
I would really appreciate that, I'm stuck as hell.
Thanks !

Full picture : https://i.postimg.cc/T1xRdZXq/Blender-Project.png

You can set the Outliner to Blender File mode and go through all the data saved in the file to see if you have something not needed there or maybe duplicates:

You should not apply modifiers since procedural stuff will take less space. Same might be true for baking animation. I would recommend to test it. Generally you might want to do calculations during render instead of pre-calculating and saving the results to the file using space.
Other than that there is no rule that it should be possible to render any kind of project on SheepIt. It might just not be possible and you will need to search for another render farm with less restrictions or other rendering solution.


Object Orientation Widget I have a file that has 9 separate objects in it. In Object Mode if I set it to Global, Local, Normal, etc... it's all the same arrow direction. If I go into Edit Mode, set it to Normal on the orientation, they basically all have the correct orientation for each specific object. Why doesn't Object Mode have the same info for the orientation that Edit Mode has or how can I force Object Mode to have the correct arrow direction for each object. (Side note, each object has its own specific arrow direction)

Example

The reason why it needs to be in that specific orientation is so that it can rotate correctly when exported out... the correct rotation is what the Edit Mode normal has.

Make a new Custom Transform Orientation per object, and name them to match. You will then be able to choose the custom transform as you also choose  Global/Local/Normal/etc. Object Mode deals with the object as a whole, so it won't give a good result using Normal for instance, where you might use that in edit mode as you make selections of individual elements of the object mesh.


Problems installing an addon I'm trying to install an addon called Panorama-Tracker, here's the link to it: https://github.com/dfelinto/Panorama-Tracker
The author mentioned that commands should be pasted in a terminal before installing the addon, I copied the commands, run Text Editor in Blender, pasted the commands and hit Run Script, I got an error of check Console, checking the console I saw nothing. I'm sure I'm doing it the wrong way, is there a possibility someone can show me how to do it right?

Blender expects addons to be a zipped directory of python scripts.
if somehow installing an addon gives the error failed to get addon path , investigate the addon and make sure it has the following structure.

addon.zip
   |
   |--directory_name/
          |
          |--__init__.py
          |--script.py
          |--script2.py
          |--etc...


How do I make a script for adding modifiers? I have made a script for adding VertexWeightMix modifers to a selected mesh. However, when I run the script, it adds tons of modifers, but only changes the first one it adds. How can I fix this? I don't want to apply them immediatly once a modifier is created.

for vertex_b in namelist:
    vertex_a = "bone_01D2"
    vertexA = bpy.context.object.vertex_groups.get(vertex_a)
    vertexB = bpy.context.object.vertex_groups.get(vertex_b)
    if vertexA is None:
        print("Vertex " + vertex_a + " Does not Exist!")
        continue
    if vertexB is None:
        print("Vertex " + vertex_b + " Does not Exist!")
        continue
    bpy.ops.object.modifier_add(type='VERTEX_WEIGHT_MIX')
    bpy.context.object.modifiers["VertexWeightMix"].vertex_group_a = vertex_a
    bpy.context.object.modifiers["VertexWeightMix"].vertex_group_b = vertex_b
    bpy.context.object.modifiers["VertexWeightMix"].mix_mode = 'ADD'
    bpy.context.object.modifiers["VertexWeightMix"].mix_set = 'B'

Edit: I figured out that if you declare a variable i = 0, then you can convert it to a string, append it to the name, then increase it. However, if I ran it again, it would not work.

I can just grab the length of the number of modifiers and then subtract it by one to get the index.

        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].name = name
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].vertex_group_a = vertex_a
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].vertex_group_b = vertex_b
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].mix_mode = 'ADD'
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].mix_set = 'B'


Atmospheric Re-entry I'm using Blender 2.75 Cycles, I'm looking at trying to create
an atmospheric re-entry scene.

So I'm looking for a node setup to create something like this image by using particles or some alternative method. I have attempted to use the smoke simulator but the issue is my CPU is quite slow and GPU smoke rendering doesn't seem to be supported yet.

I would model the reddish smoke as a solid object, parented with the ship, move it in it's own layer, set to a new render layer.

In the compositor you can blur it, make it transparent, add some noise texture to bring some life, mask some parts to animate it .....

Fast rendering and effective results


Is there a way to calculate mean curvature of a triangular mesh? So I've written a script which does this:

Before:

After:

The code is:

#fname - filename of imported .stl
#thic - required thickness of output model
#txt - ascii or binary stl
#cyc - cycles of smoothing
#cut - times triangle divided
#fac - smoothing factor
#per - smoothing reps
#bbX - bounding box X
#bbY - bounding box Y
#bbZ - bounding box Z
#trX, trY, trZ - count of elements in array
def s_surface(fname, thic, txt, cyc, cut, fac, rep, bbX, bbY, bbZ, trX, trY, trZ ):
    bb = [[(bbX/2, 0, 0), (1,0,0), True, False],
          [(-1*bbX/2, 0, 0), (1,0,0), False, True],
          [(0, bbY/2, 0), (0,1,0), True, False],
          [(0,-1*bbY/2, 0), (0,1,0), False, True],
          [(0, 0, bbZ/2), (0,0,1), True, False],
          [(0, 0, -1*bbZ/2), (0,0,1), False, True]
         ]
    tr = [trX, trY, trZ]
    bpy.ops.import_mesh.stl(filepath=fname)
    ob_new = bpy.context.selected_objects[0]
    bpy.context.scene.objects.active = ob_new
    bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.normals_make_consistent(inside=False)
    bpy.ops.mesh.remove_doubles(threshold=0.02)
    for i in range(cyc):
        bpy.ops.mesh.subdivide(number_cuts=cut)
        bpy.ops.mesh.vertices_smooth(factor=fac, repeat=rep, xaxis=True, yaxis=True, zaxis=True)
    bpy.ops.mesh.normals_make_consistent(inside=False)
    for i in range(len(bb)):
        bpy.ops.mesh.bisect(plane_co=bb[i][0],plane_no=bb[i][1], clear_outer=bb[i][2],clear_inner=bb[i][3])
        bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.normals_make_consistent(inside=False)
    bpy.ops.object.mode_set(mode='OBJECT')
    for i in range(3):
        bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')
        bpy.ops.object.modifier_add(type='ARRAY')
        bpy.context.object.modifiers["Array"].count = tr[i]
        bpy.context.object.modifiers["Array"].relative_offset_displace[0] = 0
        bpy.context.object.modifiers["Array"].relative_offset_displace[i] = 1
        bpy.context.object.modifiers["Array"].use_merge_vertices = True
        bpy.context.object.modifiers["Array"].merge_threshold = 0.01
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Array")
    bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')
    bpy.ops.object.modifier_add(type='SOLIDIFY')
    bpy.context.object.modifiers["Solidify"].thickness = thic
    bpy.context.object.modifiers["Solidify"].use_quality_normals = True
    bpy.context.object.modifiers["Solidify"].use_even_offset = True
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Solidify")
    nfname = ""
    nfname = fname[0:-4] + ".stl"
    bpy.ops.export_mesh.stl(filepath=nfname, ascii = txt)

Surfaces I am trying to smooth are supposed to be triply periodic minimal surfaces, so it means that after smoothing is applied mean curvature is meant to be 0 in all vertexes of a mesh. How can I calculate mean curvature to check if smoothing is done right?

This is an answer based on this Computer Graphics SE indicated in the comments (the one by Nathan Reed).

The math is described in this answer, but in short the curvature is calculated by vertex so:

Get all edges from this vertex
And for each edge compare the projection along the edge of the normals at it extremities
Take the mean of all that

Now, as didn't want to just code a copy of it, I propose a little enhancement:

The calculation is also vertex centered, but we go along each of its surrounding face (need to be triangulated), to calculate a curvature weighted by the angle of this face at the vertex we are calculating around.

Once the sum done over all faces, we mean this sum by the total angle around the vertex.

Making so, the curvature of a large angle will be more important than for a small angle. This is like taking the integral of the curvatures around the vertex.

I think this may be close to the theoretical calculus as it consist of taking the curvature for each cutting plane turning around the vertex normal.

In both algorithms, the base calculus is the same and this corresponds to the CGSE answer:

def curvature_along_edge( vert, other ):
    normal_diff = other.normal - vert.normal
    vert_diff = other.co - vert.co
    return normal_diff.dot( vert_diff ) / vert_diff.length_squared

But in the case we want to use angles, we need to organize a surrounding loop (ring) over the vertex for which we want the curvature, to have the several angles with the good signs.

For instance here:

We want the ring/loop:

For vertex 0: 5, 8, 4
For vertex 8: 1, 6, 3, 7, 2, 4, 0, 5, (1)

etc.

These loops are counterclockwise, as vertices of Blender's polygons are.

This is done by:

# Get vertices in the face order but starting from a given vert
def following_verts_of_vert( vert, face ):
    i0 = index_of( vert, face.verts )
    i1 = (i0 + 1) % 3
    i2 = (i0 + 2) % 3
    return face.verts[i0], face.verts[i1], face.verts[i2]

# Create the oriented ring around vert
def ring_from_vert( vert ):
    vertices = []
    for face in vert.link_faces:
        i0, i1, i2 = following_verts_of_vert( vert, face )
        vertices.append( [i1, i2] )
    result = vertices[0]
    added = True
    while added and len(vertices):
        added = False
        prev = search_link( result[0], vertices, 1 )
        if prev:
            result = [prev[0]] + result
            vertices.remove( prev )
            added = True
        next = search_link( result[-1], vertices, 0 )
        if next and next[1] not in result:
            result.append( next[1] )
            vertices.remove( next )
            added = True
    return result

(this code above is not really needed, or could be optimized, but was my first though to have a constant orientation reference for the curvature)

So that finally, the mean curvature around a vertex is calculated by:

def angle_between_edges( vert, other1, other2 ):
    edge1 = other1.co - vert.co
    edge2 = other2.co - vert.co
    product = edge1.cross( edge2 )
    sinus = product.length / (edge1.length * edge2.length)
    return asin( min(1.0, sinus) )

def mean_curvature_vert( vert ):
    ring = ring_from_vert( vert )
    ring_curvatures = [curvature_along_edge( vert, other ) for other in ring]
    total_angle = 0.0
    curvature = 0.0
    for i in range(len(ring)-1):
        angle = angle_between_edges( vert, ring[i], ring[i+1] )
        total_angle += angle
        curvature += angle * (ring_curvatures[i] + ring_curvatures[i+1])

    return curvature / (2.0 * total_angle)

Here is the compared results:

They are close, but the comparison I've used needs some explanation: the resulting curvatures are normalized so that they fit to the interval for vertex groups [0, 1]:

In short, this vertex group assignment compares the contrasts but not the values.

This is done so:

def assign_to_vertex_group( obj, group_name, curvatures ):
    vertex_group = ensure_vertex_group( obj, group_name )

    curvatures = [abs(c) for c in curvatures]

    min_curvature = min( curvatures )
    max_curvature = max( curvatures )
    vg_fac = 1.0 / (max_curvature - min_curvature) if max_curvature != min_curvature else 1.0

    for i, vert in enumerate( obj.data.vertices ):
        vertex_group.add( [vert.index], (curvatures[i] - min_curvature) * vg_fac, 'REPLACE' )

Here is the blend file with the 2 scripts named : cgseSimple and cgseSimple2.

Note:

Also included Mike's implementation (mike text) + the same rewritten a bit (mikesPaper), for understanding and comparison purpose. But from all that, it is hard to know what is the more accurate (how to determinate which is true?). I was not able to understand how this algo is able to determinate curvature orientation (convex vs. concave inclinations).

Also tested all that on big meshes (not included due to the blend file size limit). But that accentuate the diff between the different approaches.


Slow Motion Water Physics Settings so does anyone know some settings to get slow motion fluid in Blender?
Starting from a basic scene and tweaking settings to get slow motion fluid. Any answers are helpful and thank you for your time!

Select your domain object, go to the physics->Fluid tab, and change the speed value to something lower than 1, for example to 0.5 if you want the simulation to have half the normal speed.


Why are my rendered images blurry? Why are my rendered images blurry... when I zoom in, its completely blurry.
I render my images to see how they are looking so far, and I zoom in to see blurry results... when I zoom in on the final rendered image, it is also blurry.
I tried changing the resolution, but it didn't help.
You may not think this image is blurry, but it is trust me. Does anyone know how to help?

Your render looks blurry because of the low samples in the render tab. As you can see in the picture you have 2 sliders, one that says preview : That's the one you use if you go to render mode. And the other slider that says render. That is if you use a camera and render it from there by clicking on the render button above the sampling. I but the render slider way down just to show you the difference.

Now because I use a camera to render this monkey I set the render slider higher to get less noise (blurriness)

Hope this helps.


How to add a python script to the quick favorites menu? How can I make script work in quick favorites panel? I specifically need this simple script, that I learned to create after googling a bit of how to run it from the text editor, but I need it to be in the quick favorites instead.....

import bpy

bpy.ops.mesh.faces_select_linked_flat()

bpy.ops.mesh.region_to_loop()

bpy.ops.mesh.mark_sharp()

Because I hate to have to click every single time each option I use repeatedly to work with my models, so I hope someone can tell the trick to add this code as a quick favorites command.

You could probably use Script To Buttons.
Create a button out of your script and add it to quick favorites panel. Done.


Snap scaling doesn't behave like expected For some reason I can't snap to a specific point.

I want to snap the orange line (with scaling) from the first image, to the line below it.
But as you can see in image 2 it scales way too wide.

I think I have searched every forum, but couldn't find an answer that helped.

Hope one of you can help me :)

Don’t worry, it works.

1) Enable snapping to vertex
2) When using a scale tool grab a vertex of your circle to scale it. Grabbing the scale tool ring won’t work.
3) The vertex you’re holding is now snapping to other vertices.

Enable snapping to vertex

Grab a vertex, not the scale tool ring

Moving the vertex now scales the object and snaps to other vertices

Hope this helps.
If you need any clarification, let me know.


How to assign uvmap to a material This might be a nooby question, but
https://imgur.com/a/MCAfWA3
There's an object from a game I extracted, it has 2 materials, 2 uvmaps, but I can only choose to view\render 1 uvmap at a time. Also the mesh's vertices all seem to have the first material assigned to it. How do I make it so that one material has 1 uvmap and reassign materials to the vertices it should be on? Here's a blend file
http://s000.tinyupload.com/index.php?file_id=00005335799690728226

To assign the second material to the second UV map:
1: In Edit mode, UV Editor, enable UV Sync Selection.
2: Box select all the UV vertices at the lower left hand corner.
In the 3D Viewport all the vertices associated with the second UV map should now be selected.
4: Select the second material and Assign this selected geometry.
5: Change the Viewport shading to Material Preview.
When done don't forget to disable the Sync Selection option in the UV Editor.


Texture not going on to Model I have seen people do the way I'm doing the texturing in order to create a color for their model. It is where you insert a texture and create a UV on to the texture. An example is at link time 47:45. Why is mine not working?

A couple of things:

Your TowerTexture.png file is very small --  4 pixels x 2 pixels -- and was not assigned as the material's texture. More on that in a moment, but here is how you can see the size of your texture file:

I took the .blend file you uploaded and did a couple of things: I unwrapped the tower and applied a color grid as an image texture. This is a feature you can use within Blender to add a numbered grid as a new image texture:

I also made the new image 1024 x 1024, which is a standard size... but you can use larger or smaller.... It helps to size them as pow3ers of 2, like computer RAM:  512, 1024, 2048, 4096. 4096 would be pretty big... but I am just showing you the powers of 2. This is not mandatory, but speeds rendering.

I then applied the color grid file to your model:

The numbered grid lets you see if your texture file is being squashed or stretched... There are a couple of ways to deal with scaling your image, but here is one:

I also turned your lamp into a "sun" type lamp and pulled the camera further back to get a full view of the tower. I am not sure those changes were critical, but I wanted to note that I did this. I uploaded the file with these changes and you can download it below.

Also, when you are assigning an image to a material in Blender Internal, specify "Image or Movie" in the texture "Type" dropdown:

Then select the file to wrap onto your model. But make sure you are specifying that the image is applied as a material texture here --

I believe you had accidentally assigned it as a brush texture (the checkered box to the right of the material box...)

Anyway, once you see the color grid in place, you can replace it with the real texture you want to use.... And you can make your tower more than on material and image texture, but I hope this helps.


Need help with manipulating center points! I have an object which is formed of different layers of mesh. I want to show it open up , with smooth animation, and then close again. I have tried what some people suggested on here before, which was to use manipulate center points and scale. However i get a little problem with this, which you can see in the image. If anyone knows how to fix this, i'd be really happy :)

Driver controls Delta Transformation Location X value

The red object location relative the to yellow object location controls the final locations of the blue planes via a driver.  The red object is useful for the Blender python script driver described below.

A red delta mesh object controls the Blender Object [Delta Transformation] Location X value of the two flanking light and dark blue planes relative to the yellow middle plane.  A Delta Transformation Location value is added to the regular Location value to see a final location on the screen.  Simple Addition.  A python script driver allows us to use the distance between the red cube and yellow plane to offset the blue flanking planes.  The red cube can be animated. Multiple locations for the the red cube and controlled movements of flanking planes are shown in the animated .gif file above.

Many of the images below are composed from multiple Blender screen captures to reduce time, produce single size images.  Keep that in mind when inspecting the images.  Click on images below for larger version and to read the text.

Flanking planes final placement is controlled by red object. Outliner windows shows objects involved. Composed image above emphasized by black divider.

Flanking Planes left and right.  The tool tip on the Delta Transform X Location show a simple python formula.  The purple coloring of the value and the tool tip indicate a python script driver is used.  Add Single Driver was selected  from value pop-up menu.

The driver windows show the driver values for the moving planes.  The arrows indicate the Graph Window and the Editing context. A Composed image to compare formulas .... emphasized with black areas.  Click image to see larger view.

You must select one plane and add a driver.  Then you must select the second place and add a driver.

The two simple names and text formulas you must type into the respective windows below and are visible in the screen capture as well.

(delta - middle) ... and ... -(delta-middle)

All other values come from the menus.

Simplified sequence of steps.  Inspect and Improve.

This proposed answer is not a tutorial for beginners.

Please search [Blender Driver Tutorials] and you will find many matches for free on the famous video website.  If you need a tutorial see a video tutorial, this is an efficient use of time.  Many videos will show you how to create a driver in general.

A recent video on Blender Driver Tutorials on a video website will provide a better visual tutorial.  The video will not have the simple formulas stated below. Video tutorials often work better than text tutorials for Blender.  Recommended for people who state they are beginners.   You can even search here at BSE with the keywords provided.  I am sure I and many others here at BSE learned about drivers by searching on the very famous video website. This is not intended as a tutorial on drivers in general.  This site has claimed not to be about tutorials.

The 4 objects placement is indicated above. Red cube is controller. 3 planes have initial separation.  Select a flanking blue plane.  Locate and Know the Delta Transformation values are listed below the regular Transformation values.  I am using the X location for this example.  Mouse over Delta Transformation X value, alternative mouse click brings up the menu indicated above.

Add Single Driver.  Purple indicator appears.

Create a new window or reuse window. Change to Graph Window.  Select [Drivers] editing context.  Make driver info appear by click the + sign faintly visible on the right side of window if necessary.  Add variables and create your variables to match the values in the screen captures above.  Note the object names I use may not be the same as your object names.  Thus use the object names in this proposed answer or translate with awareness.

The red cube need not be rendered.

Make sure  User Preferences allows scripts to be executed  ... if a related error message appears.


Adding 'stretch to' constraint on spring with target will change direction of spring I am trying to add a spring to my object's armature that will stretch and shrink. But when I apply the 'stretch to' constraint in the 'Apply constraint (with targets)' section, the spring suddenly changes the direction and is not aligned with its target (shown in pictures below). Could anyone fill me in on what I missed to have the spring align with the target?

To fix this you have to Select your Spring and press CtrlShiftC to add Constraints (with Targets) and choose "Copy Transforms" Constraint, this will add an empty were your mesh is and copy its Transforms this way giving your mesh the default: location / scale / rotation and for you to be able to change it, by moving / scaling / rotating your empty


is there an easier way of doing corners like this? im doing models of interiors and one of the parts used molding around doors. is there a easy way of doing my corners other than having to get 2 frames and work inwards towards eachother?

Here's a pretty solid workflow if you don't desire to use multiple objects in the creation.

I'm posting the image sequence for now, so I don't mess that part up, then coming back to give the commentary per image.

Shift+A >> Mesh >> Plane.

Tab to enter edit mode.

I to inset the active face the desired amount.

Delete >> Only Faces.

Result of Deleting the face (giving you the major frame profile).

A to select all faces.

E to extrude the desired overall frame thickness.

Ctrl+R >> 2 >> LeftMouseButton >> RightMouseButton

Click on the Face Mode icon/button.

Z >> Select the inner ring of faces (as shown).

With your cursor just outside the outer edge of the frame E >> S >> Move your mouse toward the center of the frame the desired amount >> LeftMouseButton

Click on the Edge Mode icon/button.

Select the Edge Loops at both the Inner Top & Inner Bottom of the frame.

Ctrl+B >> Move your mouse outward the desired amount >> Either type the number of segments & hit Enter OR scroll up on the scroll wheel of your mouse the desired amount & LeftMouseButton.

Hit Tab & you are complete if you desire a 4-Sided frame.

If your desire is to have a 3-Sided frame >> Tab to enter edit mode. >> C >> Select the bottom most horizontal edges of the frame.

Delete >> Only Edges & Faces.

The result is two empty holes that we must repair/fill.

Loop Select the left most hole. >> F to fill.

Loop Select the right most hole. >> F to fill.

Select both Edge Loops again.

S >> Y >> Numpad 0.


Why are some material nodes connected to themselves? Here's a small thing I've been wondering about for a while: Occasionally, when I import models from other sources (e.g. 3ds Max -> FBX -> Blender), I see in the Node Editor some nodes which are apparently connected to themselves. Like so:

Can somebody explain what's up with that? How is this self-connection useful? How can I do it in Blender?

The node is not connected to itself, it is muted. You do that to a node by pressing M. The red line indicates a "pass-through" - the input goes straight to output and the node is disabled.

I would guess the script that creates the node network always makes the full tree and just mutes the nodes that are not used in the original material, like normal mapping in this case.


how to change boolean cutter to wireframe automatically? When add boolean modifier (difference/cut), how to make the 'cutter' object to be wireframe automatically so i can see the the result and the cutter/brush interactively.

You need to check the 'use wire instead of Bbox' in addon preferences.

Ctrl + Alt + U  to bring up this 'user preferences' window (just in case)


Garment Digitization in Blender Hey Blender Community!

We at TRI3D at developing virtual dressing room technology. Currently we are using blender's cloth simulator as a test bed. The results have been very encouraging. Have a look at the simulation video to get an idea about the simulation quality.

There are two parts to the problem , garment digitisation and cloth simulation. We would want to open source the garment digitisation work which we would want to implement as an add-on.

To start off things we hosted the code on bitbucket, and also made addon installation and usage videos.

We would want to have Marvellous Designer like features for the blender cloth simulator to create the garments in an intuitive way.

How this add-on will help ?

Model the Garment Outline, Meshing will be taken care by 'meshpy'
Sewing Springs and Positions of Patterns can be saved and reused.
Can handle multiple garments and multiple patterns inside it.

Issues:

Currently we are not providing it as an add-on zip, source code is
available on bitbucket

2 . Requires meshpy to be installed in blender python site-packages

We have lot of features planned up. But before diving further we want to make sure the framework is right. We are really new to blender scripting and would want to make sure we are not committing any beginner mistakes. Hoping the community will support us in this project!

So what is the question really? Can you add a phrase ending in a question mark to your post.

This all sounds like excellent progress and great news for the Blender community in general, unfortunately this seems like the wrong place to post this sort of work.

If you want user level feedback you should probably post this in the Blender Artists Forum where it will probably gather a lot more attention and feedback.

If you are looking for developer feedback or a way to get this merged or approved into official blender then you should probably contact the developers, possibly through the bf committers mailing list. Developers don't come here often if at all.

As far as I know there are currently developments efforts already being made for the cloth simulation area, and general physics simulation improvements targeted for the great upcoming Blender 2.8 revamp.

It would probably be beneficial if your work aligned well with the upcoming changes, and possibly take advantage of them.

Maybe you can even contribute your knowledge or skills to help in the improvement of the new features.

Maybe also contact Luca Rood, who appears to be in charge of this area so we can mutually benefit from it


How to make the light from the flashlight in Blender Cycles? How to make the light from the flashlight in Blender Cycles?
The Emission node doesn’t give volumetric light:

I'll use it in animation, example:
.

the volumetric part of the light could be a parented object on his own, with appropriate nodes and textures for emission, transparency, translucency, maybe in a separate layer to be blurred, alpha overed and color corrected.


Launch Blender cycles render from terminal with tiles rendering view Sorry for the title, I don't know how to better explain my "problem".

In a nutshell: I would like to open from terminal or win prompt a blender file and see it render on the screen the same way it does when you hit f12, I mean seeing the tiles rendering on screen. The result has to be a windowed UV/Image editor with no bars and menus (did it before as you can see i the code below I called it 'viewport') that let you see the progress of rendering.

Here's my terminal command:

blender /path/to/file.blend -S scene_name -W -p 200 200 800 600 -P /path/to/script.py

Here my script.py content:

import bpy

bpy.context.window.screen = bpy.data.screens['viewport']
bpy.ops.render.render(animation=False, write_still=True, use_viewport=True, scene="scene_name")

the -S argument is redundant I think, but this isn't a problem.

I need your help, you pros! :-)

Ok I manage to solve my problem adding some line to my python script. This is the result:

import bpy
bpy.data.screens['viewport'].scene = bpy.data.scenes['scene']
bpy.context.window.screen = bpy.data.screens['viewport']
bpy.context.screen.scene = bpy.data.scenes['scene']
bpy.ops.render.render('INVOKE_DEFAULT', animation=False, write_still=True, use_viewport=False, scene="scene")

This makes me see the tiles rendering the correct scene and at the end it save the image in the dir specified in the render settings tab.

Now I've come across other issue but this is another story.

Thank you guys!


Image texture has small dark lines I have a question about image texture. If I add my image and play around with mapping, something like this happens.There are small darker lines. The lines are not in the image itself. Can anybody help me,what can I do?

I saw on blender-today, yesterday, someone brought this question up with curved surface low poly artefacts.  Adjust the angle or shape of the poly faces with rotation or sub-divide to see if that helps.


Does Baking Texture Atlas also include the normal maps for the texture? The Title pretty much asks the question - baking a texture that has a normal texture attached also bake the normal map to the texture atlas?

No, the textures atlas is just that, for object textures only, and is adjusted with the tabs below the bake tab..so that you can include or exclude texture properties from the texture atlas. l think that the process could be applied to the normal maps too.. but the manual is not clear on that.. so proceed with caution...


interrupted by signal 11: SIGSEGV when running bpy module from Flask app I've built Blender as a bpy-only module meaning I can call it directly from Python. I was able to run some commands, but at the moment is failing with simply opening a main file.

My code is super simple:

@app.route('/')
def hello():
   bpy.context.scene.render.engine = 'CYCLES'
   bpy.ops.wm.open_mainfile(filepath='/home/yuranos/development/3D/model_all_parts.blend')

And yet I'm failing when trying to open my file:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

The interesting bit is that the same python version with the same bpy-related code runs perfectly well from console. I'm new to Python and don't understand if it's a problem with the way I use bpy from Flask or with bpy itself.

Haven't done much with flask, will offer this up as a suggested workaround.

Try loading the mainfile outside of @route decorated methods.

Putting the load operator in any route method also caused a segfault for me (Ubuntu 18, blender 2.90, python 3.82)  Suspect a threading issue.

The following works as expected,

# batTOOLS...........

from flask import Flask
import bpy

app = Flask(__name__)
bpy.ops.wm.open_mainfile(filepath="/home/batfinger/Documents/blender/tests/BISECTO.blend")

@app.route('/')
def hello_world():
    lines = []
    for o in bpy.data.objects:
        lines.append(f"{o.name}</br>")

    return "\n".join(lines)


How to attach a mesh to another mesh Started using blender a week ago, so im kinda new. And i have no idea how to do this properly. I've got 2 cubes, one which is going to be an house, and another cube that i want to make the porch. So i would like to attach that to the main building. I've got no idea how to do it, and found nothing around the net about it. Any help?

You may try that

Select both objects, hit Ctrl + J
Select the two or more vertix you want to be combined
Hit Alt + M
From Pop up menu, may select, At First, At last etc as required

Best of luck !


Help with exporting a 3d model in ~.stl format and adding colour data I am using matlab for a university project to create a simulation of an aerial package drop using 3d models that I made in Blender. I am exporting from blender in ~.stl format (binary form) and importing the file using a matlab script to use in a 3d graph.

Now comes the part I need help with. Rhe script I'm using in matlab can also extract colour data (if any) from the file and apply it to the model. However, a standard stl file only contains info on vertices and faces, but I know from a little research that it is pssible to create ~.stl files with colour data included.

While I could either artificially create the colour data in matlab or just give each model one colour, I'd like to be able to just import the data from blender. Therefore, I've come up with a couple of ideas and was wondering if anyone knows the method/related scripts to achieving one of these solutions? They are:

export model in a different file type that contains colour, to do this I would (probably) need a different matlab import script relating specifically to that file type;
find the correct settings or find a python script that allows blender to attach colour data to an exported ~.stl file; and,
export each different coloured part of each model as it's own model and relate their position to each other in matlab. this I know how to do, but it's tedius and would slow down the simulation unnecessarily.

Also, two other quick things. I'm currently creating the models using cycles engine, in terms of exporting (colour) model data would it be easier to switch to blender render? Also, out of curiosity, to what extent can the material effect from blender be exported? Obviously diffuse can be exported cause it's just applying model colour, but what about effects like gloss, transparency, reflections, etc?

Thank you for your time.

According to wikipedia there are two different schemes in use for including color data in an stl file.  Unfortunately, they differ significantly from each other, and there is no way to specify which is in use in a file.

So first, I would determine which format matlab exects.  This script says it can save in VisCam/SolidView format, so it would be reasonable to expect it to import this format as well, but you'd better check.  The problem here is that blender doesn't support the colored format, so you'll have to modify blender's export script...

Since all you're doing is exporting it to view with matlab, a different format that supports textures would probably be a better choice.  STL is meant for 3d prototyping, where color typically doesn't matter.

As for the other questions, I'm not sure.  Usually it's better to put each question in it's own post.


VSE: Use png images in one channel as alpha mask for another channel I have rendered a 2D animation from Synfig as png images. It put out the png image of each frame and also the alpha values of each frame as separate png. (basically a white silouette of the animated shape with a black background).

However, I cannot find a way to use the alpha pngs as transparency mask in Blender's VSE (Blender Version 2.79 on Windows 10). I loaded both strips of images in separate channels but can't find a Blend mode that subtracts one from the other. Any help would be much appreciated.

I agree that it is a bit hidden.

I have three strips here, a blue one which serves as the background, an orange one as foreground and the black and white at the bottom to use as alpha channel.

The orange strip on top is supposed to get the mask. In order to do that, it needs a Mask Modifier with the Black & white strip as its source.

After that, simply select 'Alpha Over' as the blend type for the top strip.

The alpha mask:

What you get with the default blend type (Cross):

The finished result:


Struggling to model irregular rounded shape, any recommended tips/tutorials? I've tried to search for tutorials on modelling irregular/rounded shapes but they seem to all be for symmetrical shapes.
I've been trying to recreate an object by using a subdivided plane and following the shape of the object by using sizing and movement with proportional editing. I also tried to re-create the object by using a cloth simulator, which obtained the wanted shape but I had the same problem as I am having now.
The object I am trying to re-create:

This method has been a little bit fiddly and I assume there must be a better way to achieve this, if there is any advice that can help with my modelling I would be grateful to hear it.
The problem I am having is bringing in the plane to fit nicely on top of the original object and to have the vertices lined up. When I bring in the plane it crinkles and loses the smoothness of the original object.
It may be possible to continue with this method but I feel I'm on the complete wrong track.
The problem:

Thanks

Assuming this is an exercise; that you're not wanting to retopologise the original in some radically different way..
This is a subdiv. model: the topology is a that of a Round Cube.
So, starting with 1/4 of one of those, mirrored left to right, and keeping the poly count at the minimum to capture the curvature:

.. just shovel the vertices around under proportional editing, while looking at the result under Catmull-Clark subdivision, level 2. You could use a more orthogonal reference, for accuracy.

Add a Solidify modifier for thickness, creasing the rim, and, after applying the modifiers, extrude the fillet.


Make strength of emmision independent from the surface brightness How can I make that sphere glow less but still keep the luminance. I've tried to mess around with the options but without results.

With the Blender Internal renderer, it's not very easy, but it is doable.
The basic idea is to render the glowing ball twice, and composite the dimmer one over the brighter one.
Keep everything you have so far, but investigate how to render just the ball. The basics are, move it to its own layer and set up a second set of render layers that gives you only the ball, with nothing else in the scene at all.
More on Render Layers from the Manual:

Each Render Layer has an associated set of Scene Layers. Objects which are on one of the associated Scene Layers are shown in that Render Layer, as long as that Scene Layer is also visible.
Warning
Only the objects in visible Scene Layers will be rendered. So, if only Scene Layer 1 is visible and your Render Layer set specifies to render only Layers 2 and 3, nothing will be rendered.

Once you have those two renders happening at the same time, you will use the compositor to put the dimmer ball (that's all by itself) over top of the image that has everything in it. You'll use an Alpha Over node to combine the two.
More on the Alpha Over node in the Manual:

Use this node to layer images on top of one another. Alpha Over does not work on the colors of an image.

Doing this with Cycles is much simpler, but Cycles does not use the same materials as BI. You will have to make your materials again, as Cycles materials. That's why everything doesn't have any color when you just change renderers. Cycles is using a default gray material.


Where is the color selection for text menus? I want to change the color of the File, Edit and View menus:

And all the similar menus such as the 3D view menu:

Where can I find the settings for these text menus?

This is in the the group Pulldown under User Interface as Text.


Where is the sqeeze value node in Cycles? It's supposed to be here.

what I actually need to do is make a shader that mixes between shaders not colors dependent on camera distance, mixing between colors works, but using as a factor on the shader mix node doesn't, so I thought maybe I could use the squeeze value on the camera data node as mentioned here:

http://blenderartists.org/forum/showthread.php?82183-Camera-Data-Node

Thanks for all the help everyone, i found the solution, it wasn't working because i had the camera in orthographic mode, here i'll post a picture of the node setup that works.

Note the title of the question is now misleading, so the answer to that question was that cycles does not have a squeeze node, but the answer to how to blend between two shaders based on distance from the camera is here.


How to align object well enough to integrate into array modifier? Edit: I found the merge checkbox on the array modifier (whoops.)  But the alignment problem is still interesting...

So, let's say I'm following yet another tutorial from the blender Guru, how to create a spaceship corridor.  This thing is a beast.

So we start with modeling a quarter of the ship, since it is all nice an symmetrical.  Like so:

We proceed to mirror it into something that looks a bit nicer:

Great!  Then, the guy simply adds a plain to act as the bottom.  Simple enough!

And Viola!  We hit CTRL + J and expect the the object to join that which is being mirrored.  Unfortunately, I can't seem to align it right.  I'm exaggerating for clarity, of course, but I get either:

 or something like:

I can't seem to figure out a way to alight this in a reasonable amount of time so that the edges actually touch each other.  As you see, when I am seeing the "Array" modifier, it makes no effort to weld the pieces of the array together, instead just putting the "pieces" as close together as possible with no overlap.  Therefore, the floor has to be exactly the same size as the original mirrored piece!  I can't seem to make this happen!

Thank you very much to anyone who can tell me how this can be done properly!

Joining your objects changed the plane's bounds, using the corridor's bounds. Array modifier is using the object's bounds as a reference (1) for the relative offset. The bounding box can be visible, it's a box containing your complete object.

Your plane is smaller than the bounding box, so it's repeated inside it. You need to fix it's topology to fit the bounds of your corridor.

To do this, activate vertex or edge snapping

Move the needed vertices/edges along 1 axis (Y on my sreenshot) with G, and  X, Y or Z. The mouse cusror will change when close to a vertex/edge it can use to snap

Do the same on the other side

Now your plane will fit the corridor's array.


Fixing fake rotation I've got a model, which after importing from CAD has wrong rotation, but in blender it has rotation equal 0,0,0 . I need to correct "visual rotation" to correct model rotation.

Do you have any ideas how to fix this problem, because all the models in this import have wrong "visual rotation".
Thanks for future advices.

To do that, set snapping on with these setting:

Then create an empty and move it on the face on the nut:

The empty now has the same orientation as the nut.

Parent the nut to the empty: select the nut then shift select the empty and CtrlP.

Now select the empty and remove its rotation using AltR.

The nut is well oriented.

Last steps, clear parent from the nut AltP with keep transforms and apply its rotation CrtlA then rotation.

Note: if several objects have the same fake rotation, you can use the same process parenting them all to the empty.


Why is my duplicated mesh acting goofy? I made a tooth in edit mode. When I tried to duplicate it and modify for the other teeth, they look right in edit mode, but when I display the rendered preview, they are out of place and enlarged. How can I fix this?

Edit: It isn't the render that is causing the problem. The same thing appears in object mode in the other views also.
Additional edit: After I turned Blender off and back on, I saw a whole rainbow of teeth. Some kind of cyclic dependency or something?

I think I have figured it out. It has to do with the shape keys I was experimenting with. I had a shape key assigned to the jaw to make the mouth move. Apparently attaching the teeth to the jaw after the key was assigned is not a good practice. I believe that's what led to the teeth expanding and moving out of place. I am going to remove that shape key, create the teeth, and then redo the shape key. If that doesn't fix things, I'll be back!


Boundary not working with inset faces command I'm working on Blender Guru's anvil tutorial.  At this point he insets a face and uses the boarder option to achieve the desired result.  I'm using v2.9 which no longer supports the B shortcut, but I can enable it in the new sub-menu for the command.  Nevertheless, nothing happens and the boarder piece remains, so I can't perform the extrude on a single entity; it comes out as two spikes.  What am I doing wrong?

If you turn off the Mirror, you will see that your anvil has a face inside look at the image, oce you delete that you will be able to use inset as expected


Why isn't local transform orientation doing anything? Very easy problem to explain: the local transform orientation is not doing anything. Which is a problem because I want the bottle to move exactly down a certain axis. Tapping the axis twice does not do anything either.

Thank you in advance for any help!

It looks like you have applied transformations using CTRL+A.
If so, you can try enter Edit mode and select Transformation Orientation to Normal.

Another option is using for example a model's edge and move the model's geometry by it's normals, then reset the origin - like this:


How to make a varnish transparent effect? I'm working for a company and I have to create something in 3D with a varnish effect on it. I can't show you the product but I can show you what I want to do thanks to my business card:

I have a layer of varnish on my "glasses". I want to do that. I tried different things, transparency, alpha, transmission... I just can't get it right. It came up too dark for most of the time. Sure, I tried to just pop the image texture on it again, but it's a lot of work and I have like 15 different products with differents varnishes to put on it.
Can someone help me?
Thank you!
P.-S. I'm not a native english. Sorry.

You could create a mask for the area that is supposed to be glossy:

then plug it into the Roughness factor of the Principled BSDF. Mix it with a bit of noise if you don't want it to be too clean, and use this setup to create bump if necessary:

it should work:


How can I create a crashing wave effect? I have a scene with a stormy ocean, and I am trying to create this effect:

I've been looking for tutorials on "crashing wave" or "ocean spray" without much luck. As such, I've run up against a wall.

Can I get tips on how to accomplish this? Should I use a particle system or fluid sim? Material recommendations (cycles)?

Or perhaps I have missed a good tutorial somewhere, to which someone could direct me.

Thank you for any help you can offer.

A simple solution to get you started is to use a particle system and the smoke simulator.  Initial testing on my end used a camera set high on the Z axis facing down to the emitter object within the smoke domain.  Track the smoke within the domain to the particle system.  Emit for about 20 frames with a lifetime of 20 on the particles. the object I used was an icosphere cut in half with the rounded side facing the positive Z axis also the object emitted from the faces.  Under Emitter velocity, I set the Normal to 15, initial velocity on the particles per axis at X & Y = 0, Z = 5.  As the particles move out from the emitter, the smoke will follow their path.  As for the crashing of the waves exploding onto the dock, use an object within the domain as both a particle obstacle and a smoke collision object under the physics tab.  Within whatever render setting you should be able to control the material and or color of the smoke to simulate water and foam.  Run the animation and tweak to your needs. Hope this helps.


Why puddles instead of water flow? I was following this tutorial.
I created:

circle as water source,
pool,
domain.

I selected Cycles Render;

Objects have following settings:
water circle: fluid type - Inflow, Volume - Shell, y = 1;
pool: fluid type - Obstacle, Volume - Shell;
domain: fluid type - Domain;
I pressed Bake, waited till it finish and got shaking puddles during play.

Here is my project: https://drive.google.com/open?id=1pFP8xoK48LCwkeW36FYCCsEpdY7qOjPH

From your screenshot it appears that your 'inflow' object is just a plain circle with no faces. This will result in only a very small inflow of fluid since it is the faces (shell) or the volume that contribute to the flow.

The simplest solution will be to select your circle inflow object, go into Edit mode (Tab), select all (A) and press F to add a face. If you now bake your fluid simulation you should have a proper flow of fluid rather than just intermittent drips.


Automatic Weights not recalculating after moving Bone I am working with a fairly simple rig, as I'm pretty new to rigging/animation in general.

I created my bones, and later parented my mesh to the armature with automatic weights.

Later, I wasn't happy with some of the bone positions/sizes/orientations, so I moved them around in Edit mode.

I visited this question, in what I thought would be a simple way to recalculate the automatic weights. However, nothing appears to happen? Am I doing something incorrectly, or is there some type of problem keeping these weights from being regenerated.

In the provided gif, note that the weights stay the same after the bone is dragged way out of position.

I believe you should be in edit mode and not pose mode.

Suggestion. Manual weight painting is time costly.  If you have zero or or close to zero investment in manual weight painting then simply delete your existing [bone weight] work and start fresh to be time effective.  You have the luxury at the moment of discarding what might be a mistake rather than doing a sequence of recovery steps.

Simply assign automatic weights all over again.  That is 8 seconds of work. In your situation, the action of

Parent Armature with automatic weights Control-P

can be done many times since you are not losing time costly manual weight painting.

Please know that a large bone next to a small bone will have generally more influence except where the small bone is extremely close to the mesh.


How to make the surface look smooth, i have used the modifiers I've modeled a "yakult" bottle with a mesh cylinder, and have used a modifier tool (Subdivision Surface and Smooth) to make it look soft. I'm happy with the results on a solid preview, but when I render, It looks like a line which is stripped or surface lines appears.
the question is, how can I make the modeling look solid and smooth on render preview? What should I do?

I have taken a sphere and added Subdivision Surface Modifier to it with the view 2 and Render 0

As you can see the sphere look smooth. But when i hit render i get this render

Flat or un-smooth sphere

Reason is the setting in the subdivision instead of Render value 0 make the same value of 2

And you will see the same result seen in the 3d solid view.


Fluid Simulation went wrong My Goal is a Box with closed doors hovering in the room with a golden Fluid flowing out of it.
My File was already looking good.
I decided to change the Body of the inflow, but when I bake it the Result isn't looking right.
The Fluid fidgets in a space but ignores my obstacle settings for the Sides.

Thanks for any help with getting my Fluid to flow properly in advance.

If you want to download the file here you go:
https://drive.google.com/open?id=0B2KvkZumDeuJQmRfXzZBdlFPRnM

Things have to be completely contained in the fluid domain in order to be considered/Calculated.  You may need to scale up the domain so it completely covers the scene and the obstacles.  Also, if your domain's scale is off, your particles may phase through things because of size differences.  Try scaling your scene up (to around 4 or 5 meters), but also know you will increase the cache size and simulation complexity.

I'll load this up later to make sure, but this looks a lot like my struggles with the fluid sim.


"Failed to find Grease Pencil data to draw into" when using 'bpy.ops.gpencil.draw()' I am in blender 2.79b. I would want to draw grease pencil lines by feeding in the points_list calculated in a programatic manner.

When used in "Poly" mode, this is the info output:

bpy.ops.gpencil.draw(mode='DRAW_POLY',
                     stroke=[{"name":"",
                              "location":(0, 0, 0),
                              "mouse":(451, 503),
                              "pressure":1,
                              "size":0,
                              "pen_flip":False,
                              "time":0,
                              "is_start":False},
                             {"name":"",
                              "location":(0, 0, 0),
                              "mouse":(429, 415),
                              "pressure":1,
                              "size":0,
                              "pen_flip":False,
                              "time":0,
                              "is_start":False},
                             {"name":"",
                              "location":(0, 0, 0),
                              "mouse":(363, 347),
                              "pressure":1,
                              "size":0,
                              "pen_flip":False,
                              "time":0,
                              "is_start":False},
                             {"name":"",
                              "location":(0, 0, 0),
                              "mouse":(407, 295),
                              "pressure":1,
                              "size":0,
                              "pen_flip":False,
                              "time":0,
                              "is_start":False},
                             {"name":"",
                              "location":(0, 0, 0),
                              "mouse":(527, 219),
                              "pressure":1,
                              "size":0,
                              "pen_flip":False,
                              "time":0,
                              "is_start":False}])

but when executed in console, it is giving me an error:

RuntimeError: Operator bpy.ops.gpencil.draw.poll() Failed to find Grease Pencil data to draw into

What steps am I missing to activate the grease pencil , so that it can work from a script?

Don't use the operator

The error is alerting you that there is no current grease pencil assigned to that scene, and with no gp it doesn't poll.  Have a hunch tho, that adding one will lead to next poll error of incorrect area, when script is not invoked, or overridden with context of a 3d view. See here

The operator command bpy.ops.gpencil.draw is using 2d coordinates of the 3d viewport they were drawn in. These will change based on the orientation of the view. Would be far better off adding grease pencil using the API methods available. (note add links).  Each point can be given a specific 3S location. This is what the UI is doing for you, akin to placing 3d cursor

Similarly to Mr @TLousky's Answer, without using any operators  add a grease pencil, layer, frame stroke and finally points to draw a 2 x 2 square on the XY plane.

import bpy

context = bpy.context
scene = context.scene
gp = scene.grease_pencil
if not gp:
    gp = bpy.data.grease_pencil.new("GP")
    scene.grease_pencil = gp

# Reference grease pencil layer or create one of none exists
if gp.layers:
    gpl = gp.layers[0]
else:
    gpl = gp.layers.new('gpl', set_active = True )

# Reference active GP frame or create one of none exists
if gpl.active_frame:
    fr = gpl.active_frame
else:
    fr = gpl.frames.new(0)

# Create a new stroke
str = fr.strokes.new()
str.draw_mode = '3DSPACE'
str.line_width = 5 # default 3

points = [(-1, -1, 0),
          (-1, 1, 0),
          (1, 1, 0),
          (1, -1, 0),
          (-1, -1, 0)]

str.points.add(len(points))
for p0, p in zip(points, str.points):
    p.co = p0


Objects stays solid when render in camera view When I activate render mode without view from camera it renders fine, but when I enter camera view and then try to render objects stays solid.

It looks like you have accidentally set a Render Border in your camera view, however, the border is so small that it appears that nothing is being rendered. I have highlighted the very, very tiny selection border in your picture below, but to turn it off use Ctrl + Alt + B. If you're interested in actually using it later, you can draw a new border with Ctrl + B


Why does 'bone roll' have a separate hotkey from 'y-axis rotation'? I noticed in Edit mode on my bone that I could rotate a bone with R+X or R+Z entirely as expected, but in order to rotate along the Y-axis R+Y simply has no functionality. Instead I'm forced to memorize a new hotkey, Ctrl+R to accomplish this same task. Why does the hotkey R+Y merit this replacement? I will need a good reason, since I believe that no appeal to local vs global axes has anything to do with this. Specifically I'm expecting Ctrl+R to contain some extra functionality I'm unaware of.

If you look in the Properties/Transform panel you will see that individual bone transforms are defined differently to other objects; they have a Head location, a Tail location and a Roll angle whereas other object types have Location and Rotation property sets. The Roll Angle can be used to influence how they deform when e.g. IK Chains are animated.

The rotation hotkeys in Edit Mode will spoof the usual effect by changing the Head and Tail transforms for Bones rather than changing the Rotation properties like they do for other objects. If your bone happens to have its main axis (from the fat Head end of the diamond to the thin Tail end) aligned to one of the global axes then the more relevant Roll Angle hotkey is required.

In my Edit Mode example here I have some bones along each of the global X, Y and Z axes and one that is not aligned to any of the axes. Those on the X axis only respond the the Y and Z rotation hotkeys, those on the Y axis only respond to the X and Z hotkeys and those on the Z axis only respond to the X and Y hotkeys. The diagonal bone responds to all three rotation hotkeys. All of the bones respond to the Roll Angle hotkey.


3D Printing Model Correction Here's a relatively simple model that I want to print (for bathtub drain). It is made by only creating cylinders and cubes and applying Array and Boolean modifiers.

When I import it as .stl and load it to Slic3r (for correct result, scaling by 100000% should be used since .stl doesn't contain the scale), it shows this in 3D:

which is ok, but there's warning which sais "Auto-repaired (18 errors)" and tooltip sais that "5 degenerate facets, 5 facets removed, 4 facets added, 4 facets reversed" and Preview shows this:

and Layers shows this for the first layer:

I wonder what I'm doing wrong and how to fix this. I haven't tried to print this yet, but the preview suggests that it will be no good. Here's the .blender file: .

Perhaps Multiple Problems.
Edit Mode.  Select Non-Manifold identifies some problems.
See Arrow in image above.
Add faces to holes you see.

Strange face. Edit Mode Face Selection. See arrow. Remove doubles can correct partially. Image above.

Look for more problems.  This does not strive to be a tutorial.

Consider using Blender Mesh [Join]. Inspect each time with the menu choices of the first image.

Consider converting all n-gons to quadrangles or triangles. Quads and Tris.

Consider the Remesh Modifier. There is an Apply button.

Consider duplicating the mesh and making corrections to improve to the point when your 3D printer software has zero warnings.  I do not have your 3D printing software.