set the view centered on an object I'm new to blender and I'm not sure how to approach the problem.
I like to work with orthogonal views;
I created a scene with a penguin, and the penguin is now facing an arbitrary direction.
However, I now need to fix the penguin's shoulders which are too big.

I wish I could find a way to get some orthogonal views centered on my penguin (which has a mirror mode by the way) because I have a hard time editing the penguin using a non orthogonal view.
I did not found a way to set such custom view, so for now my workflow is to memorize the penguin's rotation values, then turn the penguin back to 0,0,0, then update, and finally re-rotate the penguin back to the desired angle.

It works fine, but I wonder if there is a better approach to this problem ?

This seems like a job for the basic view tools which are hotkeyed by default to the numpad.

Just have a single large polygon with the same orientation as your model and then select it when you want to re-adjust your view press Shift + NumPad 7, Shift + NumPad 3 or Shift + NumPad 1


Red lines in dope sheet? I've had no luck googling for it, yet. What do the red lines in the dope sheet mean?

Both the dopesheet and the graph editor show a red line when the data path for the fcurve cannot be found. While most times the fcurve stays connected to the correct item, there can be times when this doesn't happen, most often when the item is renamed or deleted in an external file from the one containing the animation. You will also notice that the shown data path is the complete raw path when it is broken, rather than the more user friendly abbreviation.

If an item has been renamed, we can correct the data path in the fcurves properties panel in the graph editor. If the item was deleted then you can just delete each fcurve, you can do that by selecting it in the list and pressing X or ⌦ Delete.

For a large number of items, it may be easier to make a script that will correct the data paths.


Decompose image into albedo and shading with cycles I am using cycles render in Blender for my scene and would like to decompose it into albedo and shading components. The concepts could be referred from these sites:

http://www.cs.toronto.edu/~rgrosse/intrinsic/gallery.html
and
http://sintel.is.tue.mpg.de/

I have check around Google and most of the forums suggest that the color pass of Diffuse BSDF could be used as albedo. However, it is not really sufficient because (1) cycles has more than 3 component (diffuse + glossy + transmission + more) while the original idea of albedo and shading contains only 3 (albedo * shading + specularity) and (2) the shading concept is usually referred to as a 1-channel grayscale image, while the difuse lighting image (direct + indirect) is shown as 3-channel color image.

I am arguing that the original concept could be too simple to describe a complex scene (as they consider only Lambertian component) however, I couldn't find any support for that (i.e. a scene could be decomposed into more than just Lambertian).

The basic idea is there in Cycles lighting passes, Cycles just breaks things down further than those images do. Here's the overview of how to reconstruct those albedo+shading+spec images:

Albedo = diffuse color + glossy color (Cycles splits albedo out by type of light interaction. In our case, we don't care, so we just sum them)*

Shading = diffuse indirect + diffuse direct (diffuse shading is split by direct vs indirect, so we need to sum these)

Specularity = glossy indirect + glossy direct (same deal as diffuse shading)

  the original idea of albedo and shading contains only 3 (albedo * shading + specularity) and (2) the shading concept is usually referred to as a 1-channel grayscale image, while the difuse lighting image (direct + indirect) is shown as 3-channel color image.

The problem here is it does not account for transmission, colored light sources, coloration of bounced light, or colored specular reflections. Accounting for all those is why Cycles throws out 4 different light passes, and all of them are RGB. It also doesn't account for self-illuminating surfaces, hence why the emit pass also shows up in Cycles.


3D modelling Wired Designs I came across this 3d printed item on shapeways, I was wondering how to model this wired design on Blender 2.69. I am fairly new in modelling on blender. Kindly give me one or two pointers.

You can use the new Wireframe modifier to do this. It will convert edges into solid geometry:

Or you can use the old Wireframe tool:

Select your mesh and enter edit mode (Tab)
Select all (A)
Press CtrlF> Wireframe.


How can I link bones from the same armature? Head to Tail and Vice-versa? Hey guys.

So I'm trying to rig the lamp in the picture(s) but I'm running into a technical difficulty with the armature. I've already read up on the other questions posted in here but they don't really apply to my problem as far as I understood them.

The bone nodes that have been circled are part of the same armature. What I want to do is close the loop of the armature and make one close loop armature as a whole. So I was hoping I could just merge the nodes that have been circled or even link them so that when I move one set of the bones the others shift automatically (I have Auto IK ON) and not disconnect like it's happening in the second picture.

Any suggestions if I can do what I want? Thanks.

IK is indeed the solution. It looks similar in principle to rigging a piston, which is just a type of four-bar linkage: https://vimeo.com/25357097

I think the main insight to make your rig work is the use of IK "Target" bones. For example, where you want the spring to connect, create a small bone parented to the link's bone. Give the spring bone an IK modifier with chain length of one and allow stretching. That should be all it takes.


Boolean modifier - Difference, doesn't cut both sides of a cylinder Create two cylinders and difference the smaller one from the larger cylinder. Then construct rectangular cubes to cut across diameter of the hollow cylinder created above.  The cubes only cut at one intersection for each difference.
Is this a feature or a bug? It wasn't what I was expecting.
Blender 2.79
Quartering a tall donut

After having several failed attempts at rectifying your model (Which had many internal faces, inverted normals etc.) I tried to replicate it myself. These are the steps I took:

To your first and larger cylinder, apply two boolean modifiers set to diference. Connect one to your smaller cutting cylinder.

Go to the smaller cylinders Object tab in the properties window and scroll to display. Change the dropdown menu called Maximum Draw Type to wire. This should show only the edges of your cutting mesh. Do the dame for your two cross cutting planes.

Now select both the cutting planes and hit control J to make it one object. Now apply the other bolean to the single cutting object.

Fixed!

Cool! So what does this mean?

When we are using modifiers such as boolean, try not to apply the modifiers until you see your results as you wish. Yes, you may say too many modifiers slows your system, but that is why we try and group items where possible, plus it keeps out scene neater.

Remember, plan what you want to do before you do it.

And if you hit trouble as you have in your situation, it is better to start again. Many times I have seen people hit problems that even I cannot find a solution for. When I try and remake the model, or they to do so, 90% of the time it works the second time. It may be frustrating when you redo your work 5 times over, but it has almost always saved me time in the long run. Plus you learn from your mistakes!

A mistake does not a failure, it's just another step towards success.

Sorry for the pep talk but there you go.

Good luck with your project and I hope I helped,

BFB


How do I render Glowing text effect My querie probably demos my lack of current understanding of the basics, I'm in the early stages still of getting to grips with Blender, I have a simple animation i'm rendering.

Issue: Trying to render text emitting a glow. In nodes, i added a viewer and emission/glare etc and it shows in the "viewer" -(pictured) exactly as i want but in the box below rendering when rendering f12 it shows no emission from text, not sure what has happened.

The compositor only starts to process the image once the rendering is completed or in case you have activate Auto Render once you change the node configuration.

There is a small error in your compositing nodes, in order to see the result in the image editor you have to connect the Image output socket of the Glare node to the Composite node.

Once this adjustment has been made, you can render the image from start to finish. The result of the compositing can be viewed in the image editor if you switch from Render Layer to Composite in the dropdown next to the slots.


How do I produce an uneven offset /solidify modify on a cube? I am trying to create an offset that is wider on one side than the other and i have been using the solidify modify tool, however this creates an even offset. I am relatively new to blender and so any information would be useful. Thanks.

If you are solidifying through the Solidify modifier you can use a vertex group to control thickness.

Create a vertex group and add all desired vertex to it, set solidify thickness to a known value so multiplying by a factor is easy, like say $1.0$ units, or $0.1$ Units.

This value will be multiplied by the Vertex Weight set for that vertex. Now adjust thickness on a per vertex basis adjusting vertex weight.

With with weight paint, Vertex Weight Proximity modifier, or manually.


Cannot left click+Drag and select multiple objects im using blender 2.8 since my udemy course is using it.The problem that im having is i can't left click and drag to select multiple objects and i am using the selection box tool too but if i use the "Select Lasso" and "select Circle" they work just fine at selecting multiple objects. If i press the "B" key to  select objects, that doesnt work either and i have tried defferent versions of 2.8 and i still have the same problem.

Just a thought. And this is probably way late. Hope you figured it out if I am wrong. But make sure that you have the "modeling" option selected at the top menu


denoise node not available under compositing in blender 2.8 I was following blender gurus new donut tutorial. after modelling the donut, i rendered it once, went into compositing to add a denoiser node to the rendered image. but if i search it, its not available. right now i have the render layers and composite nodes.

Denoise node is only available in Blender 2.81. You can download the experimential builds here.


Randomize texture position by frame I would like (for an electricity shader) to randomize its Location by frame...
I know Object Info has a random output but not sure how to change that value each frame.
Any idea?
Thanks

You could add a fourth dimension to your Noise and Voronoi texture and control the W dimension with #frame driver. Just write #frame to the value field.

The frame driver is probably too fast so you could divide it by 100.


Shape Keys: Best method for simple mouth shape Im trying to determine the best way to create the mouth animation of this hard working carrot! I will use shape keys, I’m just trying to create a clean mouth shape out of the Mesh. I’ve tried extruding faces (but shape isn’t great) as well as live sculpt but can’t really get a successful result (selected part of mesh not deforming well)

Here’s the GIF: https://giphy.com/gifs/carrot-14m3HcGbcy4v9m

I’ve also tried a Boolean operation but it creates sharp edges. What’s the best method to accomplish a mouth like this? Do I just need to get better at sculpting? :) THANK YOU!

Yes extrude inwards seems like the right thing to do, here is a quick try, make sure you have enough geometry. Also have you tried bones instead of shapekeys?


Disable snapping for knife tool cut? If I use the knife tool, and I use it near edges, the mouse will snap to them and it wont allow to me make lines close to it unless I zoom in very close.
How can I disable snapping for the knife tool?

You can hold Shift while using the knife tool to disable snapping. Look in the 3D view header and you will see the knife tool options and keys to press. The image below is a screen shot of the 3D view header during the use of the knife tool.
click for full size


