Using Blender Render, To see vertex colors in 3d viewport you need to be at least in textured viewport mode...although you can paint in solid mode also.

And to see  vertex colors in render, your material needs to have "vertex color paint" option enabled.


Why is tracking getting less accurate after going past cached frames?

From the information you have provided it sounds like you are attempting to perform your tracking on your actual movie file.

If that is the case you should export the entire movie to a series of image frames, then import that image sequence into the movie clip editor and perform your tracking on the image sequence.

Most movie file formats store their data, not as a sequence of fixed images, but as a description of the changes in the image since the last frame, and depending on the compression level used will discard some of that information.
For an insight into how complex this issue can become you may like to look at the story of the recovery of the lost video from the first ocean landing of SpaceX's recoverable Falcon 9 Stage 1.

Skipping backwards and forwards through movie files can produce decoding differences in the frames being viewed, and can result in inconsistent output, which in turn is compounded in this case as the movie file is continually being re-read from disk.

To break your movie file into an image sequence:

Open a new instance of Blender
Set the render properties for the project (frame size, # of frames, frame rate etc. to match the movie file)
Set the output format to an image format (.png is usually OK)
Set the output directory to a new directory to store these files
Switch to the video editing screen layout
With your mouse over the Video Sequence Editor window
Press Shift+A and select Movie to add a movie file (Navigate to it and select your movie file)
Make sure the strip is placed with the start frame on frame 1.
Render the animation (switch back to the default view, or press Ctrl+F12).

The image sequence produced can be used in place of the movie file in your tracking scene in exactly the same way - simply select all the frames in the directory, in place of the movie file.

Hopefully this solves your problem.


Why isn't changing the material of an object visibly working?

Because you're not in LookDev or Rendered mode (https://docs.blender.org/manual/en/latest/editors/3dview/controls/shading.html).

As a side note, maybe you should start out with a basic tutorial, before you hop into your own projects. It may seem discouraging to actually having to learn something before one can produce results, but so is pretty much every skill that is not trivial.


Lots of speculation, so I decided to do some some tests on the sequencer performance:

Performance Options

Global Prefetch set to 30frames, 4096MB of cache, AVI JPEG 50% quality: 2m28s

+ UI Locked and no image Display: 2m28s

+ Sound track caching, MPEG seek per-track set to 60 rather than 25: 2m28s

+ Immediate re-render, to test for effect of disk caching: 2m28s

Conclusion 1: Surprisingly, none of the performance-enhancing options seems to do anything.

Encoding Options

Same setting as above, AVI JPEG: 2m28s

+ Encoding set to Quicktime H264 @ 50% quality: 4m08s

+ Quicktime H264 @ 75% quality: 4m02s

+ Quicktime H264 @ 95% quality: 4m11s

+ Encoding set to FFMPEG H264, H264 Preset @ 600kbit: 8m18s

+ Encoding set to AVI RAW: 1m58s

Conclusion 2: The encoding engine makes a huge difference in speed. AVI RAW is the fastest if you have the disk speed to back it up. FFMPEG H264 is the slowest.

Quality Options

+ With antialiasing, AVI RAW: 1m58s

+ without antialiasing, AVI RAW: 1m18s

Conclusion 3: Antialiasing makes a difference, but the quality loss is huge, especially when all the input clips have different resolution.

Test Details:

Scene used: 2000 frame long sequencer with 6 different 720p MPEG4 video input, 3 1080p PNG sequence inputs, dozens of images, dozens of transitions, 1 audio track. Output is 720p with Antialiasing.

Test Methodology: System is restarted after each test, so the effect of disk cache is minimal.

Test system: 2.2Ghz i7 Macbook Pro, 8GB RAM, Radeon HD6750, 500GB SSD


How to use dynamic topology for terrain modeling

Try applying scale to the object, with CtrlA > Scale.

There shouldn't be any limit to the height you can sculpt, but object scaling might make the sculpting influence too small. Also this is probably a general sculpt mode problem not specific to dynamic topology.


Struggling to Understand Vertices Behaviour 2

you probably did press E and then Esc. That always results in duplicate vertices. If you dont undo that step and just carry on, you will be left with duplicate vertices in your final mesh, which will always break subsurf (will make a hard edge with lots and lots of duplicate vertices)

To fix it select everything and press Alt+M and select "by Distance".


Get current item value from a dropdown menu?

The solution was to add a update to the prop. Then i can retreive changes from the dropdown box.

def myindex(self, context):
    print('changed to,', context.scene.MyEnum)
...

bpy.types.Scene.MyEnum = bpy.props.EnumProperty(items = item_cb, update = myindex)

Another way goes directly across int(context.scene.MyEnum). Then i don't need the update.


Ah HA!
The problem was in the options tab, in the materials section for the clouds.
"Traceable" was not selected. The clouds were not being traced. Once selected, it fixed everything.


Subsurf modifier not working. Is it because I booleaned or because of my tris?

the solution is really easy. Look at your modifier panel. There is a camera symbol an next to it is a eye symbol. click on the eye and now you shoud be able to see the changes. the eye symbol means that you can see your modifiers in the viewport.


How to fill a color inside circle in grease pencil


The glass must be projecting a shadow on the pupil texture, you need to switch the Properties panel > Material > Settings > Shadow Mode to None.


How do I make an individually scaling square set shader?

To get your squares to remain square, they must use the same evaluated brightness from the image across their extent, otherwise some parts of the squares will scale, or pass a threshold, differently from others. In other words, the image must be pixellated at the square-centers first.
(The illustrations below are not all shot at the same grid-scale)
Make a Grid .. This is just a different way from yours, no better..

It has 2 outputs: 'Cell UV' and 'Cell ID'

'Cell UV' maps each cell in XY, -1 to 1, with 0 at the cell center. 'Cell ID'  colours the whole cell with the original, piece-wide UV at the cell centers.
Sample the Image, or your procedural texture, at the cell-centers, using 'Cell ID'...

..for a  pixellated image. This image, on the left, has been gamma corrected and made negative for this particular, "printer's", way of making a half-tone...

The Half-Tone Screen, on the right, above, is made by making a 'Distance from Cell Edge'from the cell UV:

Combine: When the screen is multiplied with the image, put through a threshold, (and inverted again,) using a Color-Ramp, you get a traditional black-dots-on white half-tone.

If you do without the negative steps, you get white dots on black.

This example samples only one point for each cell, at the cell center. You could, say, take samples from a number of well-arranged  points in each cell, and take their average, for more accurate toning.


Plane is backward on right Orthographic view

Press Ctrl+Numpad 3 to show Left orthographic view.

Likewise you can access Bottom view by pressing Ctrl+Numpad 7

For Back view press Ctrl+Numpad 1


Cannot set vertex group to active with python while in background mode?

For me it's not the operator that sets the active vertex group that fails, but the vertex group select. The reason is that the object needs to be in edit mode in order to run it:

import bpy
vgroups = bpy.context.object.vertex_groups
vgroups.active_index = vgroups["Group"].index
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.object.vertex_group_select()

You may also select the relevant vertices without operator:

import bpy

ob = bpy.context.object

vi = ob.vertex_groups.find("Group")

for v in ob.data.vertices:
    for g in v.groups:
        if g.group == vi:
            v.select = True

... but it only works in object mode. To transform the selection, you need to switch to edit mode or write a low-level replacement (requires object mode):

import bpy
from mathutils import Vector

ob = bpy.context.object
me = ob.data
vi = ob.vertex_groups.find("Group")

verts = [v for v in me.vertices for g in v.groups if g.group == vi]
center = sum(map(lambda v: v.co, verts), Vector()) / len(verts)

for v in verts:
   v.co = (v.co - center) * 2 + center


Modeling typology for sharp/diamond like objects

Final:

You can do this in couple different ways. I'll present you two of them, and both non destructive.

Base mesh:

As a base mesh you'll need to create diamond shape with triangle-like quads (yes, they are ok, and they are still quads).

Mean Crease method:

Select outer/sharp edges and add to them Mean Crease - I've used 0.96 for base of the mesh (square) and 0.8 for the side ones.

After that add Subdivision Surface modifier.

Bevel modifier method:

This one is simpler and recommended.

Add Bevel modifier, choose Limit Method > Angle. Set number of Segments and Width.

Add Subdivision Surface modifier.


Why does the ambient occlusion pass result in a black environment?

AO render pass result in a black environment cause it doesn't contain Alpha channel.To get any AO You have to have some objects in field of view, otherwise there is nothing to cause Ambient Occlusion.

There is a very simple way to achieve AO pass with transparent background.
In the node setup You have on the attached image (assuming, that You have transparent background enabled) You just need to attach Alpha output from Render Layer Node to Alpha input in Composite or Viewer node.


Blender mesh having random holes and bulges at specific areas

This seems to be due to the subdivision modifier you're using. Subdiv modifiers don't handle complex corner geometries too well, such as this one.
If you can manage to distribute this more evenly, with fewer edges connected that one vertex it should work.
On top of this, you might want to think of remodelling the topology across that front area to some degree, subdiv modifiers give weird outputs when there are varying levels of detail (i.e. big faces in some places, and lots of tiny ones in others).


How to transform a plane into a honeycomb?

The best result (in my experience anyway) is achieved with the Tissue addon's tesselate function. The mesh isn't perfect and you need to remove doubles, but it's still much nicer and easier to use than a shrinkwrap based workflow.

What you need is a basic mesh tile that will repeat nicely, like this one:

And hopefully a fairly evenly spaced and uniform mesh, comprised of pretty much equally sized quad faces (you can generate such a mesh with the Remesh modifier).

I would suggest separating the piece you want to convert into a hex grid from the rest of the mesh, tesselate, remove doubles, then re-join with the original.

To generate the tesselation:

Select your hex tile.
Then select your target object (the one you want to generate a hex grid from).
Go to the Tissue tab in the tools panel.
Click on the "Tesselate" button.


Question 1
Just pick one of your materials, rename it accordingly.
Then pick all objects who should have the same material where the last one in selection is the object with your renamed material. Hit Ctrl - L and pick "materials"
This replaces all materials with the last one.
Question 2
Every object can have multiple material slots (1) with names and these slots can pickup the actual material (3).
In Blender it is possible to rename the slot and/or replace the content (material) of the slot.
To do so just go to the material properties panel and select the material you wish to assign (4).
Notice that if you look at the info row (2) you can see how often a material is used  and also make sure does not get deleted, if it is nowhere assigned.


How many frames are there in one minute Animation?

There are utility python methods for this
How many frames will depend on the frame rate of your current scene.
The frame rate is determined by the frames per second integer fps and the frames per seconds base fps_base
so actual frame rate is fps / fps_base
Fortunately the devs have given us a convenience method to work out how many frames or how much time. In this case
>>> bpy.utils.time_to_frame(
time_to_frame(time, fps=None, fps_base=None)
Returns a float frame number from a time given in seconds or
as a datetime.timedelta object.
If *fps* and *fps_base* are not given the current scene is used.
:arg time: time in seconds.
:type time: number or a ``datetime.timedelta`` object
:return: the frame.
:rtype: float

Hence for a scene render fps selected as value 24 (default)
>>> C.scene.render.fps
24

>>> C.scene.render.fps_base
1.0

>>> bpy.utils.time_to_frame(60)
1440.0

requires 10 gross or 1440 frames to render out a minute.
If the rate is set to the dropdown option "29.97 fps"
>>> C.scene.render.fps
30

>>> C.scene.render.fps_base
1.0010000467300415

>>> bpy.utils.time_to_frame(60)
1798.2017142557036

Hence at this rate would require 1799 frames to clock up a minute.  The partner in crime method will confirm
>>> bpy.utils.time_from_frame(
time_from_frame(frame, fps=None, fps_base=None)
Returns the time from a frame number .
If *fps* and *fps_base* are not given the current scene is used.
:arg frame: number.
:type frame: int or float.
:return: the time in seconds.
:rtype: datetime.timedelta

>>> bpy.utils.time_from_frame(1799)
datetime.timedelta(seconds=60, microseconds=26636)

Note the above  >>> is typed into the python console area.


how to view 3D viewport material preview with background?

There's a simple workaround.
Put a plane with Glass BSDF material in the background and the HDRi will show.

No need to adjust or enable anything. It just works.


Depends on what you mean by 'physics'…

If it’s advanced things like particles, soft bodies etc., then answer is quite simple - you cannot export those. Only thing that is supported to some extent are object/group instances over a particle system.
If it’s exporting real time (rigidbody & co) physics settings (weight, bounciness, collision shells, etc.), you cannot really do that either (though you could define required parameters as custom properties, and use those custom props when you import your FBX, but nothing working “out of the box”).
If it’s exporting the results of some rigidbody physical simulation, then you have nothing to do, it will be baked as part of the scene's animation during FBX export.


Problem with points or geometry in a model (noob question)

Seems like wrong direction of "normals". Try enter edit mode, select all, then Recalculate Normals (Shift + N or menu Mesh > Normals > Recalculate Outside ).


Add Outline to the Edge of Faces of an Object

The Wireframe Modifier can do what you are asking. Note that it will add some extra geometry, so that may or may not be an option for some use cases.

Under the options for the modifier, you will want to uncheck replace original, and change the material offset to 1.

Add two materials to your object, the material in slot 2 will be the material for the wireframe. If needed, you can change the material offset to 2 or 3, and the material slot for the wireframe will go to 3 or 4, and so on.

This is how the material slots look for Suzanne below:

And the result:


(bpy.ops.mesh.transform.resize)how do I call this operator as a modal rather than directly executing it?

You can achieve the behavior you desire ( user interaction ) by explicitly passing the execution context (INVOKE_DEFAULT) as the first argument.

bpy.ops.mesh.transform.resize('INVOKE_DEFAULT', ......)

The default execution context is 'EXEC_DEFAULT' and is implicit for all operators. In such a case just the execute() method defined for the operator is called using the default or passed operator properties. But in case an operator defines an invoke/modal method and 'INVOKE_DEFAULT' is the execution context, either an operator properties user interface can be used to execute the operator or can be run modally or both.

Further details can be found at the links below:

bpy.ops calling operators and execution context
bpy.types.Operator


@classmethod
    def poll(cls, context):
        return len(context.selected_objects) == 2


How to rotate the direction of the curve extrusion by 90 degrees

This is done using the tilt feature.

In the curve edit mode, press CtrlT. Then simply type in 90 to tilt it by 90 degrees.


is it possible that python .add_driver command cant create f-curve?

I found the problem, with the python command .add_driver the generator modifier is automatically generated (m.f.!).

If you want rid of it, you can use
mod = bpy.data.objects["Armature"].animation_data.drivers[0].modifiers[0]
bpy.data.objects["Armature"].animation_data.drivers[0].modifiers.remove(mod)


How to get the mirror image of an empty?

It would seem that the only way to do this is by mirroring, then inverting the rotation manually:

Mirror your empty with CtrlM:

Invert the rotation of the mirrored empty by adding a - (or removing it if the rotation is already negative):

You can automate inverting the rotation with a simple python script:
import bpy

ob = bpy.context.object

ob.rotation_euler.x = ob.rotation_euler.x * -1
ob.rotation_euler.y = ob.rotation_euler.y * -1
ob.rotation_euler.z = ob.rotation_euler.z * -1

To use, first mirror the object with CtrlM, then run in the text editor with the mirrored object selected.


Ok, so here's  my attempt at your shader. I did my best to recreate what I saw were the  most standout features of the photo, namely a relatively calm water surface with a disturbance in the center with bubbles forming somewhat of a ring around the disturbance and some foam appearing in the center. This all accompanied by some slight ripples coming from the side.

This may be not exactly what you're looking for , but hopefully you'll be able adapt enough of the methods outlined to suit your needs.
The graph is mainly created from many different noise textures each with varying size and detail. I also used some gradient textures to get shapes such as the inner disruption circle, the ripples, and the area what the ripples are allowed to effect.
First off, I needed the center area, and it needed to not be a perfect circle, as water disturbances are much more random. I chose to get a circle by combining a spherical gradient with a greater than math node - Changing the threshold changes the size of the circle. To make the shape more random, I used the values from a noise texture to warp the vector if the input coordinate, so when I use the result of the "warp" as a vector input for the gradient texture(s), the result comes out appropriately warped. See below:

I then subtracted slightly smaller versions of the same texture from the original to leave me with two "warped rings" of different thicknesses. I used these to form the foam ring. I made the thicker ring slightly darker than the thin one before I mixed, because I plan on using this ring as height information for the "disruption outline" and the variance in brightness of the two rings helps give a more even falloff.
I admit, that  I am not particularly happy with the way this "ring falloff" turned out, however, I predict it would take me several more hours to get it just right, and I feel like I've been messing with this graph forever. I don't like how harsh the transition is between the turbulent and calm areas - I just couldn't get it right in time.  However, here are some of the steps I took to mitigate the "harshness" of the edge. The first thing I did was to multiply the pure white "ring "with a rather large noise texture to soften some of the edges, and remove some others.

I then multiplied it with a couple of different (highly scaled) noise textures that I clamped rather tightly with ColorRamps, to remove a good deal of small black areas to form the "spots" in the foam ring.
Speaking of foam, I used three different noise textures of varying sizes and positions, subtracted from each other to leave only a few white blotches. I then applied the same technique I used for the ring to soften the edges and add spots. Then I mixed them together.  Keep in mind that I still have the original "disruption area" black and white cutout shapes. In any place where I need things to be contained by/excluded from this area, I can either accomplish this my mixing the values with one of these maps (or the inverse of it), or by using it as a mix factor. In most of the cases in this graph, I opted to add and subtract values to and from these maps, because doing it this way gave me better manual control over the mix factor. The result of the ring/foam mix looks like this:

While discussing isolating sections, I should mention that I made the most use of this while creating the height information. Outside the "disturbance" I wanted a water-like, but relatively smooth surface. I did this by multiplying a (brightened and softened) noise map with the inverse of one of the original "disturbance shapes" to make it only affect the outside area.
I did a similar thing to define the inner ripples, however I used a distorted noise texture mixed with a musgrave texture to give a more "turbulent look". I then mixed these two together.

To make the ripples, I used a wave texture set to circular, mixed with a diagonal gradient that I had warped using the method I mentioned at the beginning. I multiplied these together to give an area where the ripples are allowed to appear (in real life they would both transfer across the turbulence, but also be disrupted by it ).

I then mixed these ripples with the height information I made previously to make what would be the final height map. As per convention with procedural textures, I plugged in the height map to the height input of a bump node. I then used this as my normal input. Note that I reduced the strength substantially because the default of 1 is almost always too high (I used 0.1). I also connected this to a displacement node, but I did not use it in my final substance because to be honest I feel that it makes some things look better, while making other things look worse. Play with it if you want, just note that when I had the displacement connected, the graph seemed to take an inordinate amount of time to recalculate. I don't know if that's just my PC acting strange, or it's inherent to the graph. Either way, tread lightly.
To add some finishing touches, I used some of the whites from the "foam" that I had made to make a simple roughness map. I also mixed the basecolor image with a bit of blue increased the metallic value a little to make the water seem more of a "deep blue".
The final result looks like this:

I'll also include the .blend file, feel free to tinker with it as much as you like. I tried to label the graph in the most self-explanatory way, so hopefully you can figure out what everything does.
File is here -
Sorry for the wait. Hope this helps.


How do I parent the head and the tail of a bone to two different meshes/empties?

Here is a possible way using bones "stretching", in pose mode,  to their top/bottom empties (trackers), not sure you want this, but, anyway here is how it works:

I've set an armature copy location to the bottom tracker, so the head of the bottom bone follows it. But the pose mode contraint stretches to the top tracker, too.


How to keep video and audio together in the Video Sequence Editor

To keep video and audio in sync, use the parenting function in the VSEQF add-on:
https://github.com/snuq/VSEQF


Some nodes just don't accept lists. Nodes that accepts lists are said to be vectorized, on this case, this not isn't vectorized. You can either use another node to achieve the same result, or use a loop as follows:


try this:
import bpy
import math

def createcircle(object, number, radius, xOffset, yOffset, zOffset):
    origin = object.location

    for x in range(number):
        newObj = object.copy()
        bpy.context.scene.collection.objects.link(newObj)
        newObj.location = (origin.x + xOffset * x, origin.y + yOffset * x, origin.z + zOffset * x)

print("script started ---------")

radius = 6

createcircle(bpy.context.active_object, 10, radius, 2.1, 0, 0)

you created the cubes, but you created them in "nirvana". You have to link them to a scene to "see" them. But you can see them...if you go in your outliner and...check orphan data.

buuuuuut....i think, you were looking for this:
import bpy
import math

def createcircle(object, number_of_objects, radius):
    origin = object.location
    angle = 2 * math.pi / number_of_objects
    for x in range(number_of_objects):
        newObj = object.copy()
        bpy.context.scene.collection.objects.link(newObj)
        newObj.location = (math.sin(angle*x)*radius, math.cos(angle*x)*radius, 0)

print("script started ---------")

radius = 6

createcircle(bpy.context.active_object, 10, radius)

result:
[2
and here is a video tutorial: https://youtu.be/k2lsdYBwocU
just in case you are interested ...


Just increase the strength of the displace modifiers.

The displace modifier works by using the brightness of the texture to displace the vertices of a mesh on a particular axis.In this case the bright areas of the texture will displace upwards while the dark ones will push vertices down.

It is possible that the contrast and brightness settings used on your texture don't exactly match those of the so called "tutorial".


Blender particle system with video layer

I'm afraid out of the box that is not possible. They all share the same material and therefore the same texture. If the texture is animated all of them will be in the same point of the animation.
Workarounds:

make 3-4 planes, add them to a group and instead of object in your particle emitter choose group and pick random. Then create 3-4 materials with the same image texture and offset them by n frames.
Use dynamic paint. It takes a little longer to bake, but you can actually use the result as a normal map, giving you much more realism. Or you can even bake the animation to vertices to get real displacement. Careful though for a large plane that could take a lot of vertices.


EEVEE is not good at calculating shadow light path, since it's not ray tracing.

There is a contact shadow option in your light source setting:

It uses ray tracing to "fix" those bleeding area:

In game practice, light will not likely put outside the wall, and should use some light stop method to make it stay in specified area. Might use Cycles for those great lighting result.


Black areas on textured model, that are not on the texture image?

Thanks to Alphisto, the problem was in vertex paint, to fix it you need to add to the black area of the model in vertex paint.


Utilise GPU just for animation/physics, not rendering

No, unfortunately GPU based processing for operations besides rendering is not available at the moment.

It is possible (check out this demo by Nvidia), so perhaps it will be in Blender sometime in the future :)


Render time stuck on "synchronizing object" with extreme memory usage spike

Close to 2 million faces, high levels of subdivision surface modifiers, large textures 2K and 4k... all of that uses resources from your computer and eventually you will run out of them.
Read:
Why does Blender use so much memory for large textures?
Using 4k textures on something that will only be a few hundred pixels tall on the screen is wasteful.
Solutions:
You can adjust your ambitions to the computer power at your disposal and otpimize your scene, or you need to get the hardware that supports the complexity of the scene.
Fast, Cheap or Quality, Choose any two


"Set Alpha" should be used only once, to associate the alpha channel to the RGB information on the image.
To combine alpha channel use a math node and add (or subtract) the alphas together before associating.


You need to switch to Edit mode by pressing Tab
Options tab appears for Edit mode.


Setter / Getter and modulus.

Zoomed in test. Can see 4 pop up when holding mouse down and sliding, but the setter turns 4 to 0
Internal "get/set" function of property?
How can I change IntProperty default value stored within PropertyGroup?
Is There a Way to Change a Prop with an Update Def without Calling the Update Def?
If we set up an int property with a getter and setter can assure it remains in a certain range.  For this case have set the min to 0 and max to 4, but if the property is set to 4 it reverts to zero, using the modulus operator
value = value % 4

ie the integer remainder when divided by four.  This is stored in the file as a custom property emulating how properties work.
Set the default value in the getter, I've used 0
Test Code.
import bpy

from bpy.props import IntProperty

def get_int(self):
    return self.get("test", 0)

def set_int(self, value):
    self["test"] = value % 4

bpy.types.Object.test = IntProperty(
    min=0,
    max=4,
    get=get_int,
    set=set_int,
    )

def draw(self, context):
    layout = self.layout
    ob = context.object
    layout.prop(ob, "test")

# tacked onto object props transform panel to test.
bpy.types.OBJECT_PT_transform.prepend(draw)


Each edge contains the vertex index of the two vertices that it connects. Similarly each face contains a list of vertices defining it.

import bpy

obdata = bpy.context.object.data

print('Vertices:')
for v in obdata.vertices:
    print('{}. {} {} {}'.format(v.index, v.co.x, v.co.y, v.co.z))

print('Edges:')
for e in obdata.edges:
    print('{}. {} {}'.format(e.index, e.vertices[0], e.vertices[1]))

print('Faces:')
for f in obdata.polygons:
    print('{}. '.format(f.index), end='')
    for v in f.vertices:
        print('{} '.format(v), end='')
    print() # for newline


Weird lighting on some faces of mesh in Blenders and in UE4

Ok, Solved this, a combination of sharp and smooth edges is needed, so I learnt a new thing today :)


How to move/rotate makehuman character in blender by adjusting value

Select a bone (1), then press N to open the properties panel in the 3D Viewport. At the top of the panel, the transform menu contains WXYZ rotation which can be edited for precision (2).

Right click and press Insert Keyframes to add the values into keyframe.


For practice, you can take an animation approach in Blender but for a simple animation like that, I would personally make the animation within Unity. It will give you a lot more control when making a game.


Yes, this is possible.
Create the Action you want to repeat in the Dopesheet.

For clarity, my action is going to be 9.1 frames long and going to repeated 10 times.
Note, that the the length of 9.1 will come from the start and and frames: 1 to 10.1.

endframe - startframe = duration
10.1     -         1  = 9.1

Go to the NLA Editor.
Press the Push Action Down button.
Go to the properties panel in the NLA editor and to the Action Clip section.
Set the start frame to your start frame (1)
Set the end frame to your end frame (10.1)
Set the repeat property to the numer of times, you want to repeat the action clip.

The Action will no be repeat with an offset of 0.1 frames.


How to determine the angles between bones using a Python Script?

The angle between two vectors.

For example sake the triangle ABC is the three points in space A, B and C. where  B and C are the head and tail of the active pose bone  (context.active_pose_bone).

The point B is the mid point of head and tail of bone named "Bone". (Edit to match your bones name)

Will use mathutils.Vector.angle(vector) to calculate the angle.

import bpy
from math import degrees
context = bpy.context
ob = context.object
# middle of thigh
tb = ob.pose.bones.get("Bone")
B = (tb.head + tb.tail) / 2

# the active pose bone
pb = context.active_pose_bone

A = pb.head
C = pb.tail

# angle AB BC
alpha = (A - B).angle(C - B)
print(degrees(alpha))


Make dashed (or dotted) circle appear like powerpoint wheel animation

This can be done procedurally pretty easily.
Just make a ring shaped object that has the desired dotted line width and give it this material:

The driver for the second input of the subtract node is #(frame - 1) / 120. The 120 is the number of frames for one rotation (at 60 fps this is two seconds).


trackers not showing after making camera solver

Enable Motion Tracking in the 3D viewport.

For 2.8 the option is found as an overlay.


If you insist:

No, unfortunately there is currently no functionality to show the distortion of UV maps in the 3D Viewport as heat maps, like one can do in Modo. The question Is there a way to show distribution of UVs as a heat map? seems to cover all the options for displaying UV stretch in Blender.

But this seems like something that might be possible to code in Python as an add-on, maybe it would not be very difficult to output this information as vertex paint information. Who knows?.. maybe someone will see this question as a fun Python exercise...


You don’t need to use Time Remapping at all if all you care about is hitting the fps target you want in your final render. Even if your computer isn’t powerful enough to render the animation in real-time, that doesn’t affect the speed of the final render at all: it will take longer to render the animation, but when it’s played back, it will be at the appropriate speed.
Time remapping is used to artificially lengthen or shorten the real time duration of an animation, which could allow you to, for example, render an animation in slow motion. But it doesn’t affect the fps of the rendered animation at all; it just makes the animation happen over more or fewer frames.
If all you want is a 24 fps animation, don’t bother with the Time Remapping settings, just select “24 fps” as your scene’s frame rate and hit render.

If your problem is that when you render your animation actually runs too quickly (in real time) because you timed everything with the 12 fps you were getting in the viewport in mind, then you can use Time Remapping to help. The Time Remapping options just specify a scaling ratio on the duration, where the duration of the final render is effectively multiplied by $\frac{new}{old}$.
Therefore, if you want the final render to run at half the speed of what your timeline specifies, you can put any value in for Old and twice that value in for New. For example, either of these configurations would work, since they both do the same thing:

Note that you’ll also have to double the value you set for your End frame, or your rendered animation will end halfway through.


Having an issue with textures and UV mapping

Your texture is distorted, because your image texture is in 2:1 aspect ratio, and your original UV map in 1:1 aspect ratio.

Either manually scale the UV map to half it's width.
Or use the Mapping node's Scale panel to correct for the distortion.


How can I "convert" a blender model into a 2d drawing?

Another option is to use the Material Override option in Properties > Renderlayers to override all the materials with a flat gray shadeless material.
For example:

Create a shadeless gray material:

Use it as the renderlayer override:

Result:


What is causing the window coordinate vector to not project properly?

If anyone has the same issue, I found the answer. So this was filmed with a phone and it could be that the dimensions weren't quite right so my camera cropped a bit of the video. So that was pretty much it.


Align normals to camera with material nodes

Geometry node has an Incoming vector output. That is the vector pointing towards the point the shading point is being viewed from (Blender's manual). If you align surface normals to the camera you also get vectors pointing towards the point the shading points are being viewed from. So that's the same thing. You should be able to just plug Geometry node's Incoming output to Normal inputs of your shaders.


Almost anything can be compressed under the right conditions regardless of whether it is a solid, liquid or gas. Put a different way, if you apply pressure to a liquid, gas, or even many solids their volume will decrease. The amount that the volume will decrease in response to (a certain) pressure is called "Compressibility".

The Blender physics engine can simulate this phenomenon to a limited extent, and the particular value you are asking about is the amount of compression due to gravitational pull. The documentation for this feature is here.

I hope this helps you.


You should choose another unwraping method(just after unwrap operation at the bottom left corner of the 3d View). 'Conformal' seems to work fine.

Also, you should not use 2.80 version. It is not released yet. Bugs are still very much expected in the beta version so it will most likely cause various problems for you especially while you are learning and might not understand what should be happening and what might be happening because of bugs. At least keep this in mind because some things are going to work in ways you are not even supposed to expect in this version because it is still experimental.


Not sure what do you mean XY axis, But you might misunderstand the subscription for array in python. They should start at 0 not 1. eg. x = [3,6,9]; x[0] # is 3. The Object.location (Vector) stand for [X,Y,Z] So you might need to use location[0], location[1] instead.
Instead of using number to retrieve axis, ones should use properties to get the axis for clearance. eg. location.x = 1.0; location.y = 2.0
import bpy
import random

constrain = (-0.01, 0.01) # I prefer to use tuple for min, max value

for target_obj in bpy.context.selected_objects: # PEP8 recommend to use lower snake case
  target_obj.location.x = random.uniform(*constrain) # And unpack them using *
  target_obj.location.y = random.uniform(*constrain)
  continue
  # Another approach
  target_obj.location.xy = (random.uniform(*constrain), random.uniform(*constrain))
  # There can be called and manipulated by combination as well


You can create simple Sine Function which can be controllable (frequency, postion, width, amplitude) and position wave at the bottom of your model.

Take into account position in 3D space (rotation matter).

You can rotate your object and apply rotation or switch Z for Y in Separate XYZ node.

In this example I've used Color Ramp to control colour for Roughness input.

Bottom nodes are just for bump, so don't pay too much attention to them.


How can i make a Glass material that doesn't need any light to shine?

Set the background material to white or light grey in enviroment.
Turn on ambient inclusion in enviroment settings.
Set film to transparent in render settings.

That said, without a directional light you won't get shadows or reflection that make it look like rain.  So you might want to add a light, use an image or movie in the background that the rain could reflect, or set up a light that only throws shadows and place it directly above your rain.

Andrew price did a great tutorial that included rain on the camera, if you have any other issues you might want to check it out on blenderguru.com


If you just render pass. It should work as you described.
Possible reasons why it doesn't:

you don't have enabled Output Properties > Postprocessing > Pipeline > Compositor
or you don't have mark checkbox on top row of Compositor Editor > Use Nodes
or if you rendered only single image - these are not saved automatically (without add-on)

According to your screen, should be rendered only Depth pass.
To render and save final render (Composite node if enabled) and Depth pass (File Output node) at the same time on Render Animation action - node tree should look like this (for example):

Note: Composite node can be also replaced File Output node. Benefit is not only separate output file, but you can also specify different file format or directory.


Physically accurate glass surface touching diffuse surface

If an object is diffuse it will be diffuse in glass same as in the air or in water. If you drop something diffuse into water it does not become reflective because water is reflective it stays diffuse unless there is some other material in between it and water like for example air bubbles stuck in surface imperfections, dirt or oil, or something else or if the materials react chemically. If the object is fully submerged in another material, the way it reflects light will not change. The type of light that can reach the object or the amount of it can change because of the material it is in, but not it's reflectivity. If there is no interface of two transparent materials there will not be any change in the direction light travels as well, so there is no need to do anything at all for it to be accurate if an opaque object is fully submerged in a transparent material.

The first image is physically correct if there is nothing inbetween the object and the glass and if the object is diffuse. Volumetric effects should work correctly as well, since all that is needed to calculate them is the depth from the surface of the glass to the surface of the object.


Dave

You have to add a 'Lattice' object as well as the object to deform (should be in the shift+a menu, 3D viewport), and point to this lattice from the lattice-modifier added to the object you want to deform...

Have a look at this- https://www.dropbox.com/s/4goj0kobrqmjbut/LatticeExample.blend?dl=0

Chose the sphere, and enable the 'lattice' modifier in the viewport (2nd in the top row of buttons in the modifier settings, in the 'spanner' modifiers tab), bingo!...


ModuleNotFoundError: No module named 'bpy'

After multiple hours of searching, the issue was due to the python interpreter not being automatically changed when activating a different environments within visual studio code.
The bpy module must use python 3.7.6 (for my version anyway) otherwise the module is not found.


Object becomes unaligned after constraining and moving objects

I found that I needed to remove all constraints on the cylinder, set its origin to the empty's location, and then put back the constraints (I skipped that part from the tutorial on accident).  So from what I learned, an object's origin is important in constraints.


Here is an example of simple Sverchok usage, allowing you to interpolate between the two csv files.

use the value slider on the LERP node to Linearly Interpolate between the lists of coordinates. Feel free to ask questions about this, but I don't think this requires SNLite unless you really want to use code.
If you really want to use code you need to explain what you want to achieve with the two csv files, how they are to be interpolated. You have a nice simple example which you should be able to experiment with outside of Sverchok, from the Blender Text Editor.
set up your points, point and values as numpy arrays, and ignore SNLite until you can make it work purely from the TextEditor evaluation/execution. Once you know what python to write, converting the script to something that can be loaded into SNLite is trivial.


Can Grease Pencil objects created with older Blender versions interact with light sources in Blender 2.83?

That's correct. The Grease Pencil has been rewritten from scratch and lights are only affecting Grease Pencil Objects created in Blender 2.83.

Quote from the official Blog Post (5. Converting Old Files):

  When you load a file, Blender tries its best to convert missing settings/features to their new equivalent (e.g. 2.7 Groups → 2.8 Collections). But sometimes there isn’t a one to one equivalent, especially if the feature has been replaced completely. In the new system, for example, the Light Effect modifier is replaced by light objects, this case needs to be handled manually.

Some new properties/data seems to be missing in the old version of the Grease Pencil Object thus lights can't illuminate the old strokes. However, there is a workaround:

Create a new Blank grease pencil object (ShiftA > Grease Pencil > Blank)
Replace its data-block with the old one (Object Properties > Data-Block dropdown)

And copy all transforms (location, rotation and scale) from the old one to the newly created object (you can use 'Copy Attributes' Add-on for that).

Following script does all of that in one go. Select all appended objects and just run the script:

import bpy

C = bpy.context
D = bpy.data

for old_gp_obj in C.selected_objects:
    if old_gp_obj.type == 'GPENCIL':
        # Create new gp object based on the old data
        new_gp_obj = D.objects.new("{}_converted".format(old_gp_obj.name), old_gp_obj.data)
        # Copy transforms
        new_gp_obj.matrix_world = old_gp_obj.matrix_world.copy()
        # Get and link to collection
        old_gp_coll = old_gp_obj.users_collection[0]
        old_gp_coll.objects.link(new_gp_obj)
        # Hide old object in viewport
        old_gp_obj.hide_set(True)

Notice that old objects are hidden after running the script.


What you have done is to convert the frames in an "Action Strip" or "Action", to edit this frames select the "Action Strip" (the yellow one) and press Tab to edit it. I don't know if you can revert the "action strip" to "frames"

Also if you added another keyframe, the upper frame override the bottom one. What you need to do is to convert the new keyframes in "Actions Strip" and play with their properties.

Look at image 3 and search for the blending property, it define how it will apply over others "actions". After convert "frames" to "Actions" you can drag and drop to order the "Actions", start and end times, etc.


UV unwrap doesn't show faces in UV image editor

You have several objects selected and then you have gone into edit mode on one object, the active one. This is evident by the fact that the entire ship appears to be selected (from the orange outline) yet it's vertex data is not shown. This may be misleading you if you expect the entire ship to show in the UV editor.

Only the selected faces of the active object will show in the UV editor, in your screen shot you only have 2 vertices selected, which is why no UV faces of the object are shown. Press AA to de-select the two vertices and then select all of the vertices in the active object, then unwrap and then they will show spread out in the UV editor.

You will need to repeat this for each object unless you wish to join them together into one.


To create your lighting start with a mesh, you will need to add thickness to it, so apply a skin modifier, enter edit mode, and use CtrlA to scale the "thickness" of you mesh until your satisfied with you lighting.
There are now to approaches, the not so great looking and very very slow  material only approach, or the materials and composting approach which will go much faster and look way better
Material Only
Approach
Lighting lights up the whole sky, since what it is in essence doing, is illuminating dust and water/mist in the atmosphere with its very intense glow. In this solution we will replicate that by using volumemetric rendering. For this we will need two materials, lightning and atmosphere
lightning materal
For the lighting, we will only need a simple two node shader:

The emission will create a very bright white mesh, and it will have a blue cast on surrounding objects.
Atmosphere material
The atmosphere will have a "haze", in order to do this, we need to give the world a volume by adding two nodes, volume scatter and volume absorption. The volume scatter will cause the light to spread inside the world, while the volume absorption will cause the light to fade, stopping our lighting for illuminating the entire atmosphere. Balancing the density of the volume scatter & volume absorption is the key too a good result. Having the volume scatter be two dense will cause the lighting to white out the sky, while having the absorption two dense will cause the lighting glow to all but disappear. The ratio between them controls the spread of the lighting glow.

Result
Rendered at 50,000 samples, taking 50 minutes

Approach Downsides
Renders will appear noisy even at sample counts as high as 50,000, and render times can take hours. it also just doesn't look that good.
Material & Compositing
Approach
Because of the incredibly time consuming render times of the previous approach, and the difficulty of fine tuning, this in many ways is the superior approach. Instead of using volume, we will try to fake the light spreading by using blue nodes in the compositor.
The lightning material will stay the same as above, but this time we won't modify the world material at all. Instead we will go into the compositor to add the glow
Scene setup
Set the lightnings material index to 1, instead of 0.

Next check the Object Index pass in the Scene properties

Node setup

I used the Object index here, since its values were  1 - 0 vs the render had values of several thousand for the whites, since the lightning was set to realistic brightness levels. I then used curves to raise the brightness to acquire more glow. I then used the glare node to blur (thanks, gandalf3 for the tip), which gives the best blur, to add the glow that occurs in the lens. Atmosphere can also be a factor, but not in this case. Finally I colorized it by raising the blue channel using the curves, as well as the green channel (to a lesser extent).
Result
Rendered at 1 samples, taking 0.9 minutes (including calculating the compsiting)

Approach Downsides
The main issue with this is that the lighting will still appear as a white line to surrounding object in the scene.. this answer details workarounds for that issue, but be aware that this may complicate the scene
Bonus: Awsome lightning gif by gandalf3 (creating using the compositing technique)

Bonus #2: I rendered the volumetric lightning at One Million Samples, taking 15 hours, 14 min, and 26.9 Seconds... and it still has some noticeable noise:


What causes the screw modifier to fail and create black 2d slice from a bezier curve?

I suspect you've scaled the curve to 0 in one dimension or another, in Object mode, to flatten it. If the object carries that transform, it still will, after being modified. Ctrl A > Apply the scale of your curve.
Think twice, every time you scale in Object mode during modelling. Prefer to do it in Edit mode.


Do you animate a character with clothing or do you add clothing after?

I would add clothing before and animate it together because then the clothes will stay on the character. You can then add cloth physics and the animating wont effect it.


Deform a quadrant of a cylinder along the z-axis

If you want a very smooth quadrant you will need more vertex density.  You know a smooth human face with many contours requires many more vertices than a simple cube
Edit Mode
Loop cut can do this.Control R
You can set the cursor to the center of a completed cylinder .. as if you had 4 quadrants.  You probably have seen Cylinder and Cones being edited which have complete circles so Blender can figure out center easily.  You need this one extra step since you only have one quarter circle.
Set cursor . Shift S .Set the center of scale for proportional editing to cursor.  This allows you to change shape from any point you choose.  This item is two UI boxes to the left of [edit mode] on the bottom strip of 3D View Window in your images above
Select bottom of quadrant. Many vertices.
Enable Proportional edit. o. Scale to see effect. Use mouse wheel.
Experiment many more times
State whether or not you are making progress
Tutorial https://www.youtube.com/watch?v=MrNVVHdKd3E


Your particle system is set to emitter, set it to hair.


Smoke+fire new showing in viewport not render at all

Try to save your blend file and then make a bake of your animation. Your computer can't probably calculate the simulation in time.


I guess, that is not the case, he is using one image for the front view and one for the side view and as he is switching between views using a short key so its look like he has background image for every view

Background image is disappeared in many views, take a look below:


How to numerically assign dimensions of a face

A better way is to first create the bottom/top face numerically, then adjust the height, which can also be done numerically. As shown below:


How do I render a decent swimming pool animation in a reasonable amount of time?

The most expensive part of this rendering is going to be the caustics. If you want real caustics, they will probably be grainy. In cycles you can spend as time as you want on each frame, but less time will make a more grainy render.

If you want to fake caustics, there are a number of options. They give different results and different rendering speeds.

Add an emitting shader to the pool floor. Make it emit light in a caustic-like pattern. You can probably animate like this: How to animate noise texture "seed"?
Use vector math to fake caustics. Explained here http://urchn.org/post/fake-caustics-in-cycles
You can bake a texture in cycles from the first frame caustics. Use that for the rest of the frames. This will give a physically correct first frame but will not animate.

I think that the vector-math approach will give you best results.


You are essentially correct.

The standard 3 rig setup is as follows:

IK control chain
FK control chain
Deform chain

With the deform chain constrained to both control chains with copy rotation etc, and a driver setup to control the influence of those constraints so only one control chain influences the deform chain at a time.

In blender this is usually done all within one armature, rather than as separate objects, although it could be done separately if you wanted to.

The easiest example to find is the one that comes bundled with blender itself -  the generated Rigify rig uses this setup for arms and legs (Although it has an extra chain prefixed with ORG between the control chains and the deform chain (bones prefixed with DEF), for other reasons).


Is there a way to delete unneeded keyframes automatically with v2.79?

Now to achieve the same result, while hovering the dope sheet or the graph editor press 'X'.
From there you'll have the possibility to use the 'clean keyframes' option or 'clean channels'.

If you want to access it through the menu, just click the 'key' option and from there you can access the 'clean keyframes' (as shown above).


Thanks for suggestions. Workflow that sorts of work for me is as follow:

Once You have the grease pencil animation that You like:

Loom Addon
Sadly it does not detect grease pencil keyframes. Thus it is needed to create object level keyframes. Empty will do fine. Create one and paste them on frames where Grease pencil keyframes are.

Select all keyframes (in Dope Sheet) You want and choose "Render Selected Keyframes"

It then creates the keyframes list:

And finally it creates animation from keyframes only:


One option is to press ShiftAltA to play the animation in reverse, but I think you mean the following (this works for relatively short and simple simulations, else it would take to much time):

Bake the simulation to keyframes

Open graph editor and make sure every keyframe is selected

ShiftD to duplicate keyframes and then X to shift the keyframes horizontally

Click Left Mousebutton to confirm and then S, X then -1, to invert the keyframes

Change the simulation end frames


The property you are looking for is 'Scene.camera'.

If you have 'python tooltips' enabled in the user preferences you can hover over the camera field in the 'Scene' tab of the 'Properties' area, to reveal the python code for this property:

The code to access this property for the current scene and assign it to a variable is:

obj_camera = bpy.context.scene.camera


How to select specific objects to make their keyframes appear on the Dope Sheet?

You can turn on the Selected filter (mouse pointer icon) in the header of the dope sheet. Then the dope sheet will only display keyframes for the selected objects.


How to Decompose and Compose the local transform matrix

Using the 3x3 matrix rotation part.
Does a child object inherit the matrix from the parent?
Can decompose a matrix via Matrix.decompose()
loc, rot, scale = M.decompose()

the rotation is given as a quaternion.  There is no guarantee that that the same rotation matrix will be returned when converting that quaternion back to a matrix.  https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Rotation_matrix_%E2%86%94_quaternion
Test script, with both "standard" quaternion decompose and using the 3x3 rotation matrix part.
import bpy
from mathutils import Matrix

ob = bpy.context.object
# basis (or local) matrix
Mb = ob.matrix_local

print("Input")
print(Mb)

t, q, s = Mb.decompose()

T = Matrix.Translation(t)

R = q.to_matrix().to_4x4()

S = Matrix.Diagonal(s.to_4d())

M = T @ R @ S
print("Quaternion decompose")
print(M)

print((M.to_3x3() - Mb.to_3x3()).determinant())

R = Mb.to_3x3().normalized().to_4x4()

T = Matrix.Translation(
        Mb.to_translation()
        )

S = Matrix.Diagonal(
        Mb.to_scale().to_4d()
        )

M = T @ R @ S

print("3 x 3 decompose")
print(M)

print((M.to_3x3() - Mb.to_3x3()).determinant())

Sample output.
Input
<Matrix 4x4 (1.8334, -0.5595,  0.0113, 0.6324)
            (0.5749,  0.1069, -0.9128, 2.6868)
            (6.2012,  1.4492,  0.3085, 0.8749)
            (0.0000,  0.0000,  0.0000, 1.0000)>
Quaternion decompose
<Matrix 4x4 ( 4.5809, -1.0592, -0.1913, 0.6324)
            (-1.7931, -0.0093, -0.9261, 2.6868)
            ( 4.2364,  1.1414, -0.1851, 0.8749)
            ( 0.0000,  0.0000,  0.0000, 1.0000)>
0.6159369945526123
3 x 3 decompose
<Matrix 4x4 (1.8334, -0.5595,  0.0113, 0.6324)
            (0.5749,  0.1069, -0.9128, 2.6868)
            (6.2012,  1.4492,  0.3085, 0.8749)
            (0.0000,  0.0000,  0.0000, 1.0000)>
0.0


How to bypass 3D view axis when selecting vertices behind it

You can CTRL Spacebar or click the button to the left of the Transform Manipulator buttons and the bottom of your view


How to get a right click coordinates in 3d_view

Get screen from context.screen or context.window.screen

Get the clicked area by looking at area coordinates, of each area, in the screen returned from context.screen or context.window.screen. Used the latter in example below, my tests suggest could use either.   The region can be obtained from the area.

    if event.type == 'RIGHTMOUSE' and event.value == 'PRESS':
        screen = context.window.screen # or context.screen
        def get_click_area():
            for a in screen.areas:
                if (a.x < event.mouse_x < a.x + a.width
                and a.y < event.mouse_y < a.y + a.height):
                    return a
        a = get_click_area()
        print("Right Clicked in %s area of screen %s" % (a.type, screen.name))

as mentioned in my comment, get_3d_area_region() above, will only return the first matching area it finds in the bpy.data.screens collection. For the default file will be bpy.data.screens["3D Full View"].areas[1] every time.


Is there a way to export the color palette (paint mode)?

Import palette from another blend

When you'd like to save a palette using standard features press New button in the palettes dropdown list. New palette will be saved and used instead of default one:

When some changes are made so it to contain desired hues, save the file and open new one. Select option to link or append from file, navigate to that saved file and search for Palettes folder:

You will see there as many palettes as you created in original file.

Paint Palette addon

It's possible to use Paint Palette addon for that, which is bundled with Blender. Addon will save your palette in .gpl format, so you should be able to share saved palette in GIMP (or import that in Blender using this addon):

Press "+" button located leftwards to add a color to palette.
Press "Browse" button to select folder where you'd like to save and click  "Accept" there.
Press "+" button in the top right to save preset using selected path.


how am I supposed to export fbx only one mesh>?

In Object mode select the mesh you want to export.
File > Export > FBX (.fbx).  Then in the FBX export window enable "Selected Objects".

Only selected objects will be exported.


How to add user input fields to the UI, to be used by a Python script

You would need to create an operator to supply your script with parameter values.
This following script derived from the operator_mesh_add.py template (accessible from the template menu in the text editor):
Your code was simply copied into the scale function.

It creates an enum property to select the axis and a scale factor which can be entered from the UI in the last operator panel:

Look through the other templates for examples on how to add your operator to a menu, the object properties or whatever you like.

import bpy
from bpy.props import FloatProperty, EnumProperty

class ScaleAxis(bpy.types.Operator):
    """Scale axis """
    bl_idname = "mesh.primitive_scale"
    bl_label = "Scale axis"
    bl_options = {'REGISTER', 'UNDO'}

    axis  = EnumProperty(
            name="Axis",
            description="Axis selection",
            items= [('x', "X", ""),('y', "Y", ""),('z', "Z","")],
            default='x'
            )

    newdim = FloatProperty(
            name="Width",
            description="Scale",
            min=0.01, max=100.0,
            default=1.0,
            )
    # your code
    def scale(self, axis, new_dim):
        ob = bpy.context.active_object
        d = ob.dimensions

        x = d[0]
        y = d[1]
        z = d[2]

        scale =  axis

        if( scale == "x"):
            indice = 0
        elif( scale == "y"):
            indice = 1
        else:
            indice = 2

        old_dim = d[indice]
        factor = new_dim / old_dim

        scale_x = ob.scale[0]
        scale_y = ob.scale[1]
        scale_z = ob.scale[2]

        ob.scale[0] = scale_x * factor
        ob.scale[1] = scale_y * factor
        ob.scale[2] = scale_z * factor

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

def menu_func(self, context):
    self.layout.operator(ScaleAxis.bl_idname, icon='MESH_CUBE')

def register():
    bpy.utils.register_class(ScaleAxis)
    bpy.types.INFO_MT_mesh_add.append(menu_func)

def unregister():
    bpy.utils.unregister_class(ScaleAxis)
    bpy.types.INFO_MT_mesh_add.remove(menu_func)

if __name__ == "__main__":
    register()

A nice tutorial


modeling in blender by taking input from wireless media controlled by autonomous system

First you will need a python module that will talk to your xbee. The XBee module doesn't mention what python versions it works with, but it uses pyserial which does support python3.5. If that doesn't work, searching pypi for xbee shows a few other possibilities.

There are a few ways to install third party modules or you can make blender use the system python. You can also add a path to sys.path so that blenders python can search for it.

Once you are able to import the module within blender create a script that responds to the input. You may want to look at using the subprocess module to read the input without locking blenders UI.


'Pack into Blend' doesn't include .Mov Files

Mov files can't currently be packed

As said in the manual at the Packed Data page:

  Some typically heavy external files, like video ones from the Sequence
  Editor or Movie Clips, cannot be packed in a blend-file.

Your file fall into the Movie clips category, which unfortunately has been exclude from the files format that can be packed. You'll have to copy between folders and update the path.

If you are using an "image as plane", you should browse in the shader editor the image sequence node and change the path from the Open Image icon:


No, it is not possible to rig an STL file.

Firstly, Blender cannot open STL files. They can only be imported to Blender and once imported the information contained in such files is translated to a format native to Blender and, so to speak, become a .blend file.

Secondly, the term 'rigging' in CG context does not apply to files or file formats and saying to rig a file format makes no sense at all. Rigging is a process of making some kind of deformation or control system to make it easier to animate objects in animation software packages like Blender. So if you want to rig a 3d model that you imported from an  STL file to Blender, then it's exactly the same as to rig any other model in Blender. Rigging however is a very complex and wide subject and cannot be described in full in one answer. You will need to ask a more specific question and provide the full context of your situation to get any meaningful help.


This might be that you have hidden some faces when editing and not realizing it. I can only suggest to go through your Blend.File and go unhide any objects.  See if that works for ya.


Weight painting is causing weird extrusions

It looks like a Mixamo action... i.e. Y up. Their weight paint to start with is not good. You can not this also in their screen animations - the moves are problematic, hands cross the leg etc'
When you import it into Blender, it's even worse.
You can either try to re-target with a paid addon (eg:AutoProRig). But you would still need to have a solid blender rig to be the target.
Then, their meshes are triangulated and not with quads like blender which makes the weight painting task more tedious and less intuitive.
But even with a very good rig and proper mesh it is nearly impossible to use this rig as is. You need additional bones or else the meshes will cross each other.
I would suggest to try it on a simpler object before.


Why is the bone group remove button disabled?

You must be in pose mode.

Select the armature and press CtrlTab, or set the mode in 3D view > Header:


Mesh shrinking and expanding between shape keys

The mesh changing its size is caused by the way the shape key transforms the vertices. You can use different operations (in your case, bone deformation) on a base mesh to create the shape you want, but the shape key only stores information about positions of vertices. To illustrate it here's a simple example:
If you rotate a cube mesh to get the new shape, the shape key doesn't store the path the vertices are moved, so the transition from base mesh to shape key is linear which can result in changing the appearance of the mesh between start and end position.
The top image shows the way how the shape was created by rotating the cube mesh around the 3D cursor.
At the bottom it shows how the transition from the base mesh to the shape key will be performed. As you see, the vertices move in a straight line from start to end position and change the cube's size.
To get the same deformation the bones would create it would be best to keep the armature deforming the mesh. If you can't keep the bones for some reason, inserting more shape keys to get closer to the original deformation causes a problem, since shape keys store the delta transformation: if you set key1 after moving vertices from Z = 0 to Z = 2, and for key2 you move those vertices to Z = 3, then key1 is moving up 2 - 0 = 2 units, and key2 is moving up 3 - 0 = 3 units. If you set both shape keys then the vertices are going up 2 + 3 = 5 units. If you ignore key1 to move them only 3 units you'll have the same problem like before with only one shape key.


In the object context menu I changed 'Shade Smooth' to 'Shade Flat' and the unwanted reflections were no longer rendered.


orbiting around a moving object(moon&earth)

Select your earth, and add an empty at the same position. Hold shift, and select the earth. Enter edit mode. While editing the earth's mesh, add a vertex at the center of the earth. Press Ctrl+P and select make vertex parent. Now, the empty will have the same location of the earth, but will be able to rotate independently of the earth's rotation. Parent the moon to that empty. Now, you can animate the empty rotating to make the moon's orbit. Do the same thing with the sun. Add an empty at the sun's position, add a vertex in the center of the sun, create a vertex parent of that empty. Then, parent the earth to that empty. you can animate the empty on the sun to create the earth's orbit around the sun, and the moon's orbit will remain consistent.


How to render curve guided particles as path?

Finally... the answer is in the documentation.

  The Path visualization needs a Hair particle system or Keyed particles.


Unable to pack files/can't find missing files

It is happening because Clo no longer supports JPEG files for fabrics.
You now have to spend $5K for their fabric kit to render your own textiles.


Is there a way to do proportional editing only on specific vertices?

You can change the proportional editing type to 'Connected' to only affect the vertices connected to the ones you are moving:

This can also be enabled with Alt+O.


highlighting the edge created by overlaping meshes

Extrude the plane, it needs to be manifold.

Add a boolean modifier to it with the Function object as the object.

Group the plane object, enable Freestyle on the Group with border rendering.


Do I need to optimize PNGs after I will output them from Blender and before I will import them to video editing software?

No, assuming by optimize you mean with an optimizer such as pngcrush. These optimizers are designed to strip out extra information in the file in order to reach the smallest acceptable file size, which seems unlikely to matter much for files that will only be used while you're editing your video. If optimizing accomplishes anything, it'll be to optimize away information which might have been useful when making further tweaks in your video editor.

As brockmann pointed out in the comments, using EXR is preferable to PNG, if your video editing software supports it.


My fluid domain disappears and appears to turn into the fluid object when I bake

Fluid Domain "Disappears" When Baked

Don't worry, that is what is supposed to happen, even though it may seem odd. When you bake a fluid simulation, the domain object visually becomes the fluid flowing and no longer is visible as the cube domain object you started with:

But notice that if you want to see the original domain cube again, you can toggle (turn on/off) the visibility of the Fluid property of the domain by clicking on the "Display Modifier" icon (  ) next to the "Fluid" button.

Another way to see the domain object's original shape (geometry) is to set the "Viewport Display" to "Geometry" in the domain's settings:

In addition, the fluid domain cube is still intact if you want to modify it -- just switch to Edit mode and you can see and edit the cube:


Is there a quick way to unwrap an image texture onto a complex mesh?

I downloaded the file myself and checked, the folder contained another zip file in the source folder with the fbx and textures, those i used. The png files in the texture folder seem no different, except their size due to the file-format, up to you which you wanna use.

In Blender, after importing, the last object in the outliner (marked red in the picture) got a new material and i used the Albedo, Roughness, Metallic and Normal textures as "Image Texture" nodes.
The use of the "Texture Coordinate" and "Mapping" nodes are not needed for this to work, just used to use them. Added a picture to show that it's working even without the "Mapping" node.

The uv-coordinates are fine and all there. The textures align as well.
The picture shows the Object with it's textures applied.


How to set cursor position in the text editor?

Yep, cursor_set appears to use a mix of 'space_data.top' and 'space_data.visible_lines' and is a might confusing.  However you can use

    bpy.ops.text.jump(line=1)
    bpy.ops.text.move(type='LINE_BEGIN')

Will move the cursor to the beginning of line 1

    bpy.ops.text.jump(line=10)
    bpy.ops.text.move(type='NEXT_WORD')

moves to the first word in in line 10, where you would add a comment #


Lightning issue - Constant light that doesn't enable the use of other lights

That happens when you are not using a shader and plug a texture directly to the surface of the material.

.
Plugging a texture directly to the material output, the texture becomes  emission source.

Shaders define what happens to light rays on the surface of an object. Without a shader... well... there is no shading..
Use a shader and plug the texture as color.


How are color images used as input values in nodes?

You're correct, it uses brightness. Or rather, luminance.
The color output contains three values, R G and B. When a color output (yellow socket) is plugged into a scalar input (gray socket), it is automatically converted as if using an RGB to BW node.

For example, this can be observed by plugging an image texture into a math node set to multiply by 1:

Before multiplying the values, the R G and B channels are turned into a single grayscale channel. Since we're multiplying by 1, the values are unchanged.

This is the same as the more "proper" method of using a RGB to BW node:

By default blender converts the R G B channels to a single channel while trying to preserve the luminance (see wikipedia).

To do this, the RGB to BW node does something like this:

Once the color channels are converted to a single channel, this can be used to set the mix factor for each pixel (using just the mix factor slider is equivalent to using a solid color image). See How does fac differ with manual control versus node control?.

If you want to use images with very specific values, then you'll want to pay close attention to color management. See: What exactly does the "Non-color data" option for image/environment textures do?


mix a noise texture with a normal to make patches

Try to use MixRGB node for blending Color and Height images with Noise Texture then put result to Base color and Height inputs of Principled BSDF and Displacement node.


Get RGB value of texture from face on mesh

That's a great question! A given face can have any number of colors contained within the texture though – in order to solve this problem you'll also need a specific point to map to a specific pixel on your face's texture.

I recently solved this problem for the Blender addon Bricker, which applies the nearest texture colors of the original model to each of the generated LEGO bricks. See this link for more information about the problem and how I solved it.

Here's a simplified version of the code I wrote to solve the problem:

import bpy
import math
from mathutils import Vector
from mathutils.interpolate import poly_3d_calc
from bpy.types import Scene, Mesh, MeshPolygon, Image

def getUVPixelColor(mesh:Mesh, face_idx:int, point:Vector, image:Image):
    """ get RGBA value for point in UV image at specified face index
    mesh     -- target mesh (must be uv unwrapped)
    face_idx -- index of face in target mesh to grab texture color from
    point    -- location (in 3D space on the specified face) to grab texture color from
    image    -- UV image used as texture for 'mesh' object
    """
    # ensure image contains at least one pixel
    assert image is not None and image.pixels is not None and len(image.pixels) > 0
    # get closest material using UV map
    scn = bpy.context.scene
    face = mesh.polygons[face_idx]
    # get uv coordinate based on nearest face intersection
    uv_coord = getUVCoord(mesh, face, point, image)
    # retrieve rgba value at uv coordinate
    rgba = getPixel(image, uv_coord)
    return rgba

def getUVCoord(mesh:Mesh, face:MeshPolygon, point:Vector, image:Image):
    """ returns UV coordinate of target point in source mesh image texture
    mesh  -- mesh data from source object
    face  -- face object from mesh
    point -- coordinate of target point on source mesh
    image -- image texture for source mesh
    """
    # get active uv layer data
    uv_layer = mesh.uv_layers.active
    assert uv_layer is not None # ensures mesh has a uv map
    uv = uv_layer.data
    # get 3D coordinates of face's vertices
    lco = [mesh.vertices[i].co for i in face.vertices]
    # get uv coordinates of face's vertices
    luv = [uv[i].uv for i in face.loop_indices]
    # calculate barycentric weights for point
    lwts = poly_3d_calc(lco, point)
    # multiply barycentric weights by uv coordinates
    uv_loc = sum((p*w for p,w in zip(luv,lwts)), Vector((0,0)))
    # ensure uv_loc is in range(0,1)
    # TODO: possibly approach this differently? currently, uv verts that are outside the image are wrapped to the other side
    uv_loc = Vector((uv_loc[0] % 1, uv_loc[1] % 1))
    # convert uv_loc in range(0,1) to uv coordinate
    image_size_x, image_size_y = image.size
    x_co = round(uv_loc.x * (image_size_x - 1))
    y_co = round(uv_loc.y * (image_size_y - 1))
    uv_coord = (x_co, y_co)

    # return resulting uv coordinate
    return Vector(uv_coord)

# reference: https://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts/addons/uv_bake_texture_to_vcols.py
def getPixel(img, uv_coord):
    """ get RGBA value for specified coordinate in UV image
    pixels    -- list of pixel data from UV texture image
    uv_coord  -- UV coordinate of desired pixel value
    """
    uv_pixels = img.pixels # Accessing pixels directly is quite slow. Copy to new array and pass as an argument for massive performance-gain if you plan to run this function many times on the same image (img.pixels[:]).
    pixelNumber = (img.size[0] * int(uv_coord.y)) + int(uv_coord.x)
    r = uv_pixels[pixelNumber*4 + 0]
    g = uv_pixels[pixelNumber*4 + 1]
    b = uv_pixels[pixelNumber*4 + 2]
    a = uv_pixels[pixelNumber*4 + 3]
    return (r, g, b, a)

Assuming your mesh object is active, and the cursor is placed on the mesh in the location you want to extract the color from, you can call the getUVPixelColor function like this (simply replace the image_name argument with the name of your UV texture image):

obj = bpy.context.object
mesh = obj.data
point = bpy.context.scene.cursor.location
face_idx = obj.closest_point_on_mesh(point)[-1]
image_name = "test.jpg"  # replace with the name of your texture image

rgba = getUVPixelColor(mesh, face_idx, point, bpy.data.images.get(image_name))

Note that depending on which color space you're working with, you may have to apply a gamma correction to the color before using it as an RGBA value in Blender.

Hope this is helpful!


Fitting clothes to character model with python

Well, i don't know what modifiers you mean, but a common way is to create the Basic shape of the cloth around the Body.
After that's done you add a subsurface and a shrinkwrap mod. Now switch to edit-mode and play around with the modell untill most parts of the cloth fit to the Surface of the character. Now you add a solidify mod. Now you should have a simple cloth-part fitting onto your mesh.
For more a more detailed explanation check this out:

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

Hope I can help you...


To drive lips from an audio file -

For this exercise both lips are simply curve-paths bevelled with a small diameter oval and left as curves.

The animated gif pic below is the Graph Editor and where these "f-curves" are created.  They are simply graphs measuring time (frames) against amplitude or degree of movement.  They can be most useful in that they can be dragged and reshaped to affect animation.

Please note that what you're seeing here is the (speech) audio file after it's been 'baked to an f-curve'  The green waveform is that f-curve.

We use that to drive the yellow sound bar (a plane) to expand in the Y axis with the audio's amplitude.  The louder it is the further apart the lips go.

The lips are simply curve paths and we drag each lip's center vertice up or down using a 'Hook" empty for each.  The upper lip's hook is parented to an empty that's stuck on the upper corner of the yellow sound bar. (parented to)  The lower lip's hook is parented to the lower empty at the lower corner of the sound bar.

As the sound bar is expanded and contracted by the audio, the two hooks are dragged
up and down to follow the two empties attached to the sound bar.

Details -  How to achieve this...

In Edit mode, add a hook to each of the lips' center vertice.  (CTL-H --> Hook to New Object)

With the view set to TOP & Ortho, place the cursor to the right of the lips and add a plane.  This will be the sound bar.  Proportion it as shown. (stretched in the Y axis)

Scale it's Y axis to the max length that you want it stretched to by the audio.  Bear in mind that speech may only get to about 30% of the maximum amplitude most of the time, so scale the Y axis to be at least 2 or 3 times that required.

At the upper end of the sound bar, place an Empty inside it and near to a corner vertice.  Parent it to the plane.   (CTL-P -> Vertice)  (child=the empty)

Do the same at the bottom corner or near to it.  Parent that to the plane/bar also. ("vertice") (child=empty)

Select the upper lip's Hook and parent that to the Upper Sound bar empty. (Child=hook)
Do the same with the lower lip's hook. Parent that to the sound bar's lower empty.

This setup will force the Hook Empties to follow the sound bar's expansion and contraction in the Y axis and drag the lips' centers according to the sound level.

-=================-

---> POINT A <---  (Return to here if the sound bar (plane) needs rescaling)

Driving the Sound bar's Y axis scaling from an audio file -

In the 3D window, take the timeline cursor to frame 1, select the sound bar and insert a "Scale" keyframe. (Hover in the scale slots at right and press i )

With the sound bar still selected go into the Dopesheet and delete the sound bar's other two axis' keyframes.   In this case that would be the X & Z axis.  We only want the Y strip.

Select and highlite the one remaining keyframe. (Y axis)

Go to the Graph Editor and you should be seeing the Y axis scale F-curve.  That's a graph that draws frames (time) against scale. (size)

At the bottom center of the window, expand the "KEY" menu, select "Bake Sound to F Curves".
A file explorer window will open up.  Browse and select the audio file.

Blender will automatically sample this and convert it to a waveform.  (Press Home to see it properly)

If it doesn't, try converting the audio to a wav file.

Back in the 3D window press play. (ALT-A)  to see the sound bar's size expanding and contracting to the sound's amplitude.  The lips should also be curving open and shut.

-==================-

If the sound bar isn't expanding enough, remove it's keyframe by selecting that axis strip's name in the DOPESHEET at extreme left and pressing X.  Check the graph editor to see that the F-curve has indeed disappeared.

Go back to "POINT A" above...

-===============-

Information -  Sound can also modulate lateral movement, rotation and even colour and brightness, the last two requiring some manual trickery because with most audio, it won't drive it bright enough.


Using two or more separate UV maps and textures on the same material and model

First you will have to unfold your entire mesh and separate one area for the head and one for the body. There can be no overlapping meshes.

Now save the 'UV layout' to do the texturing.

What I did was like that, half I used for the head, and half for the body. The rest is transparent not to overwrite one image in the other at the time of placing in the blender.
Head

Body

Now just put them in the blender and that's it.


How do I export objects from Blender separately?

Yes in when you have clicked what type it will export as (FBX etc.) in the bottom left of the screen tick "selection only".


How can I trim an object by an exact mesure?

You can modify the size of the object with the x, y, and z size spinners the toolbar on the right of the 3d view.  All input fields can accept simple mathematical expressions so if the current size is .5m you can type “.5-.002” (.002 not .001 because you want 1mm off each side) and it will scale the object accordingly.


Is there a better way to see what I'm doing during retopology?

The best solution so far that I could find was to turn on backface culling in viewport shading settings, and combine it with "In Front" viewport display option. Some alpha opacity is optional.
It's still quite hard to tell what's going on sometimes - screenshot as an example. I wish some better options were implemented, like "In front" but with total occlusion of backfaces, or selective wireframe toggle by object.


I get white pixels all over the rendered image

In the Properties window, Rendering tab, Sampling panel, you'll find the Clamp options. Try to change the Clamp Direct to 1 or to play with it a little bit.
EDIT: I just noticed there is a bulb (glass material). Maybe you'll have to play with the Clamp Indirect too.

Explanation of what happens:
These white pixels are called "lucky rays". It happens in Cycles when you have many reflections. They are light rays that arrive to the camera in less bounces than the others, so their light is more powerful.
Playing with the clamp values you clamp the light to a value, so this rays are not so powerful anymore.


My mouse is moving very hardly and slow, just at the moment i am rendering an image

Go to the task manager and begin to render something. Right click on the blender task that is taking the most processing power and press "go to details". When you have done that you should see a lot of programs and one of them will be marked(blender will be marked). Right click on it and go to 'set priority'  and set the priority to something low.

Now its fixed(hopefully) but your renders might take longer. Though I'm not sure if it's a noticeable amount slower.


I would do it this way: Once you've created your sphere, create a mesh with an edge that follow the profile of your excrescence. Once in top view use the Knife Project tool to project the profile on the sphere surface. Now join and delete some vertices, extrude up, close the top, create the small hole, etc... Maybe use the Mirror modifier to duplicate the shape all around, or duplicate this part 3 times, rotate it and paste it all around with the Snap (Vertices mode) + Automatically Merge options activated, and at the end create somme additional edges to sharp the edges.

Addendum:


In the Graph Editor, select the track to which you've given a Noise (example: X Location), press N to display the properties panel, choose the Modifiers tab, and play with the Scale and Strength values. Is it what you want?


You simply need to press , that is a comma. That will change the Pivot Point to Bounding Box Center.

Both Median Point and Bounding Box Center will place the 3D manipulator in the center of your selection.


How to add copy of an object from a controller without Logic Brick being present?

How to add an object at a specific posistion in Blender Game Engine

import bge

scene = bge.logic.getCurrentScene()
object = scene.addObject("Sphere","Sphere")
object.worldPosition = [1,1,1]


Trying to mirror object along Global X axis not working - What am I doing wrong?

I know it's been couple of months but still some one might find this helpful. I've been struggling with the same problem - didn't know how to flip an object along world global axis so that object might keep it's local origin orientation, just "look" to the opposite side, say from global X axis. What I came up with is I keep a parent cube at world 0.0.0 and when I need to duplicate and flip something, I duplicate an object, parent it to the cube, then having them both selected mirror along desired axis, unparent my object (keep transform) and it's done. You have a perfectly mirrored object with it's local axis intact. You'll probably want to apply scale afterwards and flip normals too.
I'm not sure why it has to be so many steps for such a simple task.


Which modules are guaranteed to be present in Blender's Python?

Everything included in the Python standard library, except the modules tkinter, turtledemo, distutils, idlelib, lib2to3 and test.

Here's the rationale for why these modules were not included.


How do I create a bumpy reflective material?

Creating a bumpy reflective material is easy using procedural textures and bump nodes.

Step 1: Make sure that you are using Cycles Render

Step 2: Add a Bump Node With Shift+A, and under Vector choose Bump.

Step 3: Connect the Normal output of the Bump node with the Normal input of the Material you are using (In most cases this will be a Diffuse material.)

Step 4: Add a Voronoi Texture node with Shift+A, and under Texture choose Voronoi Texture.

Step 5: Connect the Fac output of the Voronoi Texture node with the Height input of the Bump node.
You'll notice that this already begins to warp the lighting effects on your model the way that you would want them to.

Step 5: Now you just have to adjust the Scale value of the Voronoi Texture node to your liking.
Also, adjust the Strength value on the Bump node, so that the effect on the lighting isn't as harsh.

Your end node setup should look something like this:

Note: This same process applies for any other Texture node, I just used Voronoi for example because it looks close to the effect OP is trying to achieve.


Blender 2.8 Bake multiple textures into one

Using 2.8 and Cycles rendering here is a simple case that should correspond to your context:

An object with 3 materials with its own UV map (eventually several):

Each material here has its own associated mesh faces and the material look like this:

The node setting could be more complex, but that does not matter and I presume this part is already set up in your context.

Now we prepare the target on which we will bake:

Duplicate your object.

Remove the existing materials (these materials are from the original and we don't want it for the target). Use the '-' button to remove the materials.

Add a new material: use the '+' button and create a new one.

Create a new blank image, name it target and save it to disk (for some reason the bake won't work or not always if not saved, maybe because the image is considered as generated).

Create the UV map for this object: remove existing one (they are from the original mesh) and create a new one with the mean you need (smart uv project can work).

Prepare the node setting as show in the lower left part of the image above.

In particular, we need the UV map input and the image texture (with the target texture). You can already connect this texture to the shader. That will produce a warning when we'll bake but this is of no consequences in our context.

Once all this is prepared, place the two objects at the exact same location (and rotation, etc.) so that they overlap exactly.

Select the original and shift select the target. That could be a bit tricky as they overlap but pay attention to do it in this order: select one until the original is selected then shift select to have the target as selected active object.

Now we can bake:

Go to the bake section of Cycles settings:

I presume you want to have the original texture 'pure' colors with no shading (lights, shadows) effects. So choose 'diffuse' as bake type and choose 'color' as influence.

Choose 'selected to active' (all selected object will contribute to bake to the active one).

Choose 'clear image' (erase the image at the beginning of the bake).

Click the 'bake' button.

Here is the blend file so that you can check things. Textures are packed in it but you may need to save the target image to disk as said before.

Note: the target shader may fail to update automatically once the bake is done. Simply manually reactivate the node texture output to correct that.


Maybe you already got it.. the problem is that your backwall has a solidify modifier which is only showing during render..if you dsiable it or move your planks a bit to the front it will work..
hope this helps..

What further confuses about this situation is that the Solidify modifier doesn't show in "Rendered Viewport" mode if the Eye isn't ticked in the modifier settings.


How can I speed up multiple object joining (Python)?

I've been using this, which has featured on stack before.
def merge_objects(name, ob_list):
    ctx = context.copy()
    ob_list[0].name = name
    ctx["active_object"] = ob_list[0]
    ctx["selected_editable_objects"] = ob_list
    bpy.ops.object.join(ctx)
    return data.objects[name]

Naming is optional, but requires the tree as the first object in the list to keep its name.
def JoinTreeObjectsWithTree(tree, treeObjects):
    name = tree.name
    treeObjects.insert(0, tree)
    ctx = context.copy()
    ctx["active_object"] = treeObjects[0]
    ctx["selected_editable_objects"] = treeObjects
    bpy.ops.object.join(ctx)
    return data.objects[name]

finalOb = JoinTreeObjectsWithTree(tree, treeObjects)


How can I automatically extend edge loop selection?

Since the target edges are all boundaries, there are multiple ways to do this:

AltRMB twice on a boundary extends the selection to all boundary edges.For single boundary loop as shown in the example

Other ways to select boundaries.

In Vertex Select or Edge Select mode: 3D View menu > Select -> Non Manifold (or press ShiftCtrlAltM).
Or you can first select all elements, then go to 3D View menu > Select > Select Boundary Loop.


As per @Edgel3D's advice and my own experimentation, it seems that it's impossible to merge meshes in the hierarchy. All merging must be done in Object Mode in the 3D view, or else nothing will happen.

Hopefully this helps someone else who had the same problem and is wondering why Ctrl+J isn't working.


I have a walk cycle at place, how to make it move foward?

In edit mode, align the b__L / R_Foot__ bone orientation and roll with CTRL_Target_L / R_Foot.
Set Copy Rotation constraints to b__L/R_Foot__ bones instead of Child Of.


List comprehension

Every now and then issues occur when removing objects from the collection that is being iterated over. (possibly an issue of the past) Now as a matter of choice I use list comprehension to create the filtered list.

For our filter, an empty has None for its data, and [] for children if none, both of which are boolean false.

A  popped member is removed until the list is empty.  The bpy.objects.remove(...) has a do_unlink property that has a default of False, setting to True removes the need to unlink from scene(s).

import bpy

childless_empties = [e for e in bpy.data.objects
        if not (e.data or e.children)]

while childless_empties:
    bpy.data.objects.remove(childless_empties.pop(), do_unlink=True)


Newbie from 3DS Max. Ignore Backfacing ? Limit Selection to Visible ? 2.80?

I guess what you're looking for is this option, Show whole scene transparent, altZ to activate in whatever shading mode you are:


Multiple object deselection when objects are overlapping

Use Alt select:

Alt select: allows to choose the one to select in the menu.
ShiftAlt select: allows to extend the selection or to set active in the selection (if not active) or to remove from the selection (if active).


Your character still has an active mirror modifier. If you want to solve the problem, select your character, in the properties tab apply the mirror modifier, then shift select the armature, press Ctrl P and choose "with automatic weights".


Dope sheet keyframes: select every nth frame

Select evenly indexed keyframe points and handles.

The keyframes in the fcurve are in order when iterated. Select every second (odd one) by making a False, True, False, True,... list the same length as keyframe points to select the points and handles accordingly.

Test script, (every second) selects the keyframes of the context objects animation. The one shown when action editor is chosen from dope sheet.

import bpy
context = bpy.context
ob = context.object
ad = ob.animation_data
action = ad.action if ad else None
if action:
    for fc in action.fcurves:
        #fc.select = True # select fcurve too?
        sel = list(bool(i % 2) for i in range(len(fc.keyframe_points)))
        # select point and handles
        fc.keyframe_points.foreach_set("select_control_point", sel)
        fc.keyframe_points.foreach_set("select_left_handle", sel)
        fc.keyframe_points.foreach_set("select_right_handle", sel)
        #del(sel)  # clean up?

Notes:

Replace action = ad.action ... line above with action = bpy.data.actions.get("SomeActionName") if you know the action you want to modify by name.
For every nth, in this case every 3rd, where for example sake there are 15 keyframes (py console code)

>>> nth = 3
>>> sel = list(not (i + 1) % nth for i in range(15))
>>> sel
[False, False, True, False, False, True, False, False, True, False, False, True, False, False, True]

% is the modulus operator, for integers its the remainder, eg 5 % 3 == 2  Indexes start from 0.


Python BMESH: For loop breaking trying to split mesh via UV Islands

EDITED:

@batFINGER wrote a more robust solution to this issue, as can be seen in this answer.

ORIGINAL ANSWER:

Solved this by splitting the process into two parts: the first finds faces in each UV island, and the 2nd performs the actual split.
Also, you used the wrong operator (bpy.ops.uv.select_linked_pick) which was part of the original problem (should have used bpy.ops.uv.select_linked).

import bpy, bmesh
context = bpy.context

ob = context.object
me = ob.data
scene = context.scene

bpy.ops.object.mode_set(mode = 'EDIT')
bm = bmesh.from_edit_mesh(me)
bm.select_mode = {'FACE'}
faceGroups = []
#bm.faces.ensure_lookup_table()

bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')
save_sync = scene.tool_settings.use_uv_select_sync
scene.tool_settings.use_uv_select_sync = True
faces = set(bm.faces[:])
while faces:
    bpy.ops.mesh.select_all(action='DESELECT')
    face = faces.pop()
    face.select = True
    bpy.ops.uv.select_linked()
    selected_faces = {f for f in faces if f.select}
    selected_faces.add(face) # this or bm.faces above?
    faceGroups.append(selected_faces)
    faces -= selected_faces

scene.tool_settings.use_uv_select_sync = save_sync

for g in faceGroups:
    bpy.ops.mesh.select_all(action='DESELECT')
    for f in g:
        f.select = True
    bpy.ops.mesh.split()

ob.data.update()
bpy.ops.object.mode_set(mode='OBJECT')


how can i make a rig follow a shapekey deformation?

Not sure it's possible. Editing a rig in animation compromises the relation bone - weights. Mesh weights become wrong and the rig influences it's mesh in a wrong way.

What I've seen in such problematic, is to have two models, each with it's individual rig, and when one model morphs to take the shape of the second, they simply switch the visibility.


If you are using 2.79 you select the objects and hit U this will bring a menu for unlinking objects with options like object, data, animation, materials etc. If you are using 2.8 you can find under the menu "Object" in 3D view