text:
Can't properly UV unwrap a highly detailed model
) So I'm quite new to Blender and I'm lost. I have a 3D stl file with a lot of details (high amount of vertices). I want to UV unwrap it to paint it precisely on photoshop.
Now, I've tried a few methods for UV unwrapping and none of them work properly:
-smart UV unwrap: my model gets so deconstructed that I can't tell what I'm painting on (eyes, ears etc.)
-creating seams manually: I don't find a way to select multiple edges to form a line: I click on an edge, click shift and click on another edge but the selection just goes from one edge to another, it doesn't combine them, even though I'm on "extend existing selection" mode. So I can't select a line to then convert into a seam.
-creating UV maps with "project from view": I never manage to select al the faces I need. What I do for selecting the front of my character for example, is go to X ray mode, select all then go out of X ray mode, flip the model, and deselect the back with ctrl + click.
Despite that,there are holes in my UV map.
What would be the solution to unwrap such a detailed model? A big thank you in advance if you can help!

Do you plan to animate it? In Edit mode, select all (key A), then you can convert the tris to quads (Alt+J or F3, Tris to Quads), separate all loose parts to separate objects (key A, key P), and apply a Decimate modifier (in Object mode) with a few Un-Subdivisions to reduce the density of the meshes. The resulted topology might be ugly... - Or recreate it from scratch as Caroline Fangel suggested ;-)

https://blender.stackexchange.com/questions/81395/python-set-active-face-batch-unwrap-follow-active-quads

I would never even attempt to unwrap this kind of polycount. You also don't need this level of detail to get a smooth surface. I would recommend you remodel this with a much lower polycount.
Once this model has lower polycount, it will be much easier to unwrap. You can use Seams or automatic unwrap. You use Seams by selecting edges, go to edge menu and select "Mark Seam" - so next time you use the "unwrap" function, it will cut along your selected seams.

Hello @Caroline Fangel, thank you for your answer! Actually, someone else did the model for me, using Maya I think. So I don't have the skills to remodel this. Is there another way of reducing the polycount? Or just another precise way of painting this model?

@Rose try adding a decimate modifier, either collapse or un-subdivide options. If that doesn't work well try Remesh modifier (maybe sharp option, octree depth 3-4, scale 0.5+/-)

I agree that this model should be retopologized, but if you only need to unwrap and paint, you can select all faces of one area.

And then select all its boundary loop and mark it as seams.

just like Caroline, I'd recommend that you retopologize the model, it's really not that hard, but if you still wish to work with this model, I'd suggest you manually unwrap it.
What I'd suggest that you do, is click on one edge, hold Ctrl, click on another edge, what this does is, it selects the shortest path between them, then you could mark it as a seam
Yes, you'll have to do some parts manually, but hope this would help you speed up a bit...
If you're looking to reduce the polycount, you could try Decimate Modifier. It's really easy to do, but I don't know if you'll get the results that you're looking for


text:
Gather several 3D objects with textures into 1 blender file
I'm a beginner. I have several .blend models with textures, saved separately. I would like to gather them all in a new file, with their textures properly applied.
I thought this would be simple but when I export the models as .obj and import them into a new file, the texture doesn't come with the models. I tried packing the models with textures into a FBX file but same issue when I import: I can't see any texture.
I'm sure there is a simple solution, and I would really appreciate your help!

You mean that you want to use the models in a different application or just move the models to use in a different Machine with Blender?

I want to keep using Blender. But instead of having 5 different files with a model in each one, I want to create a composition with my 5 models in 1 blender file :-) @Emir

Why don't you use Ctrl+C, Ctrl+V?

@Emir yes that's perfect thanks! It was Append I was looking for :-)

you can simply import other blender files into a blender-project by using File - Link/Append.
Link lets you import other files without being able to change them. If you want to work on them, you have to go into the original file and do it there. It should update automatically in the file where you linked it.
This is very helpful in large projects where you need a good overview of all assets and versions of these assets.
Append imports the collection from other .blend files so that you can keep working on them. This is most likely what you rather want from how your question reads.
Hope this helps!
Cheers,
Till

Awesome, @tillomat thank you!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Beginner: struggle with PBR textures
I have downloaded a metal foil PBR tried to apply it to a model I created with node wrangler. As you can see in the screenshot, it appears different than the material preview.
I have added a HDRI, tried Eevee and Cycles, looks the same. The node set up looks correct. The material preview looks fine (see picture).
The texture I downloaded is this one: https://www.texturecan.com/details/25/
I must be missing very basic something but what? I encounter this issue with all the PBR textures I try.

Can you show us the UV Map of your object please? I think there could be an issue with the UV, depending on what you have mapped from the texture coordinate node

I just realised I hadn't UV unwrapped the object before applying the texture... So now I did and it works perfectly fine. Sorry for this and many thanks for your help @B.Pader

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Rigging this arm- How can I do it?

So basically I want to make this arm bend without deformation to the two main sections of the arm where the bones go through. To facilitate this I have two other areas (seen as triangles in the picture) which should expand or contract as the bone rotates round. Any help with this would be greatly appreciated.

could you show what it should give once bent? because bending is a deformation, so anyway you will have a deformation

Also, if you want your arm to have a particular shape once bent, you can use a shapekey with a driver so that the bone rotation controls the shapekey


text:
How can I translate & rotate an object to match a pair of xyz coordinates?
I'm trying to script the modeling of a set of 3D vectors. For a given vector, I have the start and end points in 3D space -- for example from 1,1,1 to 2,2,2. I'm not sure of the best way to approach this problem.
I'm imagining a cylinder with a cone on the end ("arrow") all grouped together that is located in some arbitrary location but with a unit length (e.g., 0,0,0 to 0,0,1). My inclination was parent the arrow to a bone and the translate the bone to the first position, followed by translation of the other end of the bone to the second position. Since the arrow is radially symmetric, rotation won't be an issue.
This solution seemed convoluted to me though (building an armature, etc.), since I have the endpoints where the geometry should go. It seems like there should be a way to translate the central node of the cylinder to point 1 and then translate/rotate the node at the tip of the cone to point 2.
I have read some of the other questions about orienting lights to normals (here, here, here), or rotating planes to be normal to a point, so I think the solution might be along those lines.

How do I construct a transformation matrix from 3 vertices? gives a generic technique to convert a triangle into a transformation matrix.  You could use this to pick a transform matrix to apply to a generic cylinder.
If you don't like the choice of X as the primary axis, you can rearrange the arguments to Matrix([a2,b2,c2]) , although some of those orderings will be left-handed instead of right-handed, requiring you to reverse one of them.  For example Matrix([b2,a2,-c2]).
Also, since your use case only includes 2 points, you'll need to pick a 3rd in order to construct the matrix.  If you know something about the direction of the pairs of coordinates and can guarantee a 3rd coordinate that will always be non-colinear, use that.  Otherwise, you'll have to add a little bit of logic that checks for things being "too colinear" and using a different 3rd axis.
If you want your cylinder to stretch with the distance between the points, you can use non-normalized a instead of a2.
If this narrative is a little too vague, go ahead and request some refinements in the comments.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What does the 'light path' node do?
I want to understand what the light path node does in blender. For example, here http://www.pasteall.org/blend/35401 I am doing a simple rendering of person. I used a point lamp as a light and the node associated to the lamp is mentioned below:

When I did not use the light path node, I obtained a scene like this (in render settings, I used limited global illumination in the light path)

When I used the light path like this:

I obtain this image which is more realistic.

The Light path node allows you to make shaders do different things based on where the incoming light ray was before. When thinking about where "before" is, keep in mind that cycles is a backwards path-tracer.
The Ray Depth output of the light path node gives the number of bounces the ray went through before hitting the lamp (or whatever is using the shader).
So when tracing backwards from the camera to the lamp, surfaces which are directly illuminated (1 bounce away) will hit a lamp with a corresponding strength of 1:

Surfaces illuminated by indirect lighting (2 or more bounces before hitting a light source) will "see" a correspondingly stronger light source:

To see it in action:

As to why it appears "more realistic", I think this really just an artifact of the lamp being way too bright in the first example (it looks fine when the strength in the light falloff node is then set to 1). In fact the setup with the ray depth is less technically realistic, as explained above.
Normally the light falloff node is plugged into the strength, not the color. Then with the default strength of 100 it looks just fine:

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Large Ocean Texture & Boat Wash Material with Dynamic Paint
I've been trying to simulate a very natural boat water wash in blender, using dynamic paint and wetmap. but it just doesn't look natural. i've been searching online. and i found similar cases for different application.
this is a sample photo done by aaOcean Suite http://www.amaanakram.com/plugins-shaders/aaocean-suite/

firstly, i want to get my ocean to look as close as possible to this. i'm using bump textures, since my ocean is too big to use the ocean modifier. and i'm using texture coordinates to animate it. and it look like this.

and this is my material node for the ocean.

i want to make sharper waves that matches my reference photos.
and i'm interested to know how to create that wash, using blender material. my current node setup is something like this:

and the result are something like

"my ocean is too big to use the ocean modifier" Are you sure? The ocean modifier has a "repeat" option and you can use the array modifier in addition to this. Cycles handles instanced meshes like this very efficiently. You can still reduce the quality of the ocean and use your noise-based material on top of it.