How to color code strips in blender VSE? I created a button for the operator that I'm trying to create, but know I'm trying to figure out how to tell the operator to combine a color strip with MOVIE, IMAGE, and SOUND strips to change the color and therefore serve as a highlighter(for organization and categorizing). I intend to do this with blend_type(Method for controlling how the strip combines with other strips according to blender) but even with edit source code i cant find examples of how to use blend_type, any ideas or research tips?
class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

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

    def execute(self, context): #combine color strip and strips
        #bend_type [CROSS] #COLOR,VALUE, HUE
        #type [] #'IMAGE’, ‘META’, ‘SCENE’, ‘MOVIE’, ‘MOVIECLIP’, ‘MASK’, ‘SOUND’,

        strip = act_strip(context)
        if strip.type = 'SOUND','IMAGE','AUDIO','MOVIE'
        blend_type = 'HUE'

        return {'FINISHED'}

     #def invoke(self, context, event):
        #return self.execute(context)

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

The following code creates a color strip of the same length as the selection, puts it in channel 1 and creates a metastrip. It's a bare code with no checks of whatever. Hope this can get you on the way.
To test the code: open the scripting workspace and create a new text block. Copy the code in the text block. Select 1 or more clips in the video sequencer and run the code.
import bpy

sel_strips= bpy.context.selected_sequences

first_frame = 9999
last_frame = 0

#calculate first and last frame of selected strips to set the length of the color strip
for strip in sel_strips:
    if strip.frame_final_start < first_frame:
        first_frame = strip.frame_final_start
    if strip.frame_final_end > last_frame:
        last_frame = strip.frame_final_end

#the color strip is always put in channel 1; no check for replace or whatever
color_strip = bpy.context.scene.sequence_editor.sequences.new_effect(name='test', type='COLOR', frame_start=first_frame, frame_end=last_frame, channel=1)
#the color is set to red
color_strip.color = (1,0,0)

#this operator creates the metastrip
bpy.ops.sequencer.meta_make()


Baking transparent decal always results in black oblique pixels I have 3 mesh planes.

A's texture =transparent decal
B's texture =oblique texture
C's texture =result of baking

These 3 planes are places on top of each other.

When I bake, transparent pixels of A will always appear as black in C which is wrong!

How to bake it correctly?  The result should be similar to the A+B image.

In real case,  the objects are more complex than this, and I use shrinkwarp for A(decal) on B.
Related : Cycles bakes a transparent areas to black , Textures bake transparency as white
I prefer to not use any paid add-on.
I don't mind coding Python myself.

I think this is not directly possible.
Though, a workaround is to use an intermediate surface which is glass, combined with emission (as this setting darkens the surfaces).
Then, bake (transmission) from it to the target plane.

A and B are inverted from initial setting

As (poor) explanation, my hypothesis about why it works is here:

The transparent BSDF shader is given special treatment. When a ray
passes through it, light passes straight on, as if there was no
geometry there. The ray type does not change when passing through a
transparent BSDF.

And:

Note that, while semantically the ray passes through as if no geometry
was hit, rendering performance is affected as each transparency step
requires executing the shader and tracing a ray.

So (maybe), from the raycast point of view (actual or calculated baking cage) the A surface keeps the ray black whilst going through it, except for the rays it diffuses itself.
Is it a bug or unmanaged situation, I don't know.
As opposite, the glass surface receives and keeps actual rays and can transmit them.
Additionnally, we could except that a setting where A is alpha driven mix between glass and diffuse should work (in the initial A on B on C case) but it does not.
Note: edited also because I was wrong thinking changing "film" parameters was needed.


Must Vertex Group Edits Remove Current Before Assigning New? For reference I am using Blender version 2.79 on Linux.

I have a large cylinder without end caps...2160 rectangles. I am manually selecting certain faces and then created Vertex Group. I can then deselect or select the group as expected.

Then I went to change the selection by removing some of the faces...then assign to the same Vertex Group name. When I go to select (I have previously hit assign with a few different faces from the original) the changes are not honored...it reverts back to the set which was originally there prior to the edits. Assign will never alter this group after the first assign. Is this expected? Shouldn't I be able to edit my selection and hit the assign again? FYI, I have not locked or assigned weights.

I discovered a workaround...just prior to editing I select, remove what is there (everything...the group is now empty), make edits, and then assign (if I forget to hit assign I will lose everything and the group will start over empty). Now if I select the correct faces/vertices show up. Is this workaround a result of some behavior which is expected, or is it a bug?

As it turns out it seems it is just bad wording of how the controls are labeled. When it says "remove" for a vertex group it does mean that. When it says "assign" it is misleading...it should instead say "add" or "insert".

I do wish there were another button "assign" which would set the vertex group state to the current selected set of vertices...removing ones previously selected but not currently selected.


why is the faces on my model darker than the others? around the eyes it just goes dark and i do not know how to fix it

That's a very unclean topology, you might have to redo some of the parts. Until then go into edit mode, select all vertices and press SHIFT N.
That evens the normals, so none of them point in the wrong direction. If that doesn't work, you'll have to even out those regions yourself either in Edit Mode, or by using the sculpt smooth brush.


cycles transparency not 100% transparent I'm using cycles to render transparency around some leaves, but the actual transparency has a slight grey tint. I read some other place on google to increase the Transparency under Light Paths in the Render Panel, but it doesn't work for me.

Anyone has another suggestion?

Raise TRANSMISSION and transparency samples:

Also don´t forget to check the ALPHA on Photoshop or GIMP, by placing a full black fill on your image as a lower layer. Delete (clean, CLAMP) your white alpha as white as it can get. Then, reload your image in Blender. This should cover it.


Getting started with animation accelartion? My animations look completely robotic and lack any acceleration, how can I solve this?

I saw something similar using curve graphs, but I'm not that advanced yet, if someone could give me a get started tutorial.

I knew blender well just not the graph stuff.

Perhaps this will help you get the acceleration you want:

Blender Basic Animation - Using the Graph Editor and Interpolation Modes

https://www.youtube.com/watch?v=R9gCHhJOjlQ

In this intro, inascott888 positions a cube and keyframes location at the start frame, he then goes to the end frame, repositions the cube and keyframes location there. In the graph editor window, he then uses the bezier handles to change the shape of the transition curve, and shows how this can be used to effect acceleration of the cube (when the animation is played back), that is by making a very slow start, but increasingly steep curve up.


Make intersection between plane and mesh more realistic I have a plane as the ground and a trapezoidal prism as a wooden leg (image below).

How can I make the intersection between the ground and wooden leg more realistic?

The ground is a flat, subdivided plane textured with a normal map and using Cycle's true displacement. The wooden leg is a slightly deformed cube with beveled edges.

When zoomed out, the issue (leg looks like it is floating on top of ground) is more evident:

I am using Blender 2.82 with Cycles engine.

I looked at some reference pictures and i think the area around your plank could use some adjustments to make it more believeable.
For example:

raise the ground a bit where the plank goes into the floor
reduce the amount of moss directly around the plank (the moss in your render kinda looks like it's going into the plank)


transfer weights across separated Meshes? Not sure how else to phrase this question. and maybe Im not understanding Transfer weights.

My issue is i have this model

I have the armature automatically weighted across each individual mesh, but Im trying copy the weights from where the meshes connect at intersecting vertices.

As you can see with this closer image, the intersecting points don't have the same weights and its causing the mesh to deform incorrectly.

I have tried Transferring the vertex groups using
Source layers selection>by name.
Destination Layers material>all layers.
and mix mode> Mix/Replace.

but its not working the way i expected it to. I'm guessing I'm not understanding how this tool works, and I'm not sure where to go from here.

TL:DR is there a way for me to get the intersecting vertices to have the same weight across all the meshes so they deform as if this were one solid mesh?

Ill keep trying things and looking around for other ways to accomplish my goal and if i figure it out ill be sure to post what i was able to do here.

Thanks for reading!

Edit: I should add that i have also tried making all of the meshes a single object, weighing the armature and then making the segments again and i still had the same issue.

Found the answer to my question, It was something i had already done but didnt do it quite right.

In object mode>Select all Meshes>Join
Move to Edit mode>Select all Vertices>Vertex>Merge Vertices>By Distance

Apply Automatic Weights as normal AND THEN start seperating the parts you want to.


How to rig a bone that moves the entire object? So what i'd like to do is use that bone to move the entire rig. Right now it is not parented with any other bone, i've just created it.

Enter Edit Mode of the armature and parent every bone that doesn't have a parent yet to your main bone with offset.


How to achieve this low poly lighting? Ok, new to 3D lighting overall here and Ive gone through every Blender lighting tutorial for low poly like PigArt, etc but can't achieve this lighting/rendering - low poly so that the triangles are defined but more glossy:

https://dribbble.com/shots/3471048-Xbox-clubs-image

OR

These are different from just a basic sun light, the world set to white color and everything that is described in tutorials. Ive tried setting materials to glossy but still can't get this.

How can I do this? Any good tutorials?

I've looked at the other works from Alex Pushilin and here is my attempt to reproduce it.

Setup is very simple. One Sun Lamp with warm color and small Size and RGB Background (this one is with Spherical Gradient).

For materials I've used Principled Shader with Roughness - 1.0.

Most important thing here is to use Filimic Color management. I've used Look > High Contrast with a little correction from RGB Curves.

Also I've lower a bit Saturation in Compositing.

Every probably will need a little bit different settings.


can the system console window default position be adjusted? When developing scripts for blender, I regularly have to restart blender and the console window defaults to my main monitor, behind the blender window.

I'm starting with "-con" startup parameter.

Can I adjust the default position so it opens on my secondary monitor?

thanks for pointing me in the right direction!

I've solved it using a slightly different approach (using pywin32), but here it is:

import win32gui

def _windowEnumerationHandler(hwnd, resultList):
    '''Pass to win32gui.EnumWindows() to generate list of window handle,
    window text, window class tuples.'''
    resultList.append((hwnd,
                       win32gui.GetWindowText(hwnd),
                       win32gui.GetClassName(hwnd)))

windows = []
win32gui.EnumWindows(_windowEnumerationHandler, windows)

for w in windows:
    if w[1] == 'blender':
        win32gui.MoveWindow(w[0], 2650, 3, 1200, 600, True)

def register():
    return

this is specific to my setup of course, but should be easy enough to tweak for others


Normal maps baking crashes blender 2.90. Exact same blender file as in blender 2.83 where bake doesn't crash Baking normal maps always  crashes in blender v2.90 cycles.
The same blender file opened in blender v2.83 cycles, where there is no crash baking the normal maps.
Have other users had a similar experience with blender crashing when baking normal maps in v2.9?
What additional steps are there required to avoid a crash?

my solution
install blender v2.91 experimental build as of 15_09_2020
installed not on c drive
did not take set up from v2.90

additionally
make sure hires and low rez have render flag on if off fails
set bake to an actual folder path not c\tmp prefarably not on c drive
save as rgb 16 bit no alpha
set samples to 1 1
make sure bake extrusion big size here 2m, but if overlapping geo smaller size.
create new texture for normal map alpha off 32 bit on,will save as 16 bit later
assign mat to lowres, then image map load your new empty normal map button left
set to non colour
DO NOT  link up node till baked
sel hirez geo then ctrl sel lowres geo, sel image map
BAKE used def tile size 32 32https://www.flickr.com/photos/93465359@N03/50343650117


Cannot keyframe visibility in outliner "Groups" view I need to animate visibility for a large number of objects which are separated into groups. Typically to toggle visibility one clicks the eye and camera icons in the outliner and presses "I" over them. Unfortunately, this does not work for the "Groups" view in the outliner.

Does anyone know why this is, and how I can go about quickly keying the objects organized into groups?

The group visibility in the outliner is just there for convenience to control the visibility of objects, but is not actually a property of the group.

Objects can be apart of more then one group so it wouldn't really make sense for visibility to be a group property.

Some alternatives are...

Assign the same action to all objects, then use that action to control visibility.May conflict with existing animation, so you could check on using the NLA too.
Assign a driver to objects visibility and use a single toggle to control it.
Use a frame change callback from Python and have a script inspect some property and set the visibility of the group based on it.Basically a hack to do something similar to a driver
Instance the group and change the visibility of that.Realize this isn't always a workable solution.
Solve it elsewhere, use compositing for example to enable/disable different scenes, in some cases material alpha can be used too.


How to Separate and automatically add missing faces? I'm attempting to separate out pieces of my model and would like to automate adding faces to the "previously attached" holes. How can I do this?

Alternative: Is there a better way that "separate"?

it's not really automated but you could use the "fill holes" clean-up tool.

separate the meshes
in edit mode, select all vertices
Mesh ‣ Clean up ‣ Fill Holes
repeat steps 2 and 3 for all separated meshes


Unable to see mesh as a solid object I have the following mesh in edit mode:

To which I have applied the solidify modfier. I want to see this object rendered, but when I switch to object mode and change to render mode using z 6, I see the following:

Whereas I expect to see a solid, rendered object. How to fix this?

Select 4 vertices and press F, to add a face between the selected vertices. You have to be in edit mode.


How do I make two objects collide? (Not referring to rigid body or collision physics) So what I want to do is make two objects not clip when touching each other, instead "following" the shape of the mesh.

Basically I want the cylinder shown in this example to go over the pipe when moving it on the Y axis, in this example I actually animated the cylinder going over the pipe but I don't want to do that because it'd cause clearly unwanted clipping (as you may see from this animation) and would also take extra pointless time when animating.

I've tried the Floor constraint, which only works as a plane and doesn't understand the mesh's geometry (+ it sticks and flips weirdly which isn't exactly what I want for this, but that might be just of the way used it :P).
 I've also tried the ShrinkWrap contstraint which just sticks weirdly to the mesh and flips on the other sides of the mesh (which is pretty much how it's supposed to work, not what I need for my animation though).

So anyone got an idea on how I can achieve this collision effect? I've been looking through Blender constraints and such for more than an hour and couldn't find a single one which does this effect.

The Follow Path constraint comes close to what you want to achieve.

Advanced Follow Path Setup

We need a path (curve object) to follow. If you have a mesh, you need to convert it. Go into edit mode (Tab) and select an edge loop with Alt+Click, which you want the object to follow.
Duplicate it the edges. Shift+D
Separate the duplicated edges. P > Selection
Go into object mode and select the separated edge loop.
Convert it to a curve. Alt+C This will generate a Poly curve.
[Optional] is probably a better approximation of the needed path if the curve is a bezier with automatic handles. Go into edit mode of the curve. From the Tools menu, click on Set Spline Type > BezierSelect all vertices (A) and set their Handles to Auto in the Tools menu.
In case the origin of our object is in the center and has to be offset from the ground, we will use a simple rig of empties. Create two empties and parent one (circle) to the other (cube). Ctrl+P
Select the parent empty (cube) and add a Follow Path ** constraint.Set the **Target property to the created curve. Check Fixed Position. The empty snaps to the start of the curve. By changing the Offset property, we can slide the empty along the path. Animate the Offset property, from 0 to 1 over the duration of the scene.
Position the mesh correctly above the ground at the starting position. Snap the cursor to the mesh's center. Then snap the child empty to the cursor. Add a Copy Location constraint from the child empty (circle) to the mesh.The rotation of the mesh can be easily animated.


How to position the default blender cube given coordinates, direction Z vector and direction Y vector using python? New to blender and python here,

Given the following:

Coordinates (X,Y,Z) = (-100,100,1000) and Direction Z vector = (1,0,0) and Direction Y vector = (0,0,-1) where angle between direction vectors is 90 deg

How would I position the default cube in blender there using python?

make a 3 x 3 rotation matrix with X, Y and Z axis as columns. Blender matrices are in rows, so will transpose rows to columns. The X axis is Y.cross(Z).

Make the matrix a 4x4 transform matrix and set its translation to coordinate

Note Added a scale factor so location 1000 -> 10. To avoid clipping. Set to 1 or remove.

import bpy
from mathutils import Matrix, Vector

context = bpy.context
scale = 0.01 # 1000 is a long way away

x, y, z, l, m, n, p, q, r = -500, 200, 1000, 1, 0, 0, 0, 0, -1

y_axis = Vector((l, m, n)).normalized()
z_axis = Vector((p, q, r)).normalized()

x_axis = y_axis.cross(z_axis).normalized()

M = Matrix((x_axis, y_axis, z_axis)).transposed()

M = M.to_4x4()

M.translation = scale * Vector((x, y, z))

#test
print(M)
print(x_axis, y_axis, z_axis)
bpy.ops.object.empty_add()
mt = context.object
mt.empty_display_type = 'ARROWS'
mt.matrix_world = M

or to  add a cube

#test
bpy.ops.mesh.primitive_cube_add()
cube = context.object
cube.matrix_world = M


How do I render only part of an image via the command line? I know that it is possible to render from the command line:

https://docs.blender.org/manual/en/dev/render/workflows/command_line.html

I'm tring to make it possible to render a single image on multiple PCs via the sun grid engine. So I want to split the renders up into tiles, so that every pc can render one tile.

The sun grid engine only works via the command line. Is it possible to specify ony a part of the image that should be rendered by the command line? Can I somehow set the render border before rendering?

Maybe someone has another idea of how to do this?

This can be done via a script (external or internal of the .blend file).

I shall name by script textblock script.

import bpy
import sys
argv = sys.argv
argv = argv[argv.index("--") + 1:]

scn = bpy.data.scenes["Scene"]

# get the frame arg
frame = int(argv[4])

# go to the desired frame
scn.frame_set(frame)

# set a unique output path
scn.render.filepath = "//dir/" + str(frame).zfill(4)
for i in range(0, 4):
    scn.render.filepath += "_" + argv[i]

# setup the render border
scn.render.use_border = True
scn.render.border_min_x = float(argv[0])
scn.render.border_max_x = float(argv[1])
scn.render.border_min_y = float(argv[2])
scn.render.border_max_y = float(argv[3])

# render a still frame
bpy.ops.render.render(write_still=True)
print("Success.")

The script expects 5 arguments as the console input:
- border_min_x
- border_max_x
- border_min_y
- border_max_y
- frame number to render

These arguments are parsed and a frame is then rendered and written, when the script is executed.

To call the script with params, add them after two dashes.

  Having spaces around -- is important, this is a signal that Blender should stop parsing the arguments and allows you to pass your own arguments to Python.

Then in the command line, execute the following command:

blender -b my_file.blend --python-text script_textblock -- float_min_x float_max_x float_min_y float_max_y int_frame

Example

blender -b my_file.blend --python-text script -- 0.1 0.5 0.2 0.8 1


Scale by Volume of Object in Blender I have two skulls like so:

Using the 3D print addon toolbox, I know the volumes of each:

747735056401 for the larger one
569718590290 For the smaller one

I'd like to scale the smaller one to be the same volume as the larger one.   Not being a math wiz, I simply did:  747735056401/569718590290= 1.312464,  so I hit S and typed in 1.312464.
But, I didn't even realize that would just scale the x,y,z dimensions and all of a sudden my new volume had gone way up to 12880819961337.   Way larger than intended.
Does anyone either know (through a Blender command, or through better math understanding) how I could scale the volume of one to be the same as the other?

The volume is proportional to the cube of the scale. For example, doubling all of the dimensions would result in a volume that is 2x2x2 = 8 times the volume.
Therefore, in order to scale the volume by 1.312464 you have to scale each dimension by the cube root of 1.312464. ie, approximately 1.0948678.


Clamp velocity along local axis In the attached Blend File, I have a representation of a airplane/jet fighter (cube scaled at one end to indicate direction of flight). I am using torque to steer, and adding Linear Velocity along a local axis for thrust/brakes. What I want to know is how to clamp the velocity along the plane's local axis so when the plane steers, it does not simply keep flying in the direction that is was before it turned. I would prefer a solution with logic bricks, but if that is not possible, python would be acceptable. (it just needs to keep a speed relative to how long the thrust/breaks have been held no mater which direction it is pointing.)

You're on the right track with your setup. What you want to avoid, is the overshoot you get when turning. This can be controlled with the linear ("Translation") and angular ("Rotation") damping:

Once you increase those values, as in this screenshot, you'll get much closer to the behaviour you're looking for. You probably also need to increase the velocities in your logic bricks, to compensate for the loss in speed due to the damping.