@piegames  that's exactly where ocean modifier shows its weakness, the repeat function means repeated textures and when you look from far it's very obvious where tiles are being repeated. i did try baking the ocean and mixing it with noise texture and other things but still I'm not very satisfied with the results.

First of all, a noise bump texture does not make for an ocean. You need waves, not noise. Either go for some online textures, or create your own one:

Generate a smaller mesh with the ocean modifier (as large as possible)
Bake normal and height to a plane
To render your ocean, apply both the normal map as well as the height to the plane using microdisplacements
You can even do this texture baking for the whole animation (I'd recommend you to do it in a separate blend file then)

For the boat, you first need to have realistic materials. Have a look at "physically based rendering" to get true photorealism (Blender Guru is your friend).

No more than your noise texture. You can still fake animation by blending in multiple displaced version + displacement or multiplying two displaced layers moving in different directions. Maybe I'll add a blend file if I find time.

@piegames microdisplacements  it's a fairly complicated process and it's more like a rabit hole to get the results you want. plus, when you look at it in a bigger picture, what microdisplacements and noise or other wave textures do are fairly similar. now it's just a matter of finding the best optimized way.
for now i ended up mixing 3 different colors together, noise, and Voronoi and Musgrave in different scales.

@Leander you could just animate Z layer, but i found animating X and Y  (but less than Z layer) makes it more realistic.


text:
How can I have presets for multiple render options?
I've been working on a huge scene and i'm using the quick render feature a lot. but i'm always stuck with one option to render with all the time if i want to change settings such as sampling,performance, light paths settings and i have to go and adjust these numbers manually.
i usually render my quick render with lower light paths number but when i want to get an actual render i have to go back to these numbers change them again and i always forget what were the initial numbers.
Is there anyway i can have multiple rendering options presets, let say one for testing, one for quick render one for production. so far the only value i know i can change is sampling for quick render and final render.
is there any addon for it , or is it hard to write addon myself?
one suggestion i got was to have multiple scene but if i change anything in one scene i have to copy it across and it's more time spending moving stuff around.

I just checked, and when I create a new scene and 'link objects' then I can switch between scenes and the position of my object is the same in both if I move it on one or the other. If I use 'Link Object Data' then the objects are there but they are only moved in the scene where I made the movement, and in original position in the other.Maybe choosing 'Link Objects' can let you share the objects and then make the settings locally for render different then.
An addon or script is not that hard to make yourself if you look at simple examples for making your own operator that acts as a macro to perform some action or change a setting. cgcookie intial python scrtipting and cgcookie setting up custom panel. These are only two examples of all kinds of stuff you can find on the internet, and depending on how you want to access your script you might even just keep it handy to call up and run when you want to from the text editor, or go so far as to make a custom addon panel for yourself.

Here's a script I wrote that should do the trick:
https://github.com/blendfx/blender/blob/master/render_tweaker.py
You can either store render settings settings manually, or enable slot recording (in image editor), which will store the current settings of each render in each render slot.
Here's a demo: https://www.youtube.com/watch?v=a3FI_n6vH64


text:
Is there a way to increase the cascade size in Eevee past 4096 pixels?
I was wondering if there was any way to increase the cascade texture size for sun lights in Eevee, I see no reason for why there shouldn't be, but blender limits you to a maximum of 4096 pixels

Hi :). There are some hard-coded limits to preserve good Eevee performance. Number of nodes, number of lights and indeed the cascade size. You can ask the developers why they chose this number ;)

Can you increase it by some other way in Blender - no. Even when I try setting it to something else via Python, Blender validates and rejects it. The value must be one of the included values. You could make your own Blender build with that new option, of course, but there's no guarantee it'll work.
As to why - no idea. I think in most cases, artists don't need a higher resolution. I don't know your use case or situation. I didn't see any discussions about it on developer.blender.org, but maybe you'll have more luck.


text:
Line art modifier looks different in render
I'm trying the new line art modifier and other than a few z-fighting issues it works great! Problem is when I render it looks horrid:
Viewport render:

Actual render in eevee:

I have no idea what could be causing this, I checked and there aren't any hidden objects that would be visible in the render but not in the viewport, either way I'll link the .blend here:
https://pasteall.org/blend/75af7acbee85431daea7987a7b17eaa3

That looks like it might be z-fighting.  Do you have "In Front" checked in the View Port display?  I don't know why that's what controls the setting in renders, but it does.

Whoops you posted a blend file and I didn't see, I'm a dork. I'll go ahead and check.

The artifacts in the render are the result of Z-fighting between the strokes and meshes and it's just by chance you see the whole strokes in the viewport and not in the render.  Z-fighting behavior is inconsistent.
To fix this, set the In Front setting under the Viewport Display heading of the Object Properties.

I don't know why this controls how the grease pencil strokes work in the render, but it does.  I've found that I always turn this on with the Line Art modifier, actually.  It seems like it's always needed if the objects are going to be visible at all, because otherwise you get z-fighting behavior.
After setting it in your blend file, I render your picture like this:


text:
Blender eevee lighting problem
New blender user! Just got into Daz3D again after years and I wanted to see how blender works with it. Blender is so organized with the materials! But I ran into a problem when I was lighting the model with Textures. I cant zoom in too close or else the camera casts a shadow on the model? Idk but it darkens the whole model. Only when I zoom out it fixes the lighting issue.[

Strange, but AFAIK the camera does not cast any shadow of any kind in blender. Something else must be going on - I'm guessing related to normals.

Are you using an alpha build?

Yes im using 2.81a

Have you set the Color Space of the Image Texture node that uses the normal image to Non Color?


text:
Importing from CAD - how to have correct normals?
Importing CAD models into Blender.  SolidWorks -> Rhino -> FBX -> Blender.  Works fine for rendering in Cycles.
But on export to .html, I get invisible patches in the model, due to the normals being flipped in that location.
Flip normals doesn't work.  Make normals consistent doesn't work.
Even Shift+G (select similar normal) and then flip those ones doesn't work.
Seems to be watertight.  How can we just make it point the normals away from the interior of the object?
Ref post 1
Ref post 2
Ref post 3

Updated Blend File Here:

(source: giantcowfilms.com)

There could be various reasons for that. The most possible would be that the model is too complex for Blender to decide what's "inside" and what's "outside". But then at least "select similar" should work. Consider uploading your file to http://blend-exchange.giantcowfilms.com/ for further inspections.

"Select Similar" didn't work because when selecting the surfaces near "Incorrect Normals" in the picture above, it also selected the ones marked "Correct Normals" since they're both pointing to the left.  So flipping those meant the correct ones were now incorrect.

That is some weird topology you have there. Apparently your "toolchain" changed everything to triangles. The worst part is that the profile faces are partly disconnected from the mesh. That's why Blender has difficulties to detect what's "inside" and "outside". What happens if you export from Solidworks to stl and import that directly into Blender? Also: Is this a one-time conversion or do you plan to do that more often?

Thanks for looking at this @metaphor_set.  I didn't like stl because importing stl into Blender gives very large object scale, and incorrect orientation wrt the axes.  .FBX is much nicer that way.
I do this very often.  Have many parts to do this way, planning to make this my new workflow going forward.

Have updated the .blend file.  Layer 1 is original broken mesh.  Layer 2 is a re-import of a "fresh FBX file."  Which appears to be mostly ok with normals.  Layer 3 is .stl import, you will have to zoom way out to see it.
I could just import a fresh FBX, except not really because my real models may have 10x this many parts, and will all be textured, and re-import would mean too much lost work.  Would prefer if I can to find way to fix the normals if/when this happens.  Sometimes have to alter the model slightly in Blender, maybe that's what ruined them.  Thanks


text:
Bge Python: Move objects along one axis using mouse movement
I don't have experience on python. I want move object and move something like this:

How to make it works like that ? I don't have much time to learn all python commands because i just want it simple. Thank you.

Simple script, need more work but its good start.
from bge import logic
logic.mouse.visible = True
def main(cont): #cont = currentController
    cont.owner.worldPosition.x = logic.mouse.position[0]**2 # owner likely the cube

just add a cube and in logic nodes add always sensor + python controller.

EDIT
"logic.mouse.visible = True" show the mouse when bge its runnig so you can see the mouse position on screen.
For clarify: my script name is "script.py" so im using python controller to run a module name main from my script ("def main()"), so every tick it run main().
You can avoid this setin python controller to run script and not module:

and the script should be like this:
    from bge import logic
    logic.mouse.visible = True
    def main(cont): #cont = currentController
        cont.owner.worldPosition.x = logic.mouse.position[0]**2 # owner likely the cube
    main()

OR just this:
from bge import logic
cube = logic.getCurrentController().owner
cube.worldPosition.x = logic.mouse.position[0]**2

so this script NEED MORE WORK, to get it work like you want you need to work on it, and dont need to learn a bunch of things.
And for the last tip. mouse position go from 0.0 to 1.0 and when mouse position its > 0.5 will go to the left of the screen (your right) and the other way if its < 0.5.
Finally if you show your work and not just and example without trying yourself to solve it, i cant help you anymore because the idea its to you learn something and not just copy.

why you need "logic.mouse.visible = True"? Why you need a function generic name? You can use script mode instead and get rid of that confusing construct.

Err…  doesn't work… I still confused, using python module instead script on that controller? I usually not use that, and also,
no mouse movement sensor ? Without that it might can't control the cube… or maybe I missing something ? Are you sure that is work ?

Okay. The third simple one works. Now Ive got what I want. I don't change anything but I just set the camera location though, removed double asterisk and change it to 5 instead of 2. Sorry then, I'm just afraid. Well, accepted.

** is the operator for "power of". It`s just a finetune. let say that ´mouse.position[0] = 0.2345  **´ 2 would be 0.05499025 and by ** 5 = 0,00070911102104215625 so the cube would move less. and removing ** and leaving the 5 will generate an error. but u can use mouse.postion without  **N


text:
Is there a way to Import old 3ds max files into blender
I have models from an old game called Trespasser that were made on 3ds max back around 1998, and I cant figure out how to see or use them in blender.  I can provide one as a sample if needed, but I would like to see these models, and use them if possible.
Thank you
I do not have 3ds max software, but I also did not realize they had a trial version, so I may do as suggested. I also did not see anything about this in the forum, so I do apologize about the duplicate question.
EDIT : I cannot install  3ds max 2015, for some reason, but assuming it has to do with me using Windows Vista Ultimate instead of 7 or 8. I am looking into other means.
Thank you for the help though, maybe I can figure it out now.

I am new to blender, and learning through all the tutorials I am finding across the internet.  I have gathered information for all kinds of applications to use for multiple reasons.

Welcome Bryan :) Unfortunatly it's not possible to import .max files directly. You have to export it. Best practice is to export them from 3ds max as .obj, because it's a human readable file format, See this answer: http://blender.stackexchange.com/questions/24020/importing-obj-with-mtl-and-image-not-working-properly/24024#24024 Anyway, enjoy the site!

click file, immport and then choose which format do you have. I don't know, what formats 3ds max uses but I'm sure you can export it as .stl or .obj


text:
I am unable to preview any game play in blender
I have a simple FPS setup, but pressing p to play will not do anything. Is there any information available for this kind of problem? I set as blender game, and it will not do anything but animations. The file came from blender artist thing.  if you can tell me how I can put the file here, so someone else can try it and see if there is something I am doing wrong.
I posted the link to the file I am having trouble with.  It is from 2006 apparently, so maybe it is from an older version of blender.  however if anyone can get it to work I learn much easier by seeing something in action than trying to follow fast talking tutorials on youtube.
As I am Aware now that this can be fixed using an older version, I think it should be amended to work in the current version, so myself and others are not frustrated learning to use blender.  I am not familiar yet enough to fix it, but I think it might be looked at as a tutorial file.

If the file is already hosted on blender artists, then all that's needed is the link to the BA post. If not, you could upload it via blend exchange or pasteall.

http://blenderartists.org/forum/search.php?searchid=2955782   this is the link to the file.. I am using the top link on that page of files.

@Bryan That link goes to some search results.. Assuming you mean the top result, then it looks like a pretty old file, most likely for 2.4x. Not sure I have the right post though, as the download link in the top post goes to a 404.

@Bryan Never mind, I found the right link. It is a 2.4x file, however the engine is set to Blender Internal. Recently it was made so the game engine can only be started while in Blender Game, so change the drop down where it says "Blender Render" (at the top of the screen) to Blender Game. Then press P. The game engine starts, however none of the python will work as the API was changed between 2.4 and 2.7. If you like, you can find blender 2.49b here, which runs it as expected.

So is there a way to correct the problems in the current version?  say going back through python and readjusting the code for the current version?  This looked like a great starter to learn to program FPS games in blender and others may be able to use it as well.

The engine is set to Blender internal. As of 2.73 P only starts the game engine when the render engine is set to Blender Game at the top of the screen:

Also note that that file was made in 2.4x. The 2.4x python api is not compatible with the 2.5x+ api, so the python scripts won't work. If you want to run that file, you can download 2.49b here.


text:
Solidify thickness problems
I have an outfit that I am trying to give thickness with solidify. There are 3 related problems I am running into:
1) Solidify size can be controlled by a vertex group, but if set to 0, it still makes the new layer of faces, just with no distance between them and the old. I need different amounts of thickness in different areas, and in some places, I need no thickness. In crumpled areas with very small or no thickness, the back faces of the new layer clip through.

2) I have a huge amount of unnecessary double verts in areas that don't need thickness.
3) In acute areas, the solidify makes split edges.

I cannot change any vertices, or split the object. This outfit is being imported from Marvelous Designer, and has associated .mdd animation caches that will break if anything is altered. I am using the Mesh Cache modifier to load them, so anything I do needs to be after the modifier. Importing the .mdd directly onto the mesh as shapekeys would allow more options, but that isn't viable as I need to be able to bring in different animations without it breaking. I can make changes to it in MD.
I see from looking around google that problem 1 is supposedly solved by making the material backfaces transparent. But that doesn't seem to work?

I have also found that triangulating the mesh (currently quads) solves 1, but is that the only way? If there is a way to access the verts created by solidify in a certain area, then they could be hidden, which would also solve 2.
It seems that 2 could be solved by something like a remove doubles modifier (which I see has been proposed in the past, but was rejected), and if that was done, then I wouldn't need to triangulate the mesh.
I have also tried using a deform cage based on an unaltered version of the outfit to control an altered version and so avoid the whole issue, but the results are inaccurate.

Try to use weight paint to control the thickness.

It turns out the problem was simply Fresnel's strange behavior on backfaces. Since Fresnel is dependent on facing, back faces become very reflective. If you invert the fresnel on backfaces, then everything works fine. See here for how to do that: backfaces give strange results with fresnel node in cycles.


text:
Can I make & Export an animated FBX mesh WITHOUT a skeleton / armature?
I'm trying to model stylistic plants & trees, and i've made some simple animations to move them.
I've used modifiers and shape keys to achieve my desired effect.
Unfortunately, when exporting the FBX into Unreal Engine, the animation does not transfer correctly, even though it appears correct in the Blender timeline.
I have tried exporting as .MDD and importing again, which applies the motions as individual keyframes, but this does not play when importing into Unreal Engine. It seems that Unreal Engine requires a skeleton when displaying an animated mesh.
Does anyone have any advice for exporting an animated mesh with NO skeleton into a game engine?

you cant export animation without skeleton, you can use Mr Mannequins Tools plugin for blender if animation is not correct


text:
Workspace custom property doesn't work as driver's variable
I've tried to use a workspace's Custom Property as a variable for a Driver, but it looks like the path to the Custom Property is broken. Is there anything that needs to be added to the properties path?

This is likely by design.
I don't think you can't drive scene level data from UI or Preferences level parameters, it creates a lot of unanswerable questions.
What happens when two workspaces are opened at the same time? Will the same scene display differently on windows with different Workspaces? What happens at render time where there are no workspaces? What about headless rendering?

Define the prop.
In as much as I agree with @DRF that using workspace properties as input into drivers is not a good idea...
Appears it is with custom properties, ie those defined via custom props panel or via script with
context.workspace["prop"] = 44.55

on the workspace that create the error.  Trying instead the  users property of the workspace it "works" (ie doesn't throw the error) as a driver variable.
If in script a property is defined via
bpy.types.WorkSpace.prop = bpy.props.FloatProperty()

in which case can address it via
context.workspace.prop

it will also work as a driver variable.
Since prop is stored as the custom property of same name will see the API defined message beside it.
Note: as mentioned this "works" as in it doesn't throw an error.  It does however print warnings to the system console, and updating by pressing "Update dependencies" button.
Unhandled ID WSGeneral
add_relation(RNA Target -> Driver) - Could not find op_from (RnaPathKey(id: WSGeneral, prop: 'prop'))
add_relation(RNA Target -> Driver) - Failed, but op_to (OperationKey(type: PARAMETERS, component name: '', operation code: DRIVER, 'location')) was ok

Aaah nice one! Nothing like a good old Python hack batFinger style :)

I'll have to take a third and a fourth look at this. I'm not into scripting so I'm not sure on how to tackle your response.


text:
How to apply armature/rig transformation to the mesh/shape key?
So I added a jaw bone thinking it would help me to model/give some consistency to Key 3 Visemes/shape keys but now I don't know how to proceed from here:

Hi. Instead of adding 'Solved' to the title, you can 'accept' an existing answer (even your own) and this will mark it as solved. See: https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work

Im aware of that, its just that there is 2 days... timeout before one can accept their own answer.

Never mind...

Just after applying it, it will disappear, but no worries, All vertex groups are still there, just Add_Modifier.Deform.Armature And set Armature as the "Object"


text:
How to change an object's material or texture with python script in blender game and for it to be visible?
I have tried this with the materials:

import bpy

D = bpy.data

D.objects['Cube'].material_slots[0].material = D.materials['Material.001']

# material slot 0 is a material that is applied to the object.

But the effect is only visible "out of the game"

bpy is the main blender module, it is not available inside the game engine where you should start your scripts with import bge. In the game engine you use different data structures than the main part of blender. I don't think the bge let's you easily change materials, this page makes it sound like you need to loop over every poly to change the material.
There is a simple way to achieve what you want, using logic bricks to swap mesh objects. First step is to check you have the material linked to the data not the object, data is the default setting so may already be set.

Then duplicating the object and giving the second one the other material. Then you can use an Edit Object actuator to swap meshes.

import bpy
#For use with blender game before start.

print("running OPACITY_REDUCE.PY")
CurrentMaterialName = '666001'
mat = bpy.data.materials.get(CurrentMaterialName)
mat.use_transparency = True
bpy.context.object.show_transparent = True
mat.transparency_method = 'Z_TRANSPARENCY'
print("reducing alpha setting.")
bpy.data.materials[CurrentMaterialName].alpha -= 0.1

the script is done in bpy and won't work in the game engine, however you can use this to reduce the transparency, and bake it then use logic bricks as an action to use it in the game engine. Unfortunately I do not believe there is a way to use the bge module to reduce transparency, I have yet to find a way to do this in Blenders game engine but I'd look into this guys code for changing the texture; https://github.com/Kiva-Entertainment/yohk/blob/master/script/dynamicMaterial.py


text:
Can't move any objects in my scene
I was modeling an object thanks to three cubes and then I made a flower with its respective "accessories", the thing is that maybe I pressed something that I don't know, because now all my objects on the scene have an orange outline and I can't move them.
If I press A two times I'm able to move everything on the layer.
Also, if I unselect the objects, then I can't move anything with right click.

Could you upload the .blend file?

Could imagine you've created a new scene, because the outliner is empty: https://i.sstatic.net/z62u4.png Try to switch back to the old one.

Having the same issue, (2.82) cannot move selected objects. My outliner is not empty and reflects that specific items are selected, however they will not move or be resized or acted upon in any way. This happened after I selected and separated a curve object from other grouped curve objects.


text:
How can i make my material more prominent?
i'm trying to make a scene based in a spacecraft and a planet, but as you can see, some parts of the spacecraft seems really dark, and they appear in the render almost as if they dont exist.
How can i make them more prominent, or give them maybe more lighting? But at the same time without interfering with the background planet? maybe with two different layers and a new point based light? or self-illumination, if that's the case how can i do that on Cycles? Is it possible to make it appear, with a good reflection based on the background too?

Reference

For fairer and easier comparison please include your rendered spacecraft image the same size as the NASA image.  The position of planets and spacecraft should be similar.

I can't really do that, the reference it's only due to the somehow 'brightnes' of the spacecraft, ignoring the background, i'm not actually trying to do a true realistic image, but i do not want to see the model being too dark that almost shows itself like a shadow.

Consider reflective glossy surfaces as dominates the NASA spacecraft.  Which is making me hungry for Jiffy Pop.
Viewer visible light fixtures are an option.  Viewer means the person seeing your image. You must judge the technical and artistic merit.
Viewer invisible lights are an option.  Plane with EMISSION material.  Diffuse materials are to complement. Specular at your own risk. Consider parenting the light plane to the spacecraft.  To make them invisible to the user set the object option ... Visibility Panel ...  [Camera] to unchecked false.
Consider scaling the diffuse component.
Consider light groups for Blender Render.

I think the Emission material helps here, but as a direct material on the material's object, but actually maybe if i parent the light plane to the spacecraft it will work better. I'll try this option, thanks.


text:
Will Warp bridge these two objects?
I've read documentation and StackExchange for two days or more and installed 2.74, but I'm still lost.  I watched one Warp tutorial which appeared to do what I wanted, which is to create a bridge between the two objects, but I couldn't duplicate the result.  I got some modification between the end points, but no fill.
The objects which I'm working with present matching planes, but if one were scaled, that would be my next question.  Also, the "curve" option of warp seems to be what I need, but there should also be some rotation to get a smooth transition between the two objects.
https://www.dropbox.com/s/x44ua54ac1pvfnm/warp.blend?dl=0
Thanks for any help.
The 90 degree question and bending pipe didn't answer my question.  @cegaton suggested the following as a possible solution.  This may be the answer, but it may also be beyond my life expectancy to implement.
A problem with Blender's Bridge Edge Loops system
What a comprehensive user friendly program.
The succinct statement of my problem may be: join two faces whose normals don't with a projection of a user shape.
Can curve, bend or warp do that?  I haven't been able to do that, and, from Allen's post, doubt that they can.

Do you want to connect those 2 parts together? Your question is not very clear

Yes, I want to connect the two parts together.  Isn't that descriptive of bridge?

Warp was a bit confusing. You can use bridge edgeloops but you will need even amount of edges.

Where do you find this stuff?  Seriously, is it documented, or something you know by studying the Python code, or reading every StackExchange post?  I use Blender for revisions of STL files, but have not needed to know much about generating shapes and structures beyond the primitives.  If you can provide details, it would be appreciated.

blender manual: https://www.blender.org/manual/

Check this answer: http://blender.stackexchange.com/questions/21761/what-is-the-fastest-way-to-create-a-90%C2%B0-joint

That looks like it should work.  The devil is in my following all of the nuances, whether it's a tutorial or the manual.  Thanks.

By the way, there is a warp tool, but it doesn't do what it sounds like you want to do. Are you looking for the bridge tool?

I've worn out bridge, curve and warp since I posted this. I believe @cegaton comment contains all of the elements of my question.  Now I can spend a few days figuring out add-ons and perhaps even Python ... to find out if this will .solve my problem.

See this question for installing addons. bridge sounds like exactly what you want.. Is it possible you could upload some screenshots or a .blend showing what your setup is and what happens when you try and use bridge?

This comment from cegaton's reference above:"If two surfaces in Blender are not on the same plane, the mesh folds on itself. No amount of cuts or twisting or even angling the faces toward each other (as some tutorials say) save the day. Additionally, I have very little option in the way of tweaking the bridge's shape afterward."  Just another feature?  I'm going to work on the info contained in Q28190 today...

I think the TubeTool is the way to go for this question, not warp..not spin..not bridge..

In blender there are two Warps.
Warp Tool
The Warp tool pulls selected vertices towards the 3d-cursor. thats it.
Warp Modifier
The Warp modifier, doesn't appear to do what you'd like it to. It will warp in a straight line from A to B.

Tube Tool (can ..sortof)
TubeTool comes closer. Here a a description ( https://blender.stackexchange.com/a/28193/47 ) and here the link to the GitHub repository. Feedback welcome.

TubeTool labours under the assumption (currently) that the selected faces are part of one object. At present that means maybe duplicating them, separating selection and then joining them together into one object. The faint blue line emanating from the faces shows their normal, tube tool allows you to flip the perceived normal by providing an option to specify direction (negative or positive).
This will at the very least give you a nice curve between the two faces, from that point you can select a Bevel Object or reduce the amount of subdivisions in the default bevel circle. The upside to attaching a Bevel Object once the curve is created is that you can adjust the geometry of the Bevel Object to match the two faces.
TubeTool isn't very sophisticated yet, but it could be worth checking anyway - and I'm open to suggestions.


text:
Repairing torn or corrupted meshes
The problems which I'm facing are too often very similar to what is described in this post by Hyder Hasnain: Mesh and shrinkwrap
Pasting together parts from different models, some of which contain complex shapes not obviously related to primitives.  I've looked several times at the solidify, skin, and shrinkwrap modifiers and can't see how they can solve the problem.
Trying to use them on damaged meshes just asks them to assume too much.  However, conceptually they might work if applied to small segments of the mesh rather than asking them to work on the entire object.
Can any of the three techniques (Shrinkwrap modifier, Convert to Convex Hull tool, Point Cloud Skinner addon) be used as a tool in edit mode on a section of the mesh? In other words, a sort of intermediate step between editing the vertices and edges and applying a modifier to the entire object?

Some screenshots of what you're working on would be helpful.

See the referenced post.  I believe it has examples of all of the problems.  The main difference is that I'm working with parts which aren't obviously related to primitives, so starting from scratch isn't an obvious option.


text:
UV Mapping (Unwrapping for Image Textures)
I've done the UV Mapping (Unwrapping for Image Textures) tutorial and I've managed to successfully fill my cube with a layout.
However, my solid is a prism and I'm struggling to do the same with it.
What I did was to fill the dimensions in the transform menu x=1, y=2,4, z=3,51 and then do same steps, but my layout still keeps as cube.

Can someone help please?

Have you scaled it in object mode? In that case, go to Object mode and ctrl A > Apply Scale, then unwrap again

@PedroGordalina when that answer solves your question, it's a custom on Stack Exchange to accept it, giving you some bonus reputation as well.

Go to Object mode and ctrl A > Apply Scale, then unwrap again


text:
Blender Viewport FPS Drops (Animation Playback) on New Laptop
I'll be quick here. Recently I bought a new machine with much better specs than my 8 year old Laptop, however the problem I am facing is that when I Animate inside Blender, initially I get blazing fast playback speed and over 30 Fps but overtime fps start to drop the more I work on it, also making animating character difficult. I then close blender, and when I restart, things get back to normal with good speed. This is the only hack I found, shutting down and restarting blender after sometime (Painful yes). This wasn't happening on my old machine. Help would be appreciated, thanks!
My Specs of Laptop:
Processor: Core i5 11th Gen Processor
I-GPU: Intel Iris XE (Latest Driver)
RAM: 16 GB at 3200 MHz
Hard Drive: 1TB
SSD: 256 nVme m.2

Loss of GPU performance over time can often be due to the GPU throttling it's clock back because it is getting too hot.  If you have windows something like gpu-z can be used to see the clock rate of the gpu and the temperature.  If it's that, the temp will go up over repeated runs and the clock will slow down.

@brockmann Temperature should be fine, as this is a new machine and how much load can a single character put on the System? So, i don't think so. Secondly, as i mentioned, this didn't happen in my Old Laptop. I am also using a Video Reference inside blender, that slows down as well.

@MartyFouts This didn't happen in my old Laptop man, and this is just a single character and video reference. Yes I have GPU-Z, but i don't think it is that.

@Kam_Bautista the odds are 45/45 it's a driver bug that's causing memory leaks so the restart recovers the memory or the Iris driver is more aggressive about thermal throttling than older drivers so you're seeing unexpected throttling.  Doesn't cost anything to use GPU-Z either way

@MartyFouts Sure I'll use GPU-Z. Machine is way faster than the previous Laptop, and definitely it is New Technology. New Intel Processors / Chip are pretty energy efficient. I tried all Iris drivers, same issue but anyways. I have seen Other posts regarding FPS drops as well on new machines, I think one was even using 1080 GTX, with slow playback.

@MartyFouts Intel Uses it's Turbo Boost Technology, to increase performance if an app requires. Though it is Safe, but I wonder if that technology is coming into play. Temperature of CPU, really go up to 90 degree quickly when required, but also cools down quickly when not rendering in any app. Cheers!

@MartyFouts So my observation is, now that i have tested a few things, CPU is throttling, not GPU, so after a while, rig gets slow. Turbo Boost technology is on by Default, is it safe to disable it Marty? Thanks.


text:
Animating Opacity
I'm building a project in which I want to have semi transparent objects for AR. As per screenshot, my floating screen object is semi transparent and also, there is a fade in animation.
If I render my project, image is semi transparent and in Blender, animation runs correctly. But after I export my model/animations as a glTF and import them in Reality Converter to create an USDZ file, which I import in Xcode for AR, there is no transparency. The object is completely opaque, as on the second screenshot.
How can I export objects with different opacity values?

Manual shows how to setup material so it exports with transparency. glTF doesn't support animation of material properties like alpha.

Thank you, I was reading the docs, I skipped that one. I'm guessing it might also be very expensive for mobile devices to render semi-transparent object in real time.


text:
Procedural tile texture with different column width and tile lengths
I'm quite new to textures in Blender and still trying to understand how to create procedural textures using nodes. I'd like to create an approximation of these tiles. There are three column widths, a small, medium, and high, and multiple varying tile lengths.

I've found Erindale on Youtube, who does amazing things, including some demonstrations with tiles. However, his stuff is way too advanced and I can't translate some of it across to my own texture.
I've tried separating the x axis and then using several modulo nodes to get three column widths, and this partially works.

However, this approach produces a repeating pattern of column widths of wide, medium, narrow, but the real tile floor does not follow the same consistent pattern. I've also tried using a Voronoi noise pattern, and this produces more randomness in the pattern. It isn't exactly right, but I'm satisfied with the effect and can get it closer using the noise settings.

I'm now trying to work out how to do the lines across to achieve the tile lengths. If I use the modulo columns as a base on the X axis, I can almost then apply a snap and less than on the axis to get alternating rows and then shift the y axis lines depending on whether they are on a 1 or 0. However, this still isn't right as I don't shift every other column, but each third one. And I can't work out how I would do it with the Voronoi texture, as I don't know how to calculate every other column.
I think I can work out the way to apply colours to the tiles once I've separated them out.
Does someone know a good way to do this, or a good source of information for a beginner on this topic?

@Robin Betts: where are you? Are you sleeping? :D


text:
GPU render with multiple cards: Does card order matter?
I recently added a new card to my system. I am running a Titan X and 770. When testing my render speed, I found that, for the same scene and same samples, the 770 took 1:53 to render it, and the Titan took 1:20. However, with both working together, it took 1:16...only a 4 second improvement over the Titan alone.
I know that you don't get the full power of the second card, but this seems a little extreme. In Blender's options where I select the compute device, it lists 770+Titan, with the 770 first (The titan is in the primary motherboard slot and runs 1 of the 3 displays.) Does this mean it's primarying the 770 and then not making full use of the Titan? How do I fix this?
EDIT: When watching my GPU monitor, I can see the 770 being used, but the Titan rarely shows activity above a couple %. It seems like the 770 is getting all the tiles or something. What's with that?
EDIT 2: When testing viewport rendering, things actually slow down when using both cards vs using just the Titan.

@cegaton I've tried a variety of tile size, from x128 to x1024 using Autotilesize addon. While they change render speed slightly, it doesn't make a huge difference. x512 seems to be optimal for both cards from testing them on their own. My primary screen is on the titan, both secondary screens on the 770. The 770 has 4gigs VRAM, the titan has 12.

I am aware of both of these issues. If rendering a scene larger than 4gb I would certainly disable the 770. But neither of those factors have to do with render speed, which is what the question is about. It seems that when rendering with both cards, the 770 is doing a lot, and the titan is hardly being used. I used to run the 770 and a 580, and both got used when rendering, with their combined speed being ~50% faster than either alone (580 and 770 give basically the same performance for speed.) So why is the Titan hardly getting used, and how to I make it prioritize it?

It's hard to say what is wrong with your setup. Just the fact Titan takes 1:20 and much cheaper 770 takes 1:53 seems wrong (also are we talking about bmw benchmark scene?). On developer.blender.org there were couple problems and bugs with Titan drivers before, you might want to check that if that's resolved. If your cards are not in SLI and one of them is below 99% while rendering your best bet is to file a report and contact devs.

I haven't tried the proper benchmarking scene. I will do that and pursue other possible issues now that this one is ruled out.

About viewport rendering, I created an add-on to somewhat adress this. It let's you choose a gpu for viewport rendering and independently of that, all your gpus for final rendering, so you don't have to keep going back and forth changing setting. Check it out here:
https://youtu.be/rIddu96tDYE
Get it here:
https://gumroad.com/l/Ocwql

So I just tested this:
No, card order does not make a difference. Doesn't really matter which one is set as system (if the system is doing nothing) or to which the monitors are plugged. The render times were off by fractions of a second (BMW benchmark scene with 2 cars).
Both my cards are in PCI Express 3.0 at x16 slots.


text:
FS Distance from Camera settings to maintain constant line thickness
I am using Freestyle with the Distance from Camera thickness modifier. I am trying to figure out the proper distance settings/curve to keep the thickness of a line constant in relation to the geometry it is on. For example, if the line is a marked edge representing a seam on a piece of clothing, I want it to always be 5mm thick in relation to that garment regardless of camera distance.
I want these settings to work out to long ranges where the line would eventually vanish, and I'm trying to avoid just eyeballing it.

You need to play with the "Distance from Camera" modifier for thickness not geometry. Freestyle/blender is pixel based so is up to you to establish the relation between pixel and real mm

Sorry, that was a mis-type. I meant the thickness modifier.

to visualize the correct amount to put as values enable limit in the camera panel and play with the "end" value to figure out the min and the max

Freestyle edge thickness is by default camera distance indipendent. So you would like to make modifier affect only some objects and not other? First tought would be to use different freestyle line sets. What exactly you would like to relate the parameter with? Could you add more information about the "relation to the geometry is on" part of the question?

Short Answer: Not really possible right now.
Long Answer: There may be a workround.
First, Let's see what Range Min, Range Max, Value Min and Value Max mean:

As you can see, Range Min and Range Max actually indicate the distance between camera object and the nearest/fartherest point on the mesh bound. The Fill Range by Selection button can calculate those two values based on selected object. Value Min and Value Max are both thickness values in pixel.
However, these four parameters won't dynamically change with the relative distance between camera and extreme points on object. You have to drive them with that distance value:

Before (no driver):  After (with drivers):
NOTE: The method above can be very limited because the distances to nearest and fartherest point can be different, which makes the expression less accurate. Anyway, assuming this is what you are going to make.

Interesting, I hadn't considered a driver. Why doesn't it work to set a large max distance with a curve? I'm not sure drivers will be a practical solution when dealing with a whole scene with many objects.

Not possible right now I'm afraid, sorry dude. Bacause modifiers are global, instead of per object or per line set. You have to turn to other solutions. I bet @T.K. holds the key to it. :)

Ah, well, I guess I've got something new to bother TK about >_< Thanks. This driver solution will help with some things.

Haha, I also agree that it can be a nice feature to have if possible, so he might deserve a bother. XD

Hi guys!  A simpler solution would be just to insert keyframes to the Range Min/Max and Thickness Min/Max properties and edit the curves in the Graph Editor.  Still this solution requires a line style per object, which could be tedious to set up when you have a large scene with many objects.  I guess there could be a better solution, possibly implemented as a new thickness modifier, to take account of the apparent size of an object after the perspective/orthographic projection according to the camera settings.

Use different Freestyle Line Sets
As by default the thickness is by default camera distance indipendent, I would suggest to group your objects whose freestyle line thickness should not be affected by the modifier you mentioned and asssign to that group a custom thickness value, without modifiers, by taking advantage of the line set Selection by masks (Group in this case).
In the following example, the grey cubes (they all have the same size) are in the line set with the modifier, while the red parallelograms are in another without modifiers.

With setup like this, you should be able to adjust the screen size indipendently.

Obivusly the choiche of the masking method (using object's groups in this example) for distinguish the line sets strictly depend on your specific scene/project setup, so just take mine as an example.

Try changing the camera settings from perspective to orthographic and play with the orthographic scale to zoom in or out.
This way, objects always maintain the same size regardless of the camera distance.

This does technically work, but it's no good if you are trying to use a regular lens. Orthographic lens flattens everything.


text:
Access texture that has been altered through texture nodes
I have created a texture brush (not a cycles one) and then transformed it in various ways by going into the texture node editor and using nodes. My node tree consists of a cloud texture from the textures node menu, then several mixes and changes, and then ends with an output node.
I want to use this modified texture in the compositor. However, when I use a texture input node and select the texture I made, I only get the default clouds, and none of the changes made by my other nodes.
How do I get the full results from the texture nodes?
EDIT: Well I opened the file again this morning and now it's all working properly. I have no clue why it wasn't before. So guess this question should be deleted?

Could you post your Compositor and Texture brush's node setups?

Well I opened the file again this morning and now it's all working properly. I have no clue why it wasn't before. So guess this question should be deleted?

@Drudge no need to delete your question. It may help others in the future that do not know how to use texture nodes.

Working with Node Editor, you are actually creating a new texture.
Check whether the texture name in the ToolShelf corresponds to the texture block.

If you have a brush texture as in the image below:

You'll just have to recall the same texture in the compositor with the texture node.

There are no issue with both Blender Render and Cycles even with more complex node trees.


text:
Planar decimate style in Cycles Shader?

The image shows the same model with a level of subsurf, and with a 15deg planar decimate. The shaders are grey toon diffuse and gloss mixed with Fresnel.
I want to get the sort of look you get by using planar decimate on a model without directly decimating the model. The goal is to get planar shading, but without breaking up the silhouette of the model the way that decimating it will.
Ideally, I would have the regular version of the mesh, and then transfer normals from a decimated version of the mesh via the Data Transfer Modifier. However, this causes blender to crash if the mesh has any complexity, such as for this character, and can have other problems. So I am looking for other options.
Is there any way to use a material to get a more planar look? A baked normalmap may work, but would contribute to VRAM issues.

I don't really understand what you mean. Could you post some screenshots?

Could you be looking for the Edge Split modifier? It will give you flat shaded areas without altering the geometry. You could also use the "Auto Smooth" option in the *Properties Window > Object Data > Normals > (mesh objects only)

Picture added, sorry folks. And @DuaneDibbley baking normal maps should work, and I'll accept that as an answer if we can't find another option. But I'm hoping to avoid it due to VRAM consumption of textures. (Also your name is the best.)

As a side note, the model I used above is from ManuelLab addon. It's just the default male.

authors: Игнат Егоров


text:
Render_pre handler should run operator with transfrom_apply
I wanna apply the rotation of an object, each time a certian case is true. The problem is, this has to work while an animation renders. So bevore it render the frame x, it checks if the case is true and if it is, then it applys the rotation of the object. I use this in my Rubik's cube rig. The apply_transfrom doesn't work in this case.
Here is the testing .blend:
https://www.dropbox.com/s/hz8nxx87b3wucx4/untitled.blend?dl=0
Open the .blend, run the two script, and press F12. The goal is that the rotation is applied on all cubes.
Update: I found the solution myself. I use this script here: Apply mesh transformations to primitive_uv_sphere_add()

First see this and compare it with your code:
import bpy
from mathutils import Vector

# call this only once
# it adds vector attribute to all Object entities
bpy.types.Object.vector = bpy.props.FloatVectorProperty()

# design your callback function like this
def test(scenes):
    # select the group
    bpy.ops.object.select_all(action='DESELECT')
    for obj in bpy.data.groups['Würfel'].objects:
        obj.select = True

    # apply rotation
    bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)

    # store the locations
    for obj in bpy.data.groups['Würfel'].objects:
        loc = obj.location
        obj.vector = Vector((round(loc[0], 0), round(loc[1], 0), round(loc[2], 0)))

If you do a test call with test(bpy.context.scene) it should execute without errors.
If you do bpy.app.handlers.frame_change_pre.append(test) it will work fine on every frame change.
When the objects go into render pipeline the transformations are already 'set/converted' so there is really no data to transform in the pre_render handler.

I did the setup like you said and it kind of works. When I first run the script the objects get selected and the rotation gets applied. The problem is when I try to run the script via 'frame_change' it gives me the problem shown in the picture. I think I have done something wrong. Also I think I didn't explain my problem well enough. I want this script to run while an animation renders. So when a specific case is true, it applies the rotation to all objects in the group before the frame of the animation gets rendered. http://www.pasteall.org/pic/82041

You need to add the frame_change handler function without parameters - like bpy.app.handlers.frame_change_pre.append(test) not like bpy.app.handlers.frame_change_pre.append(test(bpy.context.scene)). Fix this and it should work without problems

Yes it works with frame_change_pre in the viewport, but as son as I try to run it with render_pre while rendering it doesn't work.(I think I didn't explan to well what I want, Sorry) But that's what I wanna have: The think is that I try to make a rubik's cube rig with python. If one segment is rotated 90° the rotation get's applied. In the viewport this work fine, but now I need a way to do this while rendering an animation. There I can't use the transfrom_apply. So before each frame is rendered, it checks if the rotation == 90° and if it does it applies the rotation.

@3Descape Please edit your question instead of explaining your idea in the comment section so the question is useful for the community.

@3Descape Just use the frame_change_pre, it will work on render animation too because before such render the frame needs to change. Problem is only the first frame so start at frame 0 (or -1 if the animation starts on 0) so there is the frame_change.

@Jerryno I'm sorry, but it just doesn't apply the rotation here. Maybe I'm doing something wrong, but honestly I don't think so. If it works on your .blend maybe you could sent it.


text:
How to center a cylinder on an existing hole in a mesh?
Given a project with many mesh objects which have the wrong size mounting holes, I've created a bored cylinder with the correct bore diameter, which I intend to boolean union in the existing holes.  However, I'm missing how to center the new piece on the existing holes.  There is a nice explanation [align two objects][1]][1] for centering objects, but I don't see how to modify the explanation to my problem.
Is there an easy way to align two objects on a specific axis?

It looks like your first image dissapeared somewhere so there's no information about what explanation was there about. As to your question - would you like to position unattached cylinder to the surface ? Or how to attach it properly ?

Rellinked the explanation.   The unattached cylinder needs to be centered and located in the mounting hole (left or right) and then a boolean difference to change the size of the mounting hole.

In Edit Mode select the hole's rim with Alt+RMB and press Shift+S-->Cursor to Selected. Then in Object Mode select the cylinder and press Shift+S-->Selection to Cursor (Offset).


text:
Adapting Fisheye camera from Blender Cycles to Blender Render?
I made a Fisheye Camera in Blender Cycles but now I need to change the whole scene to Blender Render. I have already converted the textures and material nodes so that's not a problem, the problem is that the camera I made is a fisheye camera. This is the actual setup I made for it:

In Cycles, the camera works perfectly but in Blender Render the settings just dissapear and the camera deformation for Fisheye doesn't work anymore.
I remember that keeping the camera parameters was possible but I don't remember how...
How can I convert my camera from Blender Cycles to Blender Render without losing the already made setup?

Can i import it somehow to my actual Blender file withoyt any problem?


text:
How can I apply a modifier to a multi-user data object?
I made a scene with a lot of instance objects (Alt+D) and when I press 'Apply' to the  Displace modifier, it doesn't let me.
Is there any way to make it work? Or make the animation of the Displace modifier be still?
I was thinking on copying one, keep the parameter, then deleting the modifier on the instances and then link the instanced object modifier but...it still doesn't work.
Or maybe an option to make the objects as separate in order to apply the modifier?
I need to apply it because it's animated, and I need it still.

You can create a plain duplicate using ShiftD (instead of a Linked Duplicate).
Then apply the modifier on the duplicate. Now this unique mesh data will have the modifier applied to it.
After that, for any object that you want to use the modified mesh, just go to the Mesh Context and select it from the drop-down list.

In this example 'Cube.001' is the mesh with the modifier applied.

What i did for now as a temporal solution was to unlink the elements using the Plugin 3D view: Copy Attributes Menu and it works, still the problem here is that i can't apply the modifier to an already made object, because it's even already animated and i didn't choose to add this modifier before i was almost finished with the scene.


text:
How can I properly form text from particles?
I'm using cycles and particles that form text. I've got every letter separated, and while the particles form the shape, it doesn't properly 'fit' the shape or cover all of the surface of the object, so it doesn't work properly for me.
I've already tried making another particle system on the same object, with more particles, but it looks weird...is there any solution to this?
Thanks in regard, I'll be waiting for a response.

What are your settings? Even better upload the .blend to http://pasteall.org/blend/

I tried already emit from volume but i think that still looks weird...or maybe too fast.
Right now my .Blend file is being uploaded :)

Unfortunately i was not able to upload the .Blend file, but i was able to put it here:

https://www.dropbox.com/s/p2gmrovlwh654tp/blend_file.blend?dl=0

I had to upload it on Dropbox, sorry about that, i hope it works now :/

Every letter have a particle system, at least all of the second blocks of layers, the other layer are for other scene/purpose, so i'm just using those to make the particles.

To change the shape of an object using particles, use the physics type Keyed.

Create an emitting object, cube or whatever.
Create a text object, convert it to mesh Alt-C and add another particle system.
Create a controller (e.g. simple plane with a 3rd particle system) and add the previously created particle systems as keys.

Here with a tiny version of the cube used as Dupli Object.
Use a massive number of particles not just a few hundred.

Tutorials

Blender Keyed Particle System Tutorial
Blender 2.68 Tutorial - Various Text Reveals
Blender 2.6 Tutorial - Keyed Particles versus Curve Guides

Thank you! it worked! :D
A last question, can i add a curve between the two items? i tried with Curve Guide but it didnt worked...or at least i don't know how to make it work...

@beavoru For a curve guide you need to add a force field in the physics tab and set its type to curve guide. https://www.youtube.com/watch?v=u9_gTtscj5Y


text:
Translating the center of a group of objects to the world origin
I would like to translate a group of objects to the world origin, so that the center of mass of this group sits at the origin.
I wanted to proceed as follow:

Retrieve the center (x,y,z) of the group of objects
Position an empty at that position
Set all the objects as child of the empty
Set the location of the empty to (0,0,0)
Free up the linking and delete the empty

Steps 1 & 2 are fine. On step #3 when parenting to the empty, all child objects are offset by the absolute position of the empty. When moving the empty to (0, 0, 0) the child objects go back to their original position.
The code below illustrate this:
import bpy
import numpy as np

# Create some cubes for the sake  of it
k = 3
bpy.ops.mesh.primitive_cube_add(size=2, location=(k, 2*k, 2*k+1))
bpy.ops.mesh.primitive_cube_add(size=2, location=(2*k, k, 2*k+1))
bpy.ops.mesh.primitive_cube_add(size=2, location=(2*k+1, 0, 2*k))

obj_centers = []
# Get all selected objects
for obj in bpy.context.scene.objects:
    bpy.context.view_layer.objects.active = obj
    if obj.type == 'MESH':
        # retrieve their location
        obj_center =  [obj.location[0],obj.location[1], obj.location[2]]
        obj_centers.append(obj_center)
#Compute the  geometric  center of the collection (average on x/y/z)
center = np.mean(np.asarray(obj_centers), axis=0)
# Create an empty at that location
o = bpy.data.objects.new( "my_temp_empty", None )
bpy.context.scene.collection.objects.link( o )
o.empty_display_size = 1
o.empty_display_type = 'ARROWS'
o.location = (center.tolist()[0], center.tolist()[1], center.tolist()[0])
# Parent all objects to  this empty
for obj in bpy.context.scene.objects:
    bpy.context.view_layer.objects.active = obj
    if obj.type == 'MESH':
        obj.parent =  o
        obj.matrix_parent_inverse = o.matrix_world.inverted()
# Move empty to origin
o.location = (0, 0, 0)

Of course, I can circumvent the problem by defining the position of the empty to the negative of the center of the objects group o.location = (-center.tolist()[0], -center.tolist()[1], -center.tolist()[0]), but I'd prefer to understand what's going on here. It has to do with obj.matrix_parent_inverse = o.matrix_world.inverted() this is supposed to fix the position of the children, but it does not work and I can not get my head around it (sorry, Blender beginner...).
My questions:

is there an alternative to my approach to move the center of a group of objects to the  origin?
Are some my issues due to using an "empty" as parent?
Could someone explain or point to a good explanation of what's going on with the position matrix when parenting. This is at the core of how Blender works, I'd be happy to finally understand it.
How would I come to release the linking and have my objects stay at their new location (i.e  Clear and Keep Transform)?

Many thanks in advance.

Use the matrix world.

is there an alternative to my approach to move the center of a group
  of objects to the origin?

An objects matrix world gives us access to global coordinates.  Hence could look at all the global coordinates of objects, get the mean and subtract it from each.
import bpy
from bpy import context
from mathutils import Vector

obs = context.selected_objects

o = sum((o.matrix_world.translation for o in obs), Vector()) / len(obs)

for ob in obs:
    ob.matrix_world.translation -= o

On parenting. In the UI we are used to seeing child coordinates such that the parent inverse matrix is identity.  To do this in code would set the matrix local of each child to be in the object space of the parent.  To do this we multiply its world matrix by the inverse of the parents.
Taking up script above, from mean calculation
bpy.ops.object.empty_add(location=o)
mt = context.object
mwi = mt.matrix_world.inverted()

for ob in obs:
    ob.parent = mt
    # alter ob.matrix_local
    ob.matrix_local = mwi @ ob.matrix_world
    # instead of
    # ob.matrix_parent_inverse = mwi
    # which retains matrix_local

mt.location = (0, 0, 0)
bpy.data.objects.remove(mt)

Note the difference here is that the local coordinates are being altered directly to what is the result of setting parent inverse (and keeping local coords same).
The latter is the reason the objects would return to original location when parent  removed,  parent inverse isn't used in calculations.

Concise, precise & elegant, thank you very much! Now I  understand.

notice that o.matrix_world.translation and o.location are exactly the same thing

Not necessarily so.


text:
Blender subdivision surface and bevel issues
I am new to blender and having difficulty creating a mixture of hard and soft edges within a gun model I am making using the subdivision surface and bevel modifiers whilst keeping the vert count down.
I have added bevel weights to areas that I require to be hard, however if I don't continue this bevel all the way along the edge loop it does weird things with the topology, image of the bevels:

Specifically, the front of the gun, if I don't continue the loop through the barrels it does the following:

But If I do, the barrels become less circular but don't cause any of the cross looping seen.

Any suggestions as to how I should approach the bevelling as I want an easy enough topology to UV map next.
Many thanks for any help.

Is this gun model going to be a game asset?

Well, to avoid poles and for the sake of sticking to quads, as a quick fix I'd suggest moving lower edge under the gun's barrel:


text:
Trying to wrap this mesh mask to another mesh
Beginner here; I'm just trying to figure out how I could get this mask to wrap around and sit on the face, like in the picture below.
I've tried the curve modifier but no joy, also tried the shrink-wrap modifier but that also just went horribly wrong.
I've searched the forum also but maybe I haven't searched the correct terminology so if this has been answered I apologize!
Hoping someone can help:)

You were on the right track when trying to use the Shrink-wrap modifier. All you need to do Is fiddle with some settings.
All you have to make sure is that you select the "Project" mode and tick both of the "Direction" boxes (this tell blender which normal to project, ticking both is just easy). Then you're going to want to increase the offset just a little bit so your projected mesh doesn't intersect too badly with your head.

I see the mesh you'd like to project looks like its got 3 dimentionality, so if you want to preserve that, I suggest you remake it with splines and add a skin modifier to it.


text:
Why is Blender's default cube 2 cubic meters instead of 1?
I had a very frustrating experience with Blender's UI. In the transform section there is location, rotation and scale and I thought scale would be dimensions, which I found out later it is not. Now I think a lot of people will confuse scale with dimensions (which is not even visible by default). Let's say I want to make a 0.1m cube; I tried to set the scale to 0.1 but since the default cube is 2m my new cube is now 0.2m.
Why is the default cube chosen like this and not the more natural and intuitive 1m3?
Wouldn't a default cube of 1m3 be better since then a naive user who confuses scale with dimensions would still get the desired result when trying to input a cube of length 0.1 and input that number into the scale?

When you look at the default cube there is one unit extending in each direction from the centre. One above 0, one below equally two and then the same for X, Y axis. But before I looked I was totally with you.

My guess is it's arbitrary but IMO sensible choice. Akin to a circle of radius 1 there is no fraction involved for radius vs diameter.  All the components of points of the cube have value -1 or 1 and a centre at (0, 0, 0).  There are a lot of people clear on the distinction between scale and dimension.  eg Scale model cars are rarely larger in dimension than the original.  The unit is ideal for a system like the metric system. Your question could be considered a little off-topic as primarily opinion base.

I'd just like to point out that "2 meters cubed" is not "2 cubic meters". The default cube is indeed 8 cubic meters!

There is no reason. But the default cube goes 1 unit in every direction, it's the same size as a sphere with a radius of 1 unit as well as for example procedural spherical gradient, a plain axis empty has lines going 1 unit in each direction of all axis as well. If it was 1 unit size and it was centered it would have sides ending at half a unit in all directions, that might be weird. So for what it's worth, it has some sense behind it. I think it is mainly this way, only because it had to be some size, and this is no better or worse than anything else. You can create a cube of any size and hit ctrl+u to save another default file if that makes more sense to you.

The reasons don't stand as much solid arguments. Someone else might see beauty in a system with unit sized cube and sphere with diameter of one and empty with half unit lines etc. For example Houdini uses this concept and it works great. The middle of the answer kind of contradicts the first sentence.

Yes, I agree. There might be many points of view here and no one way is better than another. I don't believe this is extremely important nor that the arguments are or should be solid. I would be surprised if there was any deep philosophical discussion among the developers about it at the time it was decided. It could be one way or the other. Same as with the directions of the coordinates. What axis should point in what direction depends on how you look at it. Literally. It would be interesting to hear a more detailed answer from some developer who might know more about it.

For the axis system there could be a case build that everyone else sticks to the +Y up orientation, even openGL, so Blender is a black sheep here. But the starting primitives everyone does differently, even the way they are put into the scene :)

Oh, but everyone does the axis differently as well - think of all the technical CAD software. Many cases can be built. It's not only the up direction that is different as well. Well, I suppose that does not contribute to answering this question...

I would argue while there is clearly no harm in having a 2x2x2 cube, there is a benefit to a 1x1x1 cube, or 1d sphere or cylinder, etc.  What? Scaling to a specific number becomes a multiplication of 1, not 2.  Yes, the tool does let you set the dimensions, sort of making it a moot point, but I find myself almost always starting with the cube, scaling it to 50%, baking the transforms to get it back to a scale of 1x while still being a unit cube.  Almost every single time!  Again, there is no down-side to starting with a 1x1x1 but there is an upside.  That's my thought anyway.

It is hard to argue the downsides and upsides... We all have different habits and perspectives. I always start modelling with a single vertex instead of a cube and don't even have a cube in my startup scene for years now...

Learn the distinction between scale and dimension.
The accepted answer explains re arbitrary but logical choice of default cube dimensions. All default objects are added with unit scale.

Wouldn't a default cube of 1m^3 be better since then a naive user who
  confuses scale with dimensions would still get the desired result when
  trying to input a cube of length 0.1 and input that number into the
  scale?

I say no. As soon as a primitive object is not unit in all dimensions it will no longer be the case that scale matches dimension.  Better to learn the distinction between them.
An object is "full size" at unit scale (default). This is a fundamental of 3D maths. An object is transformed  in 3D space using a matrix where unit scale, not dimension, is used along with zero location and rotation as default.  An objects dimensions are determined by its data, (a mesh for a mesh object). and can be any size.  The dimension of the local data in the mesh is always the same as those of the (unmodified) object at unit scale.
Setting the dimensions  alters the scale.  Setting the scale alters the dimensions. eg the x dimension of default cube is 2 and we want it to be 1.   Setting the dimension.x to 1 then scale.x is adjusted accordingly to 0.5.  Or dually change scale to 0.5 and dimension is adjusted to 1.
If we now apply that scale (make it unit) the dimensions stay the same. We have changed what we consider to be "full size".

I don't think you understand the question.  You're referring to the panel creating a dimension of 1 which adjusts the scale, but the underlying vertices are still at a dimension of 2.  What the OP is saying is the underlying vertex data should create a unit cube where the geometry is 1m apart, hence both the dimension and the scale would be 1.

I don' think you understand the answer.  The OP doesn't understand the distinction of scale and dimension, setting all (for cube) geom to halves so dimension matches scale isn't going to help that.  Consider that in mathis the unit circle has radius 1 not diameter.

If you read your answer, your comment "Setting the dimensions alters the scale. Setting the scale alters the dimensions" but that's only referring to the tool because it implicitly scales it (overriding the actual virtex dimensions.)  The original question says make the original geometry (i.e. the vertices) represent a 1x1x1 cube so the scale is a unit scale of 1. You also said "As soon as a primitive object is not unit in all dimensions..." but that's just it... a 2x2x2 cube is not a unit in any dimension. It is 2 in all dimensions and has a volume of 8, hence it is not a unit volume.

Yes, he misunderstood the terminology, but he used it correctly. He wants a 0.1m cube so he would think to scale a 1m cube by 0.1.  However, he has to scale it by 0.2 because the cube is 2x2x2.  So, bringing in a cube at 1x1x1m and he wants it at 0.1, he would simply scale it by 0.1.  He wants it at 5, scale it at 5.  You bringing up the unit circle is irrelevant because that's used for angular calculations not volumetric dimensions.

What has volume got to do with anything?  Consider a non XYZ symmetrical primitive.  If you feel strongly write an answer supporting units.

But we aren't talking about a non-symmetrical primitive.  We are talking specifically about a cube.  I'd make the same argument for the sphere, cone and cylinder too.  It makes the maths much simpler. Want a 2m tall by 0.5m wide cylinder? Scale it by 2 and 0.5 respectively.  Then bake your transformations.  Yes, the tool lets you set the dimensions directly, so I concede in the end it's sort of a non-issue anyway, but look at it this way... there's no benefit to starting with 2x2x2 but there is a benefit with a 1x1x1 in that scaling is simpler being a pure multiple and without any down-side.

The default cube is scale 1, 1, 1 and dimension 2., 2, 2. Could adjust  all primitives (regardless of symmetry) to unit dimension (in 2d or 3d) to make it "easy" for those that don't understand the distinction between scale and dimension (see answer above).  IMO What makes maths easy is if you understand the theory.  We graduate from the 1 x table. The OP wanting to scale 2 by 0.1 to get 0.1 shows a lack of understanding.   If you want a x b x c dimensions crunch them in as dimensions.  If you still want to advocate for unit dimension, take it up with the devs or write an answer.

As I said, I fully understand the difference between dimension and scale.  That's not what is going on here.  The question is stating that if he wanted to use the scale tool to end up at the dimension he wanted to, then with a unit cube, it would be much simpler.  As I also said, yes, Blender does let you enter the dimensions directly, but that still doesn't address the fact that unit cubes make more sense.  Again, what is a single benefit to a 2x2x2 vs a 1x1x1?  I've given you a benefit of the 1x1x1 over the 2x2x2 already. So what's the counter?

Sigh.  I have no issue with the way that it is. Please read the answer of @JaroslavJerrynoNovotny to which I concur 110%.  I have no doubt in the context of opinion yours makes more "sense" to you.  I am of another opinion.  For the benefit of sanity let's agree to disagree and leave this where it is.

Wouldn't a default cube of 1m3 be better since then a naive user who confuses scale with dimensions would still get the desired result when trying to input a cube of length 0.1 and input that number into the scale?

If it was better, it wouldn't be for the reason you suggest. Someone's confusion is not a reason to change this so he/she can keep being confused. The fix would be in the UI, but I don't think it is not good enough as it is.
That being said most other 3D apps use a single unit sized cube - for example Houdini and Maya:

In Maya you get a sphere with radius of 1, in Houdini you get a sphere with diameter of 1. So in the end every app does something different.
I am sure there can be found arguments why this or that is better, it would be opinions mostly and what the user is used to. There is no single natural intuitive approach.
The Blender cube has 2m sides, because a developer coding Blender (Ton probably at that time) some day woke up and decided on his personal preference that it will be 2m wide - the decision process was probably that a sphere will have a radius of 1 and the cube will correspond with sphere's diameter. And it stayed since because it doesn't really matter.

The scale input/value is "dimensionless" so changing it to 0.1 means 0.1 times whatever the original dimension/size was.
If you need specific dimensions note that you can type in values into the Dimensions x, y, z boxes on the right, and that will change the Scale values accordingly.

I'm surprised that no one wrote about one more reason: all vertexes have locations consisting of combinations of 1 and -1. Nice, basic numbers - just as programmers love them.
1 is a very specific number that has some nice properties. 0.5 would ruin all of that.

I can't comment because my reputation doesn't carry over. To the ones that said scale adjusts the dims, sure. okay - you're missing the point.
To the guy that said it's because there's inherent beauty in causing people to get mad, go insane trying to figure out idiotic scales to model a real world object... I just want to ask you this. Model a simple, hand built set of steps some time using real world dimensions, and then in the middle of your frustration, remember that you said that it was beautiful and you can't see any difference.  Also, note that transferring the object to any other program, such as Unity, or 3d printer, completely destroys the dimensions.
And to the person that pointed out the "one more reason: all vertices..." base vertices would be expressed in floating point numbers, so, your example should be stated as -1 to 1... meaning that 0.5 would be a very easy, and a nice, neat number to have. but 100% props for thinking, and not missing the point.
The simplest answer is that the programmers chose radius instead of logical dimensions because they were drop on their heads as children and fed a diet of lead paint chips. And, it's this reason that blender is not accepted at any of the companies that I have ever applied for, worked for, or managed. Including my own company.
To be honest, I have never seen a cube expressed in radius as it's primary measurement.
In my mind, I would say that the better question to ask is ... how do we just fix the underlying object so that we can move on with life? I ask this because for me, sadly, Maya is currently not an option... though I would make religious sacrifices to the dark gods if they made it an option.