Blender won't display texture, even in UV editor, Using a PNG (screen shot included) I have this scene where I modeled a tank for Unity, it is two objects, a top and a body. I unwrapped them in blender, made textures in zbrush, Now I want to make sure the seams look alright in blender before I export to Unity. I bring in the texture. I select all the entire body model and all the points in the UV editor and the 3d viewport. I set the display to textured. Nothing happens. I try pin and nothing happens. I have been messing with this way too long. I think Blender is broken but I really hope I just missed something.

Here is a screen shot.

When you are using Cycles you also need to add it as a texture node for it to appear in the 3D view:

When in textured view the last selected image texture node is displayed, when in material view an approximation of the material is displayed, with all textures mixed according to the node setup.


Change Object's Location on local Z-Axis using Slider I have a problem with moving the object on its local z axis.

import bpy, mathutils
from bpy.types import Panel, Operator
from bpy.props import FloatProperty
from mathutils import Matrix, Vector

#get, set methods of the floatproperty
def get_locationZ(self):
    return self['locationZ']

def set_locationZ(self, value):
    obj = bpy.context.object
    loc = Matrix.Translation((0.0, 0.0, value))
    obj.matrix_basis *= loc
    self['locationZ'] = value

class ToolPanel(Panel):
    bl_space_type='VIEW_3D'
    bl_region_type='TOOLS'
    bl_label='Cylinder'
    bl_context='objectmode'
    bl_category='Cylinder'

#floatproperty
bpy.types.Object.myFloat = FloatProperty(
name = "locationZ",
description = "Set the location on local z axis",
min = -100,
max = 100,
get = get_locationZ,
set = set_locationZ)

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

    row = layout.row()
    row.template_ID(context.scene.objects, "active")

    split=layout.split()
    col=split.column(align=True)

    if obj is not None:
        col.prop(obj, 'myFloat')

#Register
def register():
    bpy.utils.register_class(ToolPanel)
#Unregister
def unregister():
    bpy.utils.unregister_class(ToolPanel)

if __name__== '__main__':
    register()

The problem is:
If I increase the value of the slider, the cylinder moves in positive direction on the local Z axis.

But when I start to reduce the value, the cylinder moves in positive direction until the value reaches zero.

And then it turns and moves in negative directon.
I want to move it to negavite direction immediately I start to reduce the value of the slider.

Thank you in advance!

Applying rotation accumulates

As I was poorly trying to point out in comment applying the translation matrix from value will have a cumulative effect. (no matter what direction)

Use the delta value calculated from previous value.

Other minor changes, use self in the setter getter, rather than relying on  bpy.context.object is self  If you want context possibly better to use an update method instead.

Using ob.get("propname", default) gives a default value even when the property hasn't been set.

EDIT.  Changed this to moving "locally globally" this way our slider value is global and won't be affected by local scale. (Move 1 unit globally in local z, akin to translate operator)

Example below working in 2.8. (Minor change @ to * or back).

import bpy, mathutils
from bpy.types import Panel, Operator
from bpy.props import FloatProperty
from mathutils import Matrix, Vector

#get, set methods of the floatproperty
def get_locationZ(self):
    return self.get('locationZ', 0)

def set_locationZ(self, value):
    z_axis = Vector((0, 0, 1))
    delta = value - self.get('locationZ', 0)
    v = (self.matrix_world.to_3x3() @ z_axis).normalized()

    self.matrix_world.translation += delta * v
    self['locationZ'] = value

class VIEW3D_PT_ToolPanel(Panel):
    bl_space_type='VIEW_3D'
    bl_region_type='TOOLS'
    bl_label='Cylinder'
    bl_context='objectmode'

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

        row = layout.row()
        row.template_ID(context.view_layer.objects, "active") # context.scene.objects (2.7x)

        split=layout.split()
        col=split.column(align=True)

        if obj is not None:
            col.prop(obj, 'myFloat', slider=True)

#floatproperty
bpy.types.Object.myFloat = FloatProperty(
name = "locationZ",
description = "Set the location on local z axis",
min = -100,
max = 100,
soft_min=-10,
soft_max=10,
step=1,
subtype='DISTANCE',
get = get_locationZ,
set = set_locationZ)

#Register
def register():
    bpy.utils.register_class(VIEW3D_PT_ToolPanel)
#Unregister
def unregister():
    bpy.utils.unregister_class(VIEW3D_PT_ToolPanel)

if __name__== '__main__':
    register()

As a side note the new elementwise @ multiplier works as expected for M @= T  For 2.7x found using M = T * M a more reliable option.


Setting radius per point I am trying to vary the radius of a thickened curve. To do so, I am using the function: bpy.ops.curve.radius_set().

The manual says that I can set the radius per point, however I have not been able to do so. I want to dictate a radius for the start and end points of the curve. Does anybody know how to do this?

The python console

In object mode, have added the default bezier curve object

The data part holds curve data

>>> cu = C.object.data

A curve is a set of splines, a spline a set of points to define its shape.  Investigate spline 0

>>> spline = cu.splines[0]

Can auto complete in py console, eg pressing TAB Autocomplete key may differ see console menu or start message

>>> spline.r<tab>
            adius_interpolation
            esolution_u
            esolution_v
            na_type

Hmm radius interpolation, expect a radius property to be on the points, have 2 points

>>> for pt in spline.bezier_points:
...     pt
...
bpy.data.curves['BezierCurve'].splines[0].bezier_points[0]
bpy.data.curves['BezierCurve'].splines[0].bezier_points[1]

whats the radius of the last

>>> pt.radius
1.0

set to 19

>>> pt.radius = 19
>>> pt.radius
19.0


Move CENTER (not pivot) to SELECTED array of (edges, vertex, faces) I was reading this and this about switching the pivot point.

And I managed to reproduce its 4 steps:

bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
bpy.ops.view3d.snap_cursor_to_selected()
bpy.ops.object.editmode_toggle()
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')

So the logical question is: Can we get it down to 1 "keybind"?

The usual workflow should be:

I change from object to edit mode.
I select "VERTS" to grab different points between what I need to place the CENTER of the object (the purpose of this is that every time I want to manipulate/rotate/translate) this object, those selected vertices will have the TRUE center of the object in LOCAL mode.
I choose "CENTER to SELECTED" (from somewhere/my function/addon, etc..)
(internally blender moves the pivot to selected, changes (snaps) the CENTER to pivot, and then returns the PIVOT to the center of the world. The idea is that the PIVOT will not get lost or in the way once it has completed its task).
The center of the object gets placed between the selected vertices (or edges/faces).

Is it possible to do this on a code or addon?
Thanks.

Bmesh version

The origin is local coordinate (0, 0, 0)

In local (vertex) space the selected location vector o is the average of selected vert coordinates   Make that the origin point by subtracting vector o from all verts' coordinates.

Then move the object to counter the shift in local coords.  The vector t  is the equivalent global space translation, of local space translation o.

Test script. Edit mode. Select verts, run script.

import bpy
import bmesh
from mathutils import Vector, Matrix
context = bpy.context
ob = context.object
me = ob.data

bm = bmesh.from_edit_mesh(me)
selected_verts = [v.co for v in bm.verts if v.select]
# average of selected verts
o = sum(selected_verts, Vector()) / len(selected_verts)
# make this the new origin
for v in bm.verts:
    v.co -= o
# move the object

mw = ob.matrix_world
t = mw * o - mw * Vector()
mw.translation += t

bmesh.update_edit_mesh(me)
me.update()


Attempting to layer two materials on the same parts of a mesh I have two textures ready to apply on a mesh of a space ship.  One is the texture of the hull of the space ship itself, the other is the lighting coming from the ship's windows as well as other light sources on the ship.

I need to have the first texture emit no light and be affected by external light sources, while the second emits light.  Is there a way that I can have these two textures with these two different behaviors in the Cycles Render engine?  I've posted examples of the two textures below.

You can use the following steps :

create two UV maps in the vertex panel

create a material for all faces of the hull like this :

A diffuse BSDF (for the hull details) and a Emission BSDF (for the windows ligght) are added together (using a Mix BSDF should be better). The strength of the emission BSDF is increased to 10. The diffuse BSDF is connected with the hull details image which is connected to the UV map of the hull. The Emission BSDF is connected with the windows light image which is connected to the UV map of the window.

Unwrap the hull on the hull image like this (note that windows are painted with black)

Unwrap the windows on a white part of the windows light image. Then unwrap all other faces on a black part (they are all stacked in the orange square at the bottom)

The size of the windows light can be very small (256px x 256px) because it contains only white and black surfaces.

Here is a final render :

If you add an object near the window, you will see that it will be lighted by the window light.


Is there an "easy" way to repeat geo for this practice project? I'm making a futuristic katana for practice and fun (inspired by playing Ghostrunner). I have the basic shape done; now I'm starting to add some finer details, like filework along the back. After making one cut (which turned out better than expected), I realized I had no idea how to easily repeat the geo several times along the back of the blade. The blade is curved, so I can't just alt-d the geo and move along the relevant axis, then reattach it to the blade.

I think I could alt-d the geo, then rotate and move it to sit closely in the right spot, but it wouldn't be "perfect." I'll probably just boolean the rest of the cuts and clean up the geo afterward, like I did for this first one.
But, I'm curious: How would you go about adding these circular cuts to this slightly curved blade? If I have to make each one from scratch, then that's what I'll do. I'm just curious if there are more clever ways to do this.
And, if you notice any ways to optimize my edge flow shown in the pictures (or how I can submit better questions), I'd be happy to hear them!
Thanks for your time :)
P.S. What's the best way to share a blend file here?

To make a set of boolean "cutter objects" that you can copy for the rest of your sword, first, make your base cutter object (I used a cylinder for the example), then use an Array Modifier to make multiple instances of the cutter object, a Curve Modifier to curve the array, and a (scaled) Empty, used as an object offset to scale the array along its length:


How to make a material not reflect light? I have 2 Finishes in cycles,

1) with a glossy >> roughness is 0.5 (Lets call this as
Roughness0.5)

2) with a glossy >> roughness is 0.05 (Roughness0.05)

I want roughness0.5 to reflect light.,
but
I dont want Roughness0.05 to reflect light because the light reflection looks weird here.

At the same time, I can't turn of the glossy in the cycles settings for an object for any chance.

Is there any way to do this?
Do I have to play with the light path nodes?

Try using a Toon Shader instead of Glossy one. It's not the proper, accurate way of doing this IMO, but the final result is close to what you're looking for I guess.

Use a Lamp instead of emission plane.

Set the Toon Shader to Glossy and decrease the Size to 0.001 and Smooth to 0.000.


Hide by axis in the Graph Editor (multiple objects) I would like to select multiple objects, then in the Graph Editor hide all curves except those belonging to a particular axis. I am looking for an automated method, not manual switching off the eye icons. For example hide everything but the Location X curve or Rotation Z etc. Makes sense? Is it possible?

i am using 2.8 but i believe it's the same in 2.79 , in the graph editor you'll find magnifier with filed string called "f-curve live filtering string" type there what they called  like "X Location or just X Loc" etc and you'll get only the axis you want...u can see on the side how the string is written like rotation is Euler, type that and you'll get only the rotation of all objects...etc :)


How to limit the frequency of pushing of keys in the BGE? I want to limit frequency of possible pushing of keyboard buttons in a game so that the player would not be able to push a button more often than two times a second. Pulse modes seem not to work, because they deal with constant signals, and pushing a button several times is not a constant signal, so I don't know what to use here.

Here you have simple Python script:

import bge
from bge import logic

REFRESH_RATE = 60

cont = logic.getCurrentController()
owner = cont.owner

owner["timer"] += 1

keyboard = bge.logic.keyboard
JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED

if keyboard.events[bge.events.SPACEKEY] == JUST_ACTIVATED:
    if owner["pressed"] < 2:
        owner["toggle"] = not owner["toggle"]
        owner["pressed"] += 1
if owner["timer"] >= REFRESH_RATE/2:
    owner["timer"] = 0
    owner["pressed"] = 0

toggle property is used here just to present the effect of the mechanism, it changes if the user input is accepted. Keep in mind that the REFRESH_RATE should be the same as the one stored in Render Properties.
The Logic Editor setup in this case would be:

You can also download it as .blend file here:

I hope this can help you solve the problem. Cheers.


How to make an animated model jump in BGE My rigged and animated human model actually jumps when i press the required key, but doesn't fall again n the ground. I have tried to click the jump motion actuator and/or increase z motion, but the model just floats in the air higher every jump. Help would be appreciated

You can add Character type physics to your object.

Go to the Properties panel, and under the Physics tab, change the type from Static to Character and Check collision bounds; Depending on what your character looks like, you may want to change the Bounds type. As your character is rigged, you'll have to check Compound. You also can tweak the settings if you would like to modify the margin between objects, when colliding.


Why is for loop not working among the phrases listed in a line? Perhaps this question is related to Python's grammar. Please excuse me.
Examples 1,2,4 work. However, Example 3 creates a grammar error.
In particular, examples 2 and 3 have exactly the same statement except that they were line up on single line using semicolons, so why doesn't example 3 work only?
# example 1
import bpy
bpy.context.view_layer.cycles.use_denoising = True

# example 2
import bpy
print("one line for loop")
for i in bpy.context.scene.view_layers : i.cycles.use_denoising = True

# example 3
import bpy
print("one line for loop"); for i in bpy.context.scene.view_layers : i.cycles.use_denoising = True;

# example 4
import bpy
vl = bpy.context.scene.view_layers; check = True;
print("one line multiple statment"); vl[0].cycles.use_denoising = check; vl[1].cycles.use_denoising = check; vl[2].cycles.use_denoising = check;

Semicolon cannot be used to separate 8. Compound statements — Python 3.8.6rc1 documentation. Only simple statement are allowed.
And the one-line for statement will probably confused with Comprehensions:
print(x) for x in range(20)
print(x); for x in range(20): pass

Why can't use semi-colon before for loop in Python? - Stack Overflow
bash - Python command line argument semicolon-loop error - Stack Overflow


Texture does not apply to Model I have added a Texture image to my 3d Model. As well as Unwrapping it or adding Seam. But nothing seems to work to add the Texture itself to the Model:

I also checked if there is a UV-Map existing, it is. Im fairly new to blender so I added the file to the Blender Exchange with my texture file:

Q: What I have to do getting the texture assigned to the model?

You are in Solid view mode change that to Material type.

Or just switch the Workspace to Shading to get a preview of your shaders in one click and all associated tools for editing material properties.


Is it possible to set bpy.data.filepath without saving the file? I have some code which requires opening and closing blend files. The code has to save a temporary copy of the open file before opening other files and doing stuff to them. After the code is finished it reloads the temporary save of the original file.

The problem is, if the user goes to save their file (after the code has been carried out) it will save to the temporary location, of course they could change the save location manually but that would insert an unnecessary amount of entropy into this process.

I could also simply save the open file before the code was run, but I would like to avoid forcing that on the user. All that's holding me back is not being able to change the file's internal save location after all is finished.

If I could write to bpy.data.filepath (rather than only read it) problem would be solved. Anyone know of a way to set this value without actually saving the file with: bpy.ops.wm.save_as_mainfile() ?

As it stands I've developed a complicated method of working around this, but involves renaming and copying files. If I have to use it I will but hoping someone might know a slimmer solution here.

Also I'm aware there is a similar thread "Clear saved filepath" but I was hoping to explore this further. I just want to know is there something I'm missing with setting the blend file's save path.

EXPLANATION OF HOW IT'S DIFFERENT FROM "CLEAR SAVED FILEPATH":
Let's see, that thread doesn't solve the problem. The end.

The bpy.data.filepath property reflects the current blendfile's location, which is why it is read only.

Not sure I understand your problem fully, but here's a suggestion:
You can save the file implicitly (without asking the user to provide a save path), and decide yourself on an arbitrary temporary path for your save. By providing the bpy.ops.wm.save_as_mainfile() operator a filepath parameter, you can save directly to any path you desire.

bpy.ops.wm.save_as_mainfile( filepath = MYPATH )

You can later load that file implicitly again, with the opposite operator:

bpy.ops.wm.open_mainfile( filepath = MYPATH )

This way, you don't need to care what the value of bpy.data.filepath is.


How to create mesh collider for a blender model I have built a house model in blender. I want to add collider to it's interior and exterior walls. How do I do that?

If i understand you correctly, just go to physics tab and apply collision to walls. Or make a secondary box around it and give that collision. This is for blender related stuff. If you are going to export it you need to dig around youtube for a tut.


I need help converting a .blend to a .mp4 So I made a 2d animation in blender 2.8/9 and I don't know how to save it as an mp4 so I can send it to my client.

Go to the Outliner- Output Settings, in Dimension Settings choose your resolution (1080p comes by default) you can choose what frame to start or end, choose where to save in the Output section, in File Format choose FFmpeg video, in Encoding choose MPEG4 as your File Format, choose other options like quality there as well, now press ctrl+F12, or go to render - render animation, another window will pop up, wait till it's over and voila!


I can't see the vertices in vertex mode Though I am in vertex select mode, I am unable to see the vertices as shown.

Your viewport overlay is turned off.
Upper right corner, the icon with two circles is grey :).


Why does Grease Pencil ui not inherit from bpy.types.Panel? I am developing an addon and often right click on existing ui elements and select "Edit Source" to learn how certain ui elements were made. Almost every ui element inherits from bpy.types.Panel as expected and as I thought was necessary to make a ui panel.

I'm trying to make a similar panel to the Grease Pencil panel, and upon inspecting it's source, the panel's class is not inheriting from anything:

class GreasePencilDataPanel:
    # subclass must set
    # bl_space_type = 'IMAGE_EDITOR'
    bl_label = "Grease Pencil Layers"
    bl_region_type = 'UI'

    @staticmethod
    def draw_header(self, context):
        self.layout.prop(context.space_data, "show_grease_pencil", text="")

    @staticmethod
    def draw(self, context):
        layout = self.layout
        # Rest of class ...

Yet somehow it's still accessing attributes such as draw() and layout, which I thought were inherited attributes from bpy.types.Panel.

I've attempted to figure out why this works by making changes in the code, rerunning it, and seeing what changes occur in Blender. Strangely, no changes would take place when I made changes to the python code, unlike most python source code, which will reflect changes right away.

Why does this class not inherit from bpy.types.Panel, and what advantages/disadvantages does this bring?

Generic Grease Pencil Panel Classes

The code you have pasted is from properties_grease_pencil_common.py you will notice that none of the "panel" classes, eg GreasePencilDataPanelare registered.  These classes are defined separately and imported, since a lot of grease pencil functionality is generic.

Now if we look at the 3d view space space_view3d.py for example, notice it imports these classes

from .properties_grease_pencil_common import (
    GreasePencilDataPanel,
    GreasePencilPaletteColorPanel,
)

One of the panels defined in this space

class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    # NOTE: this is just a wrapper around the generic GP Panel

which inherits from bpy.types.Panel and is registered, and hence view-able as a panel in the 3D view space.


Why does textures work with the default cube, but not with any new cube I add? I am following the "noob to pro" wiki tutorial, and in the basic texturing part, when I apply a material and a texture to the default cube, everything works fine.

If, however, I add a new cube and create a new material and texture here, the result is all broken up and odd-looking. It seems as if it's treating my cube's faces as a pair of triangles instead of just the square face of a cube.

What am I doing wrong?

Okay, here's how we unwrap a cube so that we don't get any whonky image output when we view the image mapped onto it.

Option A

Go into edit mode, select the entire mesh, and then hit U > Cube projection. This is what to do if you want the same texture on every face, which is what I assume you are going for. However! if this is not wht you are going for, there is always ...

Option B

So who here has seen a baseball? Raises hand "me!..Me!"
You know how those two white panels are stitched together interlockish-ly? how if you were to cut the red seams they'd Pop out and you could lay them flat? That is what we do when we unwrap things, but we still need seams.

If your cube were made out of paper, and you folded it to get it into a cube shape, what did the paper look like before it was folded?

Like this maybe?

Well, what you need to do, is select all the edges that need to be seams and Ctrl +  E > Mark Seam. this will make them BRIGHT RED!!!!
It also means that those edges are now like the seams on a baseball, and all you have to do is U > Unwrap.


How to engrave an object that has a subsurface modifier? I create a smooth gold brick using shade smooth or subdivision surface modifier.
I then try to engrave on this brick ("fine gold") using the Boolean modifier process.
The result is the process significantly destroys the smoothness of the brick.

Any suggestions?

I guess you have something like this:

If so, just add an Edge Split modifier at the bottom of the stack, so everything will look fine again:


Selecting the other side of the object in a boolean operation I am trying to cut an object using a plane into two objects. I am using difference boolean modifier. How can I tell Blender which part I want and which part I don't want? I have no control on which part should remain after the boolean operation. Could someone help me on this?

Update: (for better illustration of the question). For example, let's say we have a cube which is cut by a plane. How can I selectively specify which part of the following cube should be removed after the boolean operation on the cube and the plane? For example, how can I remove part (1) of the cube instead of part (2)? I am trying to be able to tell Blender remove the part which I don't want.

I should say that the boolean modifier works perfectly with the plane being the cutter my object is splitted into a correct mesh. I would like to only be able to remove the other remaining object.

When you are using Difference the other object is 'subtracted' from the one with the modifier. To get the other side you have to set the modifier to Intersect. This is the part where both objects overlap. The third option, Union would give you the boolean 'sum' of both objects.
In the image below the monkey head has the boolean modifier, the other object in the modifier is the cube.

BTW: notice the eye missing in the intersection case? The boolean modifier works on the object's volumes, but the monkey head is not a closed mesh, so the volume is not really defined. This may cause problems in some cases, so be aware of that.
EDIT: And as @stacker mentioned in the comments, since the boolean modifier works on the volume of the objects it might not work properly with a plane, at least when the edge of the plane is inside the volume of the other object.

UPDATE
There is no way to tell blender that it should take the other side of the object when using the boolean modifier set to Difference, since this is just the way the difference of two sets is defined: The difference of the sets A and B A\B are all points in A that are not in B. What points are in B is defined by the normal of your cutting plane; The normal points to the outside.
If you want the other half of the cube you have to flip the normal of the plane or set the boolean modifier to Intersect. The intersection of two sets A and B A^B is all points in A that are also in B. This is exactly the opposite of the difference.


Why is my animation not keeping location and rotation correctly? I am currently 3d modeling a twisty puzzle and trying to animate it. I have the puzzle done but when I try to animate it, it randomly twists and turns the individual objects in different directions before converging back to their original form at the end of the animation.

The screencast of me attempting to animate this is here: https://youtu.be/FiPcvhNzosk

File at the end of the screencast:

This is the original file. Just delete the 2 keyframes that are there:

I did make this with a tutorial. It is by rcpongo and I have very slightly edited his design. All credit goes to him for my design.

I found the answer after finding another similar post earlier. The post mentioned a local axis. I checked this on the pieces and found they did not have the same local x axis. I applied the rotation and it now works. How to fix this:

Select the pieces.
Press R,X,X> Move Mouse
If they rotate in different directions then the local x axes are different.
Select all the affected pieces and press Ctrl+A
Left click "rotation"
That should fix other problems that are experienced.


How to cut an edge at specific point? I have an object representing a room. I want to cut a door on it. I planed to use knife tool, because I do not know any better for this - any other (or "proper") idea would be good too BTW. I want to move X units from the corner on the bottom edge and make a cut from there (green dot) to the top. How can I do this?

Use the knife tool or loop cuts to build your mesh, and then here is a trick to move a vertex or edge to a precise position relative to the corner:

select the vertex or edge you want to move
move it all the way to the corner, validate
move it back (for example with GX), enter the distance on the keyboard.


Pine tree leaves using Sapling; giving stylized look Trying to make a stylized pine tree (like in Among Trees Game)

I can't figure out how to make leaves like these; so one falling on each side.

Using the sapling plugin; is there a way to make it so ?
Pulling out my hairs here.
Thanks !

You can easily do it without addon, you need to create some flat branches, like that (I copied but of course do your own):

Rotate, mirror:

Duplicate, rotate, etc:


Particles collide with first object then die on second collision I want particles to collide off one surface (hard object) then die on the second (colliding with water). Both are easy on their own but I can't seem to figure out how to accomplish doing both in one particle system. is this possible!?

Thank you

Yes, it's possible: collisions are defined per-object, not per-particle system, so you can define as many types of collisions as you want.

Just enable the "Collisions" physics on both objects, checking the "kill particles" box only for the second one.

If the second object comes from a water/ocean simulation, make sure that the "collision" modifier is the last one on the modifier stack.

(for clarity, in my example I've checked "Render dead particles")


Cell fracture ruins the texture UV Recently I updated blender to the new version (v2.72) and cell fracture not working how expected.
After making box UV and cell fracture for the object the texture become ruined. Maybe there is some new step in newer blender version, or I just forgot something?

I had the exact same problem. I had to remap my texture on all the shards. I did use project from view to unwrap, which should be fairly painless for you if you've just got that cube.


How to convert a .svg to a 3D Model? I want to achieve the embossed effect seen in the attached image. I have made an svg file and imported it into Blender. I am not sure how to proceed to get that emboss effect. Do I have to follow some other steps? I don't know I'm going into the right direction

You can get the svg file here

since you didn't tell the detail, I will try to answer in the beginning.

first you need to import your svg file

File > Import > Scalable Vector Graphics (.svg)
its look like your svg is too small, goto edit mode and scale it up

press tab, then 's' to scale it up. remember to do it in edit mode.
goto the curve panel then increase the bevel depth value

this method will not get the very similar result to your reference image. if you want to get a great result you need to modelling it manually.


Does anyone upload to Second Life from Blender? I have rigged and weighted an object for the company I work for. It works perfectly in Blender.

I have several issues below in which I have no idea what is going wrong. If anyone has had this happen when they've taken things out of Blender and have some sort of answer for WHY they are happening, I would like some feedback. There are so many questions for so many issues. I understand this site does not provide tutorials. That is not what I asked for. I asked if anyone else has uploaded from Blender to Second Life, if so, have they encountered any of the issues below, if so, how did they fix them?

However, in Second Life, we have had an array of issues:

Too high of a vertex count (we reduced the vertices)
Second Life didn't like the triangles on the object and added faces that we didn't want (we removed all the triangles)

My mirrored object showed up as two left feet instead of a right and a left (so far, the most recent haven't done that and I'm not sure what we did differently to fix that.)

The feet were aligned, texture applied correctly, one of each foot, but when you click edit in Second Life, it flings the Avatar really far away. (No solution yet to this.)

And most recently, the aligned, mirrored, rigged and weighted feet are costing 11 prims, which is perfect, but they turn the Second Life avatar that wears the feet to look like a Frankenstein mishap. The feet seem to attach the avatar from blender with the feet to the avatar in Second Life, when all I'm doing is exporting the feet. I only select the feet and it didn't do this with previous versions of the feet. I have no idea what I'm doing wrong and am grasping at straws.

So I'm looking to find someone who might be able to walk me through what I'm doing wrong or have some sort of insight as to something else I could try. I have spent countless hours on these feet and after two weeks, haven't completed ONE project for my boss. I need a Second Life/Blender sensei. =)

I have now successfully answered all of the questions to all of the issues I was having previously!

Too high vertex count - reduced

Small triangles that added material upon import into Second Life - removed

Mirrored object showing two left feet - still unsure how this one fixed itself

Avatar being offset (flung) along the Z axis - upon import into SL, don't include joint positions

Frankenstein mishap, click only feet, export, manually choose the default settings for rigged open sim instead of choosing the automatic one, not sure why.

I may have graduated from Grasshopper level Blender user!


How to import SVG files without putting them in a new collection? I am able to bulk import hundreds of SVGs using a script with the command:
bpy.ops.import_curve.svg(filepath = path_to_file)

However, this results in multiple unneeded collections and unnamed curves like this:
3D_Printer.svg Collection
    Curve.1
Biometrics.svg Collection
    Curve.2
Drones.svg Collection
    Curve.3

Manually deleting all the collections would just leave the unnamed curves:
Curve.1
Curve.2
Curve.3

Is there some way, possibly through a modified SVG script or rename/collection script to get a result like:
3D_Printer.svg
Biometrics.svg
Drones.svg

My SVGs are optimized so there is only one curve per file, so the extra collections and generically named curves are quite inconvenient. I'm not sure which is easier, modifying the
io_curve_svg scripts, or creating a script to rename the curve and collapse the collection after the fact.

The following script is intended as a limited example tested in Blender 2.9:
create a list of current collections;
given a specified directory:
get a list of all files in that specific directory;
if the file name ends with .svg perform the import curve operation;
create a list of collections after import operation (exclude original collections);
for each collection created during the import operation:
rename the objects in the collection;
link to scene's master collection;
unlink from existing collection;
remove the collection;
import bpy
import os

dir = "c:\\tmp\\svg"
files = os.listdir(path=dir)
tgt_coll = bpy.context.collection # master scene collection
colls = [coll for coll in bpy.data.collections]

for f in files:
    if not f.endswith(".svg"):
        continue
    bpy.ops.import_curve.svg(filepath = os.path.join(dir, f))

new_colls = [coll for coll in bpy.data.collections if coll not in colls]

for coll in new_colls:
    for obj in coll.objects:
        obj.name = coll.name # coll.name[:-4] to strip .svg
        tgt_coll.objects.link(obj)
        coll.objects.unlink(obj)
    if len(coll.objects) == 0:
        bpy.data.collections.remove(coll)


Mass of the object and collsions I'm using the game engine and I have a cylinder (rigid body) which has to crash with another objects. My problem is when I set the propertie "Radius" because at the end of the cylinder there is a sphere that represents that mass of the cylinder that can collide with other objects, so if I change the value of the propertie "Radius" the sphere turns bigger or smaller. I don't know how to do disappear that sphere because I need th cylinder can hit other objects with all its geometry, not only in the end. I try to use "Collision Bound" type "Cylinder" but the behaviour is very similar.

Look at the screenshots!

Here we can see the sphere at the end of the cylinder

The end of the cylinder that has the sphere hits the ball

But the other tip of the cylinder break through the ball

How could I fix this?

As your Cylinder should be presented as cylinder towards the physics too, you need to change the Properties/Physics/Collision Bounds/Bounds to Cylinder. You will see the dotted cage (representing the physics shape) will turn into a cylinder too.

Hint: If the dotted mesh is not aligned correctly then turn the display mesh in edit mode that it fits.

Alternative: Bounds: Convex Hull or Triangle Mesh - be aware they are more expensive.

I hope it helps


Absolute black shadow takes forever to render with custom shadow catcher node I am trying to render this scene without the objects so only the shadows and reflections remain. I have a custom nodeset that separates the shadows and the reflections which is why I don't use the new Shadow Catcher.

Problem is the circled area where there is absolute black takes forever to render and I was wondering if there is a way to get past it.

Thanks!

I managed to fix the issue with this node set. Basically it says "just don't render this area if camera rays hit it" or something like that. I don't know I am bad at answering questions but if you have the same issue, try replicating this nodeset and maybe it will help you. It helped in my situation at least.


How to 'skin' an edge? I have an edge, just 2 connected vertices. One vertex is hooked to one object, and the other to another object. Now, I need to create geometry around that edge, so it becomes a cylinder and is still hooked to those objects, by this one vertex on each side. I thought the Skin modifier does the trick, but it doesn't seem to work as I would expect, or I don't know how to use it properly. How to keep these hooked vertices, and generate the cylinders at the same time?

The Skin modifier is exactly what you need here - although by itself it will only produce a 'cuboid' skin as shown :

Here I've simply created an 'edge' (by merging all vertices of a Cube to a single vertex (using Alt-M) and selecting to merge 'At Center') and then extruding E to form a new vertex and a joining edge - all in Edit mode (Tab)). Then in Edit mode I selected each vertex in turn and used Ctrl-H to 'Hook to New Object'. This creates an Empty at each end of the mesh. I then added the Skin modifier.

Moving the empties moves the respective end of the 'edge' along with the surrounding skin. Note that the sequence of the modifiers in the modifier stack (the list of modifiers) show to the right of the above image) is important - the Hook modifiers must be above the Skin modifier as they must take place before the skin is added. Moving them to after the Skin will result in the vertices being moved while leaving the skin behind.

To turn this into a "cylinder" (with rounded ends) you can further add a Subsurf modifier.

For smooth shading you can enable the 'Smooth Shading' option in the Skin modifier.

Again, the order is important and should be Hook, Hook, Skin, Subsurf. Move the empties and the skin will follow.

This is working as expected for me. If your experience is different to this then please update your question and I can try and answer further.


Is there any clear definition of game-ready models? Recently, I am trying to create 3D models for my own game project. However, when I do some researches on game models, I come up with the term - game-ready models and I could not find any clear definition online. Could anyone tell me about what exactly is game-ready models and how to know if my 3D models (created by Blender mainly) is suitable for games.

From what I know by far, quad topology is preferred in Blender. However, for most of the game engine, triangle topology is preferred (Please correct me if I am wrong). Does it mean I have to manually change the models in Blender from quad topology to triangle topology before importing to the game engine?

Thanks for any helps.

Game-ready is a very vague definition. But across the industry it usually means being very aware of the performance impact of polygons and textures and use them as efficiently as possible:

Geometry:

Mesh is all triangles or quads(which can be easily converted to triangles), depending on engine. No ngons for sure.  Avoid high valence vertex.
Smart use of triangle budget to ensure optimal performance.
A lot can be done with shaders and textures these days, so the geometry is likely going to be quite simple.

Textures:

Maximize use of UV space, wasted texture space is wasted memory.
Textures in power of 2 (1024x1024, 4096x4096)
Use texture size that's appropriate for the size of the object on the screen.
Usually a single object has a single material and single textureset(1 albedo, 1 normal, 1 roughtness map for a typical PBR workflow). This ensures that the object can be drawn with one drawcall for optimal performance.

Workflow:

Note most of these requirements only apply to the end result, as you are creating your models, you can use multiple textures, multiple modifiers, even ngons temporarily, until you are ready to export the final model.
Most game models benefits from having a detailed normal map, which uses a low-poly mesh combined with a normal map to represent additional surface bumps. So often you'd have to model the geometry twice, once as a high poly model, and once more as a low poly model, in order to create a baked normal map.


removed duplicated points, texture completely warped Newbie here again, I'm having some texturing errors... I made a little low poly dog for fun, and was finally able to texture something properly!

That is.. until I started to rig it. Everything was okay, except all the limbs were duplicated. So I went in, removed the doubles of all the points... and now the texture somehow became this monstrosity.

I moved the uv mapping around a lot while making this, and I don't want to have to redo it all again...

how can I get the texture to load properly on the model, like in the first picture?

This is possible to repair by recognizing which island on UV map isn't needed for unwrap and deleting adjacent vertices. It's preferable of course to avoid such situations and check for double vertices / faces' normals / holes in mesh / internal faces / non-manifold geometry etc. before starting unwrapping / rigging and so on.

The workflow consists in toggling between Keep UV and Edit mode mesh in sync modes in order to find selected vertices in UV map on the model.

Split the window and set the newly opened editor to UV/Image Editor. See How to close windows for more info about closing / opening different editors inside Blender. In Edit mode select whole model with A.
In UV / Image Editor window select top islands of UV map because they don't preserve the unwrap, but do mess up the UV map and model when doubles are removed. In order to do that select them with RMB; to add to selection press Shift+RMB. You should end up with top islands selected. Grab them and the bottom ones will be revealed (and hence the doubles are present):

Move those islands somewhere so that they don't intersect with bottom ones. Check Keep UV and Edit mode mesh in sync in the header of the UV / Image Editor. Use B to box select the top ones.

You'll notice several vertices selected on the bottom ones, deselect them with Box Select tool (because these are shared vertices by both islands, thus if you delete them you'll loose the geometry of original mesh, not only double vertices). Hover mouse over 3D Viewport and delete selected vertices.

Now UV map shoudn't react on removing doubles because mostly they were already deleted, with preserving unwrapped islands.

Blend file


Python 2.8 creating Diffuse BSDF in a shader node, when I want it in a surface node In Blender/Python 2.8, I can't get my code to create the surface node I want (it creates a shader node along with a surface node that I don't want).  The objective is to assign an image texture to an object as seen in three related posts (1, 2 and 3):

The manual process produces the desired result by setting up the node as follows:

In Python I am attempting to do the same (code below), but the results aren't working out.  First I'll show the output, then the code:

Here's the objectionable output:

And here's the node tree as created by my code; when I make the manual adjustments I note in the picture I get the final result that I want:

My flawed code is below.  Before you criticize the obvious problem (that I am creating shaders), I have tried other approaches (replacing "Shader" with "Surface" and various other words) without success.  I am also baffled as to why the "Principled BSDF" node appears out of nowhere.

Here's my code.  Your suggestions would be highly appreciated.  Thanks in advance!

matP_name='CCmat'
matP = bpy.data.materials.get(matP_name)
if matP is None:
    matP = bpy.data.materials.new(matP_name)
matP.use_nodes=True
nodes = matP.node_tree.nodes
nodeID='ShaderNodeBsdfDiffuse'
diffuse_BSDF = matP.node_tree.nodes.new(nodeID)
path=TextureFolder+TextureFilenamePost
imgTex = bpy.data.images.load(path)
node_texture = nodes.new(type='ShaderNodeTexImage')
node_texture.image = imgTex
node_texture.location = 0,200
links = matP.node_tree.links
link = links.new(node_texture.outputs[0], nodes.get('Diffuse BSDF').inputs[0])
obj=bpy.data.objects['CubeCopy1']
obj.active_material=matP

Small code that can bring the indication you need.

import bpy

# Clear all nodes in a mat
def clear_material( material ):
    if material.node_tree:
        material.node_tree.links.clear()
        material.node_tree.nodes.clear()

# Create a node corresponding to a defined group
def instanciate_group( nodes, group_name ):
    group = nodes.new( type = 'ShaderNodeGroup' )
    group.node_tree = bpy.data.node_groups[group_name]

materials = bpy.data.materials

mat_name = 'test'

material = materials.get( mat_name )

if not material:
    material = materials.new( mat_name )

# We clear it as we'll define it completely
clear_material( material )

material.use_nodes = True

nodes = material.node_tree.nodes
links = material.node_tree.links

output = nodes.new( type = 'ShaderNodeOutputMaterial' )

diffuse = nodes.new( type = 'ShaderNodeBsdfDiffuse' )

#With names
link = links.new( diffuse.outputs['BSDF'], output.inputs['Surface'] )
#Or with indices
#link = links.new( diffuse.outputs[0], output.inputs[0] )

Note: when you create a new material (materials.new(...)), it creates two nodes by default (principled linked to ouput).


Replicate mechanical movement I try to replicate this in blender:

http://507movements.com/mm_090.html
I tried using 2 rigid bodies, and putting locks on the rotation for one. And lock them in the z-axis.
I altered the rigid body world steps, but I get things like this:

I was wondering, what would be a good way to do this?

I'm sure there are multiple ways to do it.  Physics are unnecessary (which is nice, because it's faster and easier without them.)

We start with a root bone.  Then we have a rotation control, parented to the root  Then we have a deforming bone for the inner/middle section (depending on if you want the axle handled differently), which is parented to the rotation control.
Finally, we have the bone for the outer section.  This is the only constrained bone.  It is parented to the middle bone, but has inherit rotation disabled.  It is floored in both directions to our root bone, so it only moves side to side with the rotation of the inner body.
There are plenty of constraints we could have used to acquire this behavior.  I just happened to pick floor constraints.


Can you distribute an Eevee render job over tiles for high res renders? I'm running into memory issues trying to render an image with Eevee at a resolution that can be cleanly printed onto a poster. After increasing the render resolution past a point I crash the GPU. Is there any way to render the image in small grid tile chunks like cycles and blender internal (which devs claimed Eevee was completely sufficient to replace) to prevent over working the GPU? Ide use cycles but the difference in how lights works destroys the composition I've set up and I don't have 12+ hours to spare on rendering this image. If this can't be done can I have an explanation as to why such a basic feature cannot be implemented?

Blender currently doesn't support tiling in Eevee, however as stated in Rich Sedman comment, this can be achieved by tinkering with the focal length, Shift X, and Shift Y. First, you will need to figure out how many tiles you want. Try to figure out what is the maximum resolution you can render in your project, it is usually not much higher than the maximum resolution supported by your graphics card, but it doesn't seem to be capped at it anymore. Divide the resolution of the final image by the number of tiles on each axis so it is smaller than or equal to the maximum resolution you can render, let's call this number n. For example, if I want a final image with a resolution of 20000 by 11250 and the maximum resolution I can render is 8000 by 4500 I can use 3 as n since 20000/3 = 6666.66... ≤ 8000 and 11250/3 = 3750 ≤ 4500.
Now you have to change the lens unit to Field of View and divide your focal length by n.
Now you have to divide the sensor size by n, you could use depth of field but different depths of field cause different distortions as Jachym Michal pointed out – thanks Jacym :).

Now you have to set up the Shift X and Shift Y. If the image is wider than it is tall the first Shift X value is n/2 - 0.5 times -1 (just add a minus in front of the number) if it is taller than it is wide you must multiply the value by the width divided by the height e.g. if the aspect ratio is 9:16 you should multiply the values by 9/16 which is 0.5625, keyframe the Shift X value. Now you need to set up the last Shift X value of this row, to do this, go to the frame n (assuming the first keyframe was on frame 1), and enter the new Shift X value, which is the same value as before but not negative and keyframe it again. It should look something like this:

Now duplicate these keyframes n - 1 times, so the camera will go from the left to right n times. It should look something like this:

Now it's time to set the Shift Y values, the values should be n/2 -0.5, just like before. If the image is wider than it's tall you must multiply the value by the image height divided by the width e.g. if the aspect ratio is 16:9 you should multiply the values by 9/16 which is 0.5625. Where the values were negative in Shift X they should be positive and vice-versa. So go to frame 1 and set the Shift Y to n/2 -0.5, multiply it by the height divided by the width if the image is wider than it is tall, and keyframe it. Now go to the frame where the next Shift X keyframe is and keyframe the Shift Y again, this will make the Shift Y remain constant while the Shift X goes from left to right. Now advance one keyframe so the Shift X goes back to the initial value, and subtract n/2 - 0.5 if the image is wider than it's tall multiply it by the height divided by the width of the image and keyframe it. Now go to the next keyframe (the default key for this is the arrow up), keyframe the Shift Y value again (like on the last row, it will keep the value of the last keyframe, so the Shift Y will remain constant as the Shift X scans through this row). Repeat this process for all the rows so you have an n by n grid of tiles. Now change the interpolation to linear by selecting all the keyframes and right-clicking them and then choosing linear under interpolation. It should end looking something like this:

Now you change the end frame to the total number of tiles or n². You will also need to change the resolution to your original resolution divided by n on both width and height. Render an animation rather than a still frame.
Now you have a sequence of images that when read from left to right and top to bottom with a limit of n images per row will create the final image (that's why it is important that the Shift X starts negative and Shift Y starts positive). To create the final image you can use a variety of pieces of software, such as image editors, however, due to the large dimensions of the images you can run into memory issues with them, so you should probably use a free and open-source software called ImageMagick. To do this open a terminal on the folder with the images you rendered and run magick montage -mode concatenate -tile 3x *.png final-image.png replacing the 3 in "3x" by n and the .png in "*.png" by the format you are using if it's not PNG. This will take a while and can make your computer irresponsive depending on the size of the final image. If you feel like throwing 75 euros at the problem or you don't mind a bunch of demo marks on the final image, there is a little piece of software called Very Large Image Joiner you can use, it will make the process way faster and will use almost no RAM, but it's 75 euros if you don't want those demo marks.


How to create a procedural galia melon material? I'm trying to create a procedural Galia melon texture, I want something like this as a result(with a bumpy look, yes)
Any ideas?
.Blend File
Here's where I'm at now:

My node setup(sorry for the shitty pic):

I can't use real melon images

Here is a rough quick attempt.
Use a Voronoi texture set to Distance to Edge as base for the mask between the two colors.
Distort it with another smaller Voronoi texture to give the "cracks" a rougher look, by mixing "clean" texture coordinates with the texture using a Mix RGB node.
Adjust all progressions with color ramps, and you can use a final color ramp through
Use a similar voronoi based texture for bump.


Materials peel off when rendered Why does the appearance change before and after rendering?
Even if I change the material, it will peeled off same place.

I'm a beginner so I don't know why...
Please confirm.

Before render

After render

It looks like you may have a duplicate mesh that doesn't have materials rendering. Turn off it's visibility in the render or delete it.


Compositor nodes missing I have been doing some work on a file in the default view, doing all of my work there, including some compositing. However, after I decided to do the modeling in the default view, and make the compositing view used for compositing, I went to go adjust my compositor setup, but all my compositor nodes are gone, and I can't add any - all the options are grayed out. It appears the composition setup is still being applied to the render, but I can't find the setup. What happened? Where are my compositor nodes?

There is a second scene called testlight, which has Use nodes disabled.

Enable nodes in testlight, then the nodes will appear and work fine in the main scene.

I'm not sure why this happens. I think it might be a bug, you might want to try reporting it (particularly if you can figure out how it got this way in the first place).

Re-disabling use nodes in testlight doesn't seem to disable nodes in the other scene again.


How to drive object's local transform by another object, while relative to third object? That title is probably a bit confusing so lemme try to explain what I mean:
Let's say I have two objects: Object A and Object B, and two cameras: Camera A and Camera B.
I want the position and rotation of Camera B relative to Object B to be the same as the position and rotation of Camera A relative to Object A.
Here's a visual representation of what I'm trying to do, with the two objects and cameras:

I've tried experimenting with different combinations of drivers and constraints, but I wasn't able to get it to work. If anyone could help me out it would be greatly appreciated!

You can do this with drivers and parenting.

Use Rightclick > Copy New Driver and then RMB > Paste Driver
Drive all location and rotation fields from Camera A to Camera B  (so they match perfectly)
Select Camera B and go Object Properties > Relations > Parent and target Object B

2. RMB > Copy Driver > Paste Driver from Camera A to Camera B. Do this for each location/rotation field.

3. In Object Properties of Camera B, target Object B.
Camera B will now inherit Object B rotation/location, but will also keep the driven position and rotation on top of that.


Link object from another blend file that is not positioned at origin I have a blend file with multiple objects positioned side by side. This file is intended to be used as a library and I don't want to separate them in different files because they are simple variations of the same kind of object. I also created groups for every object (some of them are composed of other objects). This is something like this:

When I link an object from the previous file that is positioned at origin, it's created at the cursor position on the new file and I can rotate it around their own axis like this

But if I link another object from the previous file that is not at the origin on that file, their axis is not aligned with the object

How can I link it in a way that the linked object has the axis aligned with the object?

If you link an object, all properties of the object are in the file from wich you linked the object.(inclusive the position)If you want to keep your object movable, you can link the mesh(not the Mesh Object) of the object. Then create a new mesh-object, go to the object-Settings() of the object in the properties window and change the Mesh() to the linked Mesh.


Why do different render engines generate different z pass? I've been using Blender to generate depth maps using z pass. I notice that the z pass generated by different render engines are different, which made me a bit confused. My feeling is that the z pass generated by Cycle render denotes distance from a given pixel to the camera center while Blender render generates an orthogonal distance to the camera plane. Do I understand it correctly? Is so, is there a way to change such behavior for both render modes?

As an example, the bottom area of the model is a flat surface, to which the camera is perpendicularly pointed. Below are the nodes I use to normalize and visualize the z pass data (Viewer node is used to save the depth map).

Z pass with Cycles render:

Z pass with blender render (everywhere same value in the bottom part):

When rendering a Z pass you are essentially creating a depth map from the camera point of view. The issue here is there is potentially infinite range of distances to represent by colors and only 256 shades of gray available to map them to, in a traditional 8 bit image you have .

It can go from zero close to the camera (unlikely there is something this close) to whichever visible object is most most distant. But there may also be a sky or "background" at a theoretical infinite distance.

There are several possible ways to map these shades of grey to the distance progression each with its own advantages.

It can be a linear mapping where detail is distributed evenly across all image, but here may also be logarithmic mappings, emphasizing detail at certain parts of the picture.

You may want more detail at close range where image focus is likely to reside.
The scene may require more detail at large distances if you are rendering a landscape or distant view
You may want to use it for a mist pass requiring details at a medium range.

As far as I know  would expect both Cycles and Blender Render to use the same "true distance to sensor", not a virtual orthographic plane passing through the sensor, but I may be wrong.

If that is indeed the case or you require a specific color progression or custom mapping of values you may construct your own "an artificial Z pass".

You can do so by making a basic emission shader with a circular black to white gradient mapped to the camera object.

Moving the camera should update the position. You can scale the gradient as desired to accommodate your desired distance range, and drive it through a Color Ramp for a non linear progression.


How can I achieve the visual of objects pressing against membranes more beautifully? Source files here and here.

Hey folks. Currently building a project for a client which involves shapes and creatures pressing and moving against a membrane. I've tried using shrink wrap, cloth simulations and blend shapes to achieve the effect, but nothing seems to give me the same freedom of movement as rendering a depth pass sequence of the objects moving and using that to drive a displacement modifier.

Unfortunately, it's still a bit rough. Objects extruding far out of the surface look stretched and glitchy with narrow triangles. Additionally, the mesh is using 64,800 triangles, which is about the maximum I can use in Unity Realtime per object.

Can anybody think of a prettier / more efficient way to achieve this effect?

While I was ultimately forced to use a realtime displacement shader in Unity to achieve the effect and my client later moved onto an off-the-shelf raymarching solution in Unity, I was able to slightly improve my workflow in Blender.

Using a Displacement Modifier to initially perturb the subdivided plane provided a gentle organic 'texture', I then followed this with a Warp modifier to move the vertices in the direction of my depth map (the Warp modifier obviated the need to worry about normals as it extends the vertices towards the 'to' empty).

While not perfect (still getting stretching artifacts, etc), it worked out pretty well within Blender and I was able to export Alembic bakes for playback in Unity.