text:
Conditional To Perform Alternate Task
So I have a operator that basically goes through an operation and I would like to have the F6 menu provide a checkbox that does an alternate behavior. How would I do that?
class softsharpenOperator(bpy.types.Operator):
'''Sharpen Without Modifiers'''
bl_idname = "ssharpen.objects"
bl_label = "softSharpen"
bl_options = {'REGISTER', 'UNDO'}

ssharpangle = FloatProperty(name="SSharpening Angle", description="Set SSharp Angle", default= 30.0, min = 0.0, max = 180.0)

angle = FloatProperty(name="AutoSmooth Angle", description="Set AutoSmooth angle", default= 60.0, min = 0.0, max = 180.0)

def execute(self, context):

    #convert angle
    ob = bpy.context.selected_objects

    angle = self.angle
    angle = angle * (3.14159265359/180)

    ssharpangle = self.ssharpangle
    ssharpangle = ssharpangle * (3.14159265359/180)

    #Start In Edit Mode
    bpy.ops.object.mode_set(mode='EDIT')

    #Unhide all The Geo!
    bpy.ops.mesh.reveal()

    #Now Sharpen It
    bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
    bpy.ops.mesh.select_all(action='DESELECT')

    #Selects Sharps From A Nothing Selection
    bpy.ops.mesh.edges_select_sharp(sharpness=ssharpangle)

    #And Then Adds Weight / Crease / Sharp
    bpy.ops.transform.edge_bevelweight(value=1)
    bpy.ops.transform.edge_crease(value=1)
    bpy.ops.mesh.mark_sharp()

    #Comes Out Of Edit Mode
    bpy.ops.object.editmode_toggle()

    #Turns On Smoothing And Then Sorts It Out
    bpy.context.object.data.use_auto_smooth = True

    #now sets angle to Var angle.
    bpy.context.object.data.auto_smooth_angle = angle

    bpy.ops.object.shade_smooth()
    return {'FINISHED'}

So this operator is just supposed to locate the sharp edges and mark it for bevelling. I was able to get variables to show in the F6 menu showing the behavior but it would be even cooler to make it toggle between another behavior and this one.

Welcome masterxeon1001 :) if the answer worked for you, please mark it as accepted for future visitors, also that's the best way to say: 'Thank you' here. The virtual currency here is votes... see: http://stackoverflow.com/help/privileges/vote-up and http://stackoverflow.com/help/why-vote. Anyway, enjoy.blender.se!

To enable alternate modes, you generally need a to add a BoolProperty to your operator which will represent the two modes of operation.
To control the value of this property through the F6 menu, you also need to add a Draw function to your operator. You can display the other paramters affecting your operator's behavior there if you want. This seemed to work only if the operator is launched through a Panel or Menu, not when launched from the console though. Maybe some other user here can explain why that is.
class softsharpenOperator(bpy.types.Operator):
    '''Sharpen Without Modifiers'''
    bl_idname = "ssharpen.objects"
    bl_label = "softSharpen"
    bl_options = {'REGISTER', 'UNDO'}

    ssharpangle = FloatProperty(name="SSharpening Angle", description="Set SSharp Angle", default= 30.0, min = 0.0, max = 180.0)

    angle = FloatProperty(name="AutoSmooth Angle", description="Set AutoSmooth angle", default= 60.0, min = 0.0, max = 180.0)

    # ADD A BOOLEAN PROPERTY TO DISCERN BETWEEN THE TWO ALTERNATE MODES
    alternate_mode = BoolProperty()

    # ADD A DRAW FUNCTION TO DISPLAY PROPERTIES ON THE F6 MENU
    def draw(self, context):
        layout = self.layout

        box = layout.box()
        # DRAW YOUR PROPERTIES IN A BOX
        box.prop( self, 'ssharpangle' )
        box.prop( self, 'angle' )
        box.prop( self, 'alternate_mode'  )

    def execute(self, context):
        if self.alternate_mode:
            # DO SOMETHING ONE WAY
        else:
            # DO IT THE OTHER WAY

        return {'FINISHED'}

If you want to play around with a simple example that works out of the box (copy and paste to a text editor and run), here's one that alternately creates a sphere or a torus, depending on whether the bool property is set to True or False (to execute the operator either call it from the console, or using the Add Mesh menu - Shift + A --> Mesh --> Test):
import bpy

class testOperator( bpy.types.Operator ):
    """This is a test"""
    bl_idname  = "mesh.test_me"
    bl_label   = "Test"
    bl_options = {'REGISTER', 'UNDO'}

    sphereOn = bpy.props.BoolProperty()

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

        box = layout.box()
        box.prop( self, 'sphereOn'  )

    def execute( self, context ):
        if self.sphereOn:
            bpy.ops.mesh.primitive_uv_sphere_add()
        else:
            bpy.ops.mesh.primitive_torus_add()

        return {'FINISHED'}

# Operator adding function (used to inject operator to menu)
def menu_func( self, context ):
    self.layout.operator(
        "mesh.test_me",
        text = "Test",
        icon = "PLUGIN"
    )

def register():
    bpy.utils.register_module(__name__)

    # Add "Snowflake" menu to the "Add Mesh" menu
    bpy.types.INFO_MT_mesh_add.append( menu_func )

def unregister():
    bpy.utils.unregister_module(__name__)

    # Remove "Snowflake" menu from the "Add Mesh" menu.
    bpy.types.INFO_MT_mesh_add.remove( menu_func )

if __name__ == "__main__":
    register()

I should have been using stackexchange a long time ago! You guys are lifesavers.

Careful, this place is addictive ;-)

oh yeah i can already tell. Every answer spawns 1000 more questions. Now I am rewriting the whole script with all the new info I have received!


text:
Workflow and image/video formats for rendering high quality photos as animations?
I want to preserve as best I can the quality of digital photos taken in RAW format and then rendered as animation sequences in Blender. My workflow is as follows:

Process RAW (.cr2) images with Darktable
Export as OpenEXR
Track and composite animation sequence in Blender
Save animation as OpenEXR image sequence
Open multiple image sequences in VSE and render final video file

The OpenEXR format is very large (over 200MB per image). Do I need to use it in both steps 2 and 4? Also, what settings should I use for the final video render?

Related: http://blender.stackexchange.com/a/3472/599

@cegaton I don't have any specific requirements. I may want to upload to the web as HD video. I may also want a higher quality (possibly 4K) for archival purposes.

You mention jpg proxie which brings up a related question of mine. How can I change the clip format without losing my tracks?

It is more common to save the output of blender rendering as a set of PNGs.  You can turn up the compression in the Render > Output section, but I can not predict if it will save space compared to the OpenEXR.
Making a VSE output to compressed video (as you do) is very common, and almost required if there is any sound involved.  The settings you use for the final video render will vary depending on

how much bandwidth you are willing to allocate for streaming
resolution of video (3.75Mbit/s MPEG-2 is CableLabs VoD standard for SD.  You will want 4-9Mbit/s for H.264 1080p video)
what formats are supported by the client software (motorola DCT-2000 -vs- iPhone)
does the container support the codecs you want (MPEG-2 program stream doesn't support AAC and blender does not seem to support transport streams)

Some more reading is at http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Output/Video

I'm pretty sure that a PNG will almost always be smaller than an EXR. Maybe if you using 16 bit PNG with half-precision EXR you might get occasionally larger PNG, but I don't know.

source: Stack Exchange

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

authors: Семен Русаков

sort: votes


text:
What does Open Shading Language ( OSL ) mean?
I was wondering what does Open Shading Language mean? I've heard people talk about OSL this and OSL that, and I just thought that it was something they said to sound smart.
I wonder if anyone actually knows what this is or does?

Open Shading Language is a programming language designed for writing shaders.
From the OSL page:

Open Shading Language (OSL) is a small but rich language for
  programmable shading in advanced renderers and other applications,
  ideal for describing materials, lights, displacement, and pattern
  generation.

A Script node was added in blender 2.65 that allows users to use OSL shaders in Cycles.

So It is used to create your own shaders using Python?

@Owen it's not Python; it's its own language. If you look at the example in the link you'll see it's nothing like Python.

OOOHHH Ok see I don't know anything about programming so I was a little confused. That is cool though. thanks

Here's a pretty good tutorial for OSL in Blender. It's not quite geared toward people with no programming experience, but he's pretty good at explaining all the little details that are necessary for your shader to properly compile. http://cgcookie.com/blender/cgc-courses/introduction-to-osl-in-blender-cycles/

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


text:
Blender Internal glossy BSDF equivalent?
O.k. I'm back and now i need to know how to make a metallic material in Blender Internal.
The last question was for cycles and that fixed my problem, but Blender Internal doesn't have a Glossy BSDF. How do I get a glossy/metallic material in BI?

This question appears to be off-topic because it is a tutorial request. A quick search on YouTube would bring up a multitude of tutorials.

What do you mean OFF TOPIC?

Blender Internal does have glossy reflections: www.blender.org/development/release-logs/blender-246/glossy-reflectionrefraction

@OwenPatterson, please read: http://meta.blender.stackexchange.com/questions/1/what-questions-should-be-definitely-off-topic

I'd like to add some information about the settings on top of micgdev's answer:
Reflectivity: There you define how strong the reflection is. 1 is fully reflective, 0 means no reflection at all. A fully reflective surface is non-existant, even a mirror is around 0.9..
Fresnel: Do you know the effect when you're looking at car windows from different angles? One time (when you face them) it's almost transparent, the other time it's almost a mirror (looking at them from the side). This effect is the fresnel effect and you enable it with this slider.
Glossy: With a glossy "amount" value below 1 you're setting the glossiness. 1 means very glossy, all below 1 means that the reflection will be blurred out.
Anisotropic: With this slider you can alter the reflection kind. If you're turning it up, the reflection will behave more and more like under a pot (become more and more circular).
I think that should set you up for the first steps...but read the documentation and experiment - there is so much to test and find out :)

Enable Mirror, it's in your material settings. See the Blender wiki article on materials for more. Specifically the section on mirrors will be of interest, there you will find a run-down of what each parameter does.

@micgdev I added a screenshot and a link to the wiki, we try to make Blender SE a thick web of information.


text:
What does the stamp drop down menu in the render panel do?
I am working on a project right now, and during the render process I noticed a little check box that says stamp.
When I selected the drop down menu it had a bunch of selections the refer to text and font, and things like that.
My scene has text in it, and I was wondering what this section does, and how it is applicable to text scenes.

Note that in Blender 2.8 this has been moved to the Metadata section of the Output tab.

The Stamp section in the Render panel goal is used to draw some information on the render output. This can be useful for a work in progress production.
See the blender wiki.
For example you can select Frame to print the current frame number on the final output.
The Font size, Text color and Background settings allow you to control how this information is displayed.
You can additionally print a custom note by checking the Note setting and writing whatever you want.

Great answer. It's also useful for profiling animations by checking the "RenderTime" check, which will print the amount of time it took to render that frame. I.e. render at 25% and see which frames are taking the longest.

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


text:
What is the difference between Translucency and Transparency?
I have been wondering this for a while. What is exactly the difference between a translucency shader and a transparency shader?

Transparency allows light to pass through without refracting or scattering it, while translucency scatters light to some degree.
What the manual says about the Transparent shader:

Transparent BSDF without refraction, passing straight through the
surface, as if there was no geometry there. Useful with alpha maps for
example. This shader affects light paths somewhat differently than
other BSDF's. Note that only pure white transparent shaders are
completely transparent.

The Translucent shader is more like a Refraction shader with a high Roughness and an IOR of 0 (no refraction) It is also a little bit like an SSS shader in that light is scattered when passing through. (The main difference between the two is that the translucent shader scatters light more uniformly)

To visualize this using the manual images:

The Transparent shader lets light straight through:

The Translucent shader scatters light:


text:
How to add an object from another scene?
I'm am trying to create a scene in Blender, by adding in another object from a previously created scene that is on a separate .blend file. How can I do this?
I have tried to append an object from one .blend to another, but it still won't work. Can I get some help in trying to figure this out?
The other answers to this question haven't worked. Is it a bug? How can I do this?

I don't mean to close this question, but there is a lot of duplicate information available in the link above.

Are both scenes in the same blend file? Please try give more info in your questions.

The way this question is currently phrased, it is an exact duplicate of one already asked. If you meant something else and want to clarify your question, please do so and it will be reopened.

It is in different scenes. Sorry, I didn't know it was a duplicate. I am new here so i don't know how to find questions already asked specific to my need.

O.k. I tried to APPEND from the file menu and I selected my .blend file that I wanted to pull from and it still won't come up.

That link does not answer my question.

@OwenPatterson did you try the answer below?

No because it is not in the same .blend file.

To add an object from another scene is quite different from adding an object from another file. It is really annoying that this is marked as duplicate.

One answer that is not in the other topic is: drag the object in the outliner an drop it in the outliner to another scene. This puts kind of a reference to the other scene and if the original object is changed, the changes apply also to the other scene. That's by the way what I was looking for and was prevented from due to this obsessive "this is a duplicate" habit.

If the scenes are in the same .blend file:

Be in the destination scene
From the Outliner, make sure you see all scenes
In the Outliner, expand the scene with the object you want and drill down to that object
Left-click and drag the icon for that object into your 3D View
Boom... you've copied it over

If the scenes are in different files

File > Append (or Shift+F1)
From Blender's File Browser, go to the .blend file you want to pull from
Left-click the .blend file and go to the Object sub-directory within it
Choose the object you want to get (you did give it a sensible name, right?)
Click the "Link/Append from Library" button in the upper right corner

Great. You made my day!

The objects are in the same file / different scenes for me, but the child objects of the parent dragged into the scene do not appear in the target scene, what did I do wrong?

There's a chance that the drag and drop method doesn't include child objects. For that, you may want to work from the 3D View. Change to the source scene, select all of the objects you want to bring to the target scene, and use Ctrl+L > Objects to Scene and choose your target scene. Then go back to the target scene and use L > All to make your linked objects local to that scene.


text:
Shader: Rounded edge between the two intersecting faces?
Is there way to do "Rounded Edge Width" in Blender? It's familiar for me from Modo. Anyone know the trick?
Like Modo's Rounded Edge Width. Couple links for reference:
From the modo documentation:

The 'Rounded Edge Width' option adjusts the rendered result of surface
  normals at a polygons edge to blend them with adjoining polygon
  normals, giving the impression of a small rounded edge between the two
  intersecting faces. To explain it more simply it shades polygons edges
  at render time to look as if a small rounded bevel has been applied,
  to what normally would be a sharp intersection. Users can define an
  Edge Width to determine the amount or 'roundness' but keep in mind it
  is merely a shading trick and wont round the edges of the actual
  geometry, nor change the objects silhouette in the rendered image, so
  it is best to keep set the length to just a few pixels in width in the
  final rendered image.
emphasis mine

Video demonstrating the effect.

Welcome Sakari! Cycles or Blender Internal?

You could try using a Bevel modifier...

@someonewithpc I think the OP wants to do this with disconnected intersecting faces.

There's an OSL bevel Shader for Cycles that I believe was originally written by the person who built Cycles.  Several people have been making adjustments to it and have been posting the results to the following thread on BlenderArtists.org  http://www.blenderartists.org/forum/showthread.php?329295-Bevel-shader
OSL Code
Paste the following code into a new Text Datablock in Blender, and use it in the script node of an OSL node tree:
void rng_seed(output int rng, int seed)
{
  int chash = seed;
  if (chash == 0) chash = 1;
  rng = chash * 30391861;
}

float rng_uniform(output int rng)
{
  float res = rng / float(2137483647) * 0.5 + 0.5;
  rng *= 30391861;
  return res;
}

void to_unit_disk(float x, float y, output float x_out, output float y_out)
{
  float r, phi;
  float a = 2.0 * x - 1.0;
  float b = 2.0 * y - 1.0;

  if(a > -b)
  { if(a > b)
    { r = a;
      phi = M_PI_4 *(b/a);
    }
    else
    { r = b;
      phi = M_PI_4 *(2.0 - a/b);
  } }
  else
  { if(a < b)
    { r = -a;
      phi = M_PI_4 *(4.0 + b/a);
    }
    else
    { r = -b;
      if(b != 0.0) phi = M_PI_4 *(6.0 - a/b);
      else phi = 0.0;
  } }
  x_out = r * cos(phi);
  y_out = r * sin(phi);
}

void make_orthonormals(vector N, output vector a, output vector b)
{
  if(N[0] != N[1] || N[0] != N[2]) a = cross(vector(1, 1, 1), N);
  else a = cross(vector(-1, 1, 1), N);

  a = normalize(a);
  b = cross(N, a);
}

vector sample_cos_hemisphere(vector N, float randu, float randv)
{
  vector T, B;

  make_orthonormals(N, T, B);
  to_unit_disk(randu, randv, randu, randv);
  float costheta = sqrt(max(1.0 - randu * randu - randv * randv, 0.0));

  return randu * T + randv * B + costheta * N;
}

shader node_occlusion2(
  color Effect = color(0),
  color No_Effect = color(1),
  int Mode = 0, /* 0: Concave (AO) 1:Convex (Wear) 2:Both */
  int InvertEffect = 0,
  float Distance = 0.2,
  int Samples = 1,
  output color Color = 0,
  output float Fac = 0,
  output normal outNormal = N
)
{
  int i, rng;
  float f, randu, randv, ray_t, hits = 0;
  vector ray_P, ray_R;
  normal hit_normal = N;
  float hit_dist;

  f = fmod(cellnoise(P*123456.0), 1.0);
  rng_seed(rng, int(f * 21374647));

  for(i = 0; i < Samples; i++)
  { randu = rng_uniform(rng);
    randv = rng_uniform(rng);

    ray_P = P;
    ray_R = sample_cos_hemisphere(-N, randu, randv);
    ray_t = Distance;

    if (!Mode)
    { if(trace(ray_P, -ray_R, "maxdist", ray_t)) {
            hits += 1.0;
            int HitNormal = getmessage ("trace", "N", hit_normal);
            outNormal = outNormal + (hit_normal);
        }
    }
    else if (Mode == 1)
    { if(trace(ray_P, ray_R, "maxdist", ray_t)) {
           hits += 1.0;
           int HitNormal = getmessage ("trace", "N", hit_normal);
           outNormal = outNormal - (hit_normal);
        }
    }
    else {
        if(trace(ray_P, -ray_R, "maxdist", ray_t)) {
            hits += 1.0;
            int HitNormal = getmessage ("trace", "N", hit_normal);
            outNormal = outNormal + (hit_normal);
        }
        if(trace(ray_P, ray_R, "maxdist", ray_t)) {
           hits += 1.0;
           int HitNormal = getmessage ("trace", "N", hit_normal);
           outNormal = outNormal - (hit_normal);
        }
    }
  }
  Fac = 1.0 - (hits/Samples);
  if(InvertEffect) Color = mix(No_Effect, Effect, Fac);
  else Color = mix(Effect, No_Effect, Fac);
  outNormal = normalize(outNormal);
}

Here's a render of many spheres that are all separate objects.  It works well in some cases but not always.

Just curious, but what makes you think that it was written by Brecht? (I assume that's who you mean). I don't see any evidence one way or another. Not that it really matters though..

That shader was posted on some other thread before this one.  It was username "BAO" something or other.  He said he got it from Brecht.

I find this solution to suit pretty well in my cases. There is couple different versions from bevel shader script in that forum thread. Thanks for pointing me to right direction!

We no longer need the OSL script.
Cycles now has a dedicated node to do this.
It's found under Input-> Bevel.  Just plug it into the Normal socket of the Shader.

Which version of Blender is this, please? This, (and a few other shaders referred to here), are not  my install of 2.79b,

The Bevel node was introduced about a year ago IIRC.  Every version since then should have it.  The script that I posted many years ago is not a part of any version.  You have to activate OSL and load it in manually but anything OSL is painfully slow so it's a last resort.  (BTW.  There was a typo in this answer until yesterday)

OK, thanks, got it.  it's in the official builds here.

bevel shader node requires the geometry to be in the same object to work doesn't it?  (Not necessarily linked, but part of the same mesh object).   Possibly i've been using it wrong?

You're using it right if you get these results although maybe these results are not the best way for the tools to function.  I'd start a thread on BlenderArtists.org to discuss the issue.  The tool author; Brecht-VL, will be change the code if there is a logical reason to do so.  Be sure to post a link here if you choose to start a thread to work on this issue.  Personally, I'd like the option for bevel to affect both separate and joined objects.

As @Jerryno said, you need geometry. You could try using a Bevel modifier, or the equivalent Bevel tool in Edit Mode. The modifier is however preferable, since it's easily reversible; To do this, go to the Properties panel, and in the Modifiers tab, click Add Modifier and choose Bevel.

Then you can tweak the settings in the modifier to give the effect you want. For instance:

The number of segments defines the "Smoothness" and the Profile defines in which direction the generated geometry curves. A value less than 0.25 will curve it inwards.

Creating a Bevel Map for use with Eevee
To expand on MarcClintDion's answer for Cycles, it is also possible to Bake a bevel map from Cycles to use in Eevee.
What isn't obvious is that if you simply bake the normal data to color data, some axes will be out of range in the negative and appear black. This causes the normal data for those regions to be lost. For this reason it is necessary to "compress" the normal data into a positive range of color (0 to 1) when baking, and re-expand the colors to the original range of the normal data (-1 to 1) when using the baked texture.
Baking
From the Bevel node Separate RGB, and for each of the three color channels Map Range From Min:-1 From Max:1 To Min:0 To Max:1 then Combine RGB and route it to an Emission Shader. As always when baking, make sure your mesh is UV mapped and that the Image Texture inside your Material that you want to bake to is selected. Set the Bake Type to Emit. Max Samples 20 is enough for baking Emission.
Baking in Cycles:

↑ I went with a Radius of 0.2 for this example to make the effect obvious, but you might want a lower value for a more subtle effect. This will vary depending on your mesh size and what look you're going for.
Inside the Group node:

Bake-related settings:
(Where Image Format and Color Space are concerned, I'm not saying you need these exact settings, but these worked for me.)

Using the bevel map in Eevee
From the Image Texture node, separate each color channel again and this time map From Min:0 From Max:1 To Min:-1 To Max:1. Recombine the color channels and connect the output to the Normal input socket of the shader you want to use.

Final result rendered in Eevee:

↑ This is lit with several Point lights, which leave hard shadows, but the result could be improved with some nice environment lighting. Lighting in Eevee is another topic though, so I will leave it at this.


text:
Cam slowing down at end of path
I want a cam to zoom out and stop. but it looks silly when it goes from moving to full stop in a frame, so I need it to slow down a few frames before the end.
I found a  few guides, where I should edit the speed in the graph editor window but mine looks nothing like the ones others show.
mine:

why is it not the same ?

Go to key --> interpolation mode (T) --> bezier (in the graph editor)

I can't select bezier. its greyed out

Just tried that. When I delete the modifier The cam does not follow the path.
Im all new to this, so is it because I have to do parent then in another way ?

no. Just added the path stuck the cam to it and thats it.


text:
How can I make a dropdown box of materials and run code when one is selected?
How would I go about making a property box that contained all the materials in a scene (in a Toolshelf (T) panel for example) and is able to pass the material in the list to another operator that assigned the material that was selected in the property box?

Does this answer help?

Here is an example of how this can be achieved:
import bpy

def mat_update(self, context):
    ob = context.active_object
    mats = bpy.data.materials
    selected_mat = context.scene.mymats
    if selected_mat != 'None':
        if ob.data.materials:
            ob.data.materials[0] = mats[selected_mat]
        else:
            ob.data.materials.append(mats[selected_mat])

class MyListPanelExample(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_example"
    bl_space_type = 'VIEW_3D'
    bl_region_type = "TOOLS"
    bl_category = 'My Panel'

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

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

        obj = context.object
        row = layout.row()
        row.prop(context.scene, "mymats")

def register():
    def getsets(self, context):
        sets = []
        mats = bpy.data.materials
        for mat in mats:
            sets.append((mat.name, mat.name, mat.name))
        if not sets:
            sets = [('None', 'None', 'None')]
        return sets

    bpy.utils.register_module(__name__)
    bpy.types.Scene.mymats = bpy.props.EnumProperty(items=getsets, update=mat_update)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

Rewrote the code because I read the question wrong.

Use pointers.
EDIT, having a property to keep the name, and use in a property search has IMO been superseded by assigning a pointer property with a poll in later (circa late 2.79 and beyond).
Example, select from and assign a property to a material of all non grease pencil materials in blend :
Custom search data to UILayout.prop_search

Finding only the materials in the scene would be doable (make a set of all materials of all objects in scene)  but is probably not necessary, instead suggest using bpy.data.materials the list of all materials in the file.
EDIT: However have done this here
How to populate UIList with all material slot in scene? 2.8
A UILayout.prop_search can be used as a UI to assign a material's name to a string property.
import bpy
from bpy.props import StringProperty

class LayoutDemoPanel(bpy.types.Panel):
    bl_label = "Set Active Material"
    bl_idname = "OBJECT_PT_example"
    bl_space_type = 'VIEW_3D'
    bl_region_type = "TOOLS"
    bl_category = 'Materials'

    @classmethod
    def poll(cls, context):
        return len(bpy.data.materials) > 0

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

        scene = context.scene

        layout.prop_search(scene,
                           "selected_mat",
                           bpy.data,
                           "materials")

def register():
    bpy.types.Scene.selected_mat = StringProperty(default="None")
    bpy.utils.register_class(LayoutDemoPanel)

def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel)

if __name__ == "__main__":
    register()

In an operator can use the property like so.
scene = context.scene
material = bpy.data.materials.get(scene.selected_mat)
if material is None:
    # no material has it been renamed?
    return {'CANCELLED'}
# do something with material


text:
How is Subsurface Scattering calculated when doing a Cycles texture bake?
I have seen (but not sure) that for instance reflective parts on glossy materials are rendered along face normals during a bake (as there is no camera to point to).
But how is it defined for SSS ?

authors: Валерий Краснобородько


text:
Is there a way to get a node's dimensions without displaying it in the Node Editor?
The aim of the question is to calculate a node tree layout for a generated node tree.
Nodes have height, width and dimensions.
It seems that dimensions corresponds to some default size and that height and width to the currently displayed dimensions. But these last two are not set until the node is effectively displayed somewhere in the editor (or am I wrong?).
But if you want to generate a node layout for a material or a node tree which is itself generated and which is not displayed for now, is it possible to get the dimensions? If yes, how?
We can:
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

to force a layout calculation. But this works only when the node tree is displayed in the Node Editor (at least it seems to be the case).
How can we get the 'future' default dimensions so that a node tree layout could be calculated?
Edit: Some extra details
When creating a node tree, it is not displayed until it is used (instantiated) in a material and opened for editing.
In this case,

width and height are some default values: 140 and 100
dimensions is a Vector(0.0000, 0.0000)

I've experimented and found that these values are updated when the node is displayed (and bpy.ops.wm.redraw() is called). So that typically, the Principled and Diffuse shader nodes do not end up having the same dimensions.
But before that, the dimension values are as given above.
The complete code is hard to share here, but here are some basic snippets:
Creating a node tree (node group) is:
node_group = node_groups.new( node_group_name, 'ShaderNodeTree' )

Creating a material is:
material = materials.new( material_name )

Creating a node in both cases:
self.internal_node = node_tree_nodes.new( type = self.name )

But once the data is created, there are two cases:
The node tree is displayed in a view and
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

can be use to 'force' a layout update and get the dimensions (if this bpy.ops is not called height, width, and dimensions are not updated).
Or the node tree (bpy.data.node_groups typically) is not displayed and I can't find a way to retrieve the 'future displayed' dimensions.

Can you give a little more info about what you're doing? As soon as I create a node with node_tree.nodes.new('nodeType') it adds the node to the node tree anyway. How are you creating nodes but not displaying them?

@RayMairlot, typically it's the case when creating a node tree which is not displayed until an instance of it is linked to a material. Will add code samples to explain better.

@RayMairlot, the node trees or materials are correctly created (and can be used), this is only a layout problem.

@RayMairlot, thanks for the edit.

My guess is that the values aren't hard coded because the size the node displays at is dependant on the theme settings and the interface display size/dpi (ui_scale in 2.79 preferences). Changing the display size causes the dimensions to change. Maybe there's a way of combining these values with the dimensions to arrive at the final size.

@RayMairlot, thanks. I think combining ui_scale with the count of the inputs, outputs and params should do it or at least will give a good enough approximation for most of nodes. Will try it when possible.

@RayMairlot, FYI, ui_scale does not change the height, width or dimensions of the node. Will use empiric approach 24 * (inputs + outputs + parameters + 1 for title) if not better way given as answer.

I can't tell you anything apart from what I tested; changing ui_scale produced drastically different values for the dimensions (in 2.79).

@RayMairlot, sorry, effectively you are right (my test was bad). But I think that dimension are the rendered dimensions (and so scale counts). But setting location seems to be scale independent.

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


text:
Extruding a bone error

I started to extrude a bone for the other arm but this happened.  What's going on with it?
Blend file

I've never seen that before... in the future, try using x-mirror axis

How do I find x-mirror while still able to move the arms independently.

the arms will move independently in pose mode, but while creating it in edit mode, it's helpful to have perfect symmetry. x-mirror is under "options" while in edit mode.

It didn't do it.  What did I miss?  https://drive.google.com/file/d/0BwnCnOOEcD5qdHlLcEVQOTV4cHM/view?usp=sharing

Works for me, you could also try to use rigify (an addon that you need to enable in the user preferences) to add a full rig. Expect 2hrs of tutorial watching.

Ok, still won't do X-Axis Mirror...Why?  https://drive.google.com/file/d/0BwnCnOOEcD5qcFJmeFlON2I2b0k/view?usp=sharing

You have Skeleton Sketching enabled.
Disable this option and use E button to extrude the bone or Ctrl+LMB while the torso bone is selected.

To make the bone symmetrical on the mirrored side, after you extrude the bone enable Forked in Extrude Operator panel while you have X-Axis Mirror enabled

Ok, still won't do X-Axis Mirror...Why? https://drive.google.com/file/d/0BwnCnOOEcD5qcFJmeFlON2I2b0k/view?usp=sharing

@ChristopherMonday I updated the answer.

That helped.  After I get akk the bones set do I reparent the mesh to the skeleton?   https://drive.google.com/file/d/0BwnCnOOEcD5qa0ZmaURsanBJVjg/view?usp=sharing

How's this look? https://drive.google.com/file/d/0BwnCnOOEcD5qOHRSbVVqQ0lOdk0/view?usp=sharing

Does X-Axis Mirror work on a mesh?

For those who don't know, the X-Mirror option is part of the Options panel located at the right side of the toolbar, with an icon like a butterfly (at least for version 3.1).

authors: สมชาย ขุนวิเศษ


text:
SL Skeleton, Avatar Workbench, MH Avatar import problem
When I import my MH mhx2 into Avatar Workbench for SL, the worbench.blend file is in right ortho, so it faces right. When I import my MHX2 avatar from MH, it faces to the front, so I can't rig it to the SL fitted mesh skeleton. In SL, there is a way to rotate the Av from side to front, but I can't seem to find that same axis control in Blender.
Because of the scale issue in MH, it only imports with the proper scale if I go from MH to Sculptris to Blender, and I have to use the avatarworkbench.blend file, but when I do that I get the problem I wrote about above.
If I just import the MHX2 file directly, it only shows up in 3D Full view, it is turned towards the left slightly, and I also can't scale or rotate it.
I just want to attach the fitted mesh SL Skeleton (with the additional collision bones for fitted mesh) to my MH avatar without so much fuss, and I need to find out how to "rotate" my MH Avatar to face front in avatar workbench.blend
P.S. Please don't answer this question by saying "get Avastar" or something to that effect, because I can't afford it right now.

Very easy:) Select your model (all of it...rig and all) in object mode. Now press R and Z you can now rotate with mouse...get it as close as possible then fine tune to exactly 90 deg or -90 deg in the left panel very bottom. After you're done, don't forget to press CtrlA and save rotation scale etc.

You can press R>Z and then type 90 or -90 as well, this will give the exact rotational value


text:
How to map surface in retopologizing
I decided to practice a bit with blender and I was trying to create a head following this tutorial on net:
Creating a Realistic Head in Blender
It is speed up so its hard to sometimes figure out what is going on.
I am now on retopologizing section, however I noticed that when author of the tutorial shows just retopologized part (not yet finished just to check it out) you can see it smoothly with crevasses and such things, it looks as if he somehow mapped surface/geometry of the high poly model he made before to that retopologized model.
My question is how did he do it and how could i do it? My retopologized model just looks like bunch of flat faces. I study art at college and I wanted to go deeper into 3D modelling, our lessons on this subject were rather scarce unfortunately.

Pausing the video can help you see what he has done :)...

What He does is add a sub surf modifier(Ctrl-2), as well as enable smooth shading Tab to enter edit mode, A to select every thing, W>Shade Smooth, and Tab to exit edit mode.


text:
Can an imported .STL file be broken down into individual parts (rigged) and animated in Blender?
Can an imported .STL file be rigged and animated in Blender? I have a model of a house window that was given to me as a .STL file, and I want to animate how it opens/closes. FYI, I'm new to Blender and 3D animation. I want to make sure Blender is the right tool for the job.

Yes it should be possible, since importing means to convert it into Blender internal format. You can use all tools provided by Blender to work on you model.
It could be that you need to split the window and the window frame into two objects.
In Edit Mode select the part of the mesh you want so separate into to another object and press P this opens the Separate popup and choose Selection.

When I try Edit Mode and separation, my .STL file (about 300 MB) keeps freezing Blender on my computer (iMac 10.7.5 3.1 GHz Intel Core i5 32GB 1333 MHz DDR3). Any suggestions? Would the decimation modifier panel help?

@earnold You could use the decimate or remesh modifier, keep in mind that they reduce the mesh only when applied. http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Generate/Remesh http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Generate/Decimate


text:
How to know if RNA property was created at runtime
I would like to export a .blend file in a JSON format (so that I can compare two .blend files by comparing their JSON representations), to do that I've written this script which will convert all the data structures to JSON based on the RNA properties:
"""
Export all the data from the current Blender file to either a JSON file or a pickle of
a pure python data structure.

Must be run inside of Blender! E.g. blender --background --python blend_data.py -- --dest /path/to/file.json
"""

import bpy

# Data-blocks that can be accessed via bpy.data.<type>[name]
data_types = (
    bpy.types.MetaBall,
    bpy.types.WindowManager,
    bpy.types.Brush,
    bpy.types.Screen,
    bpy.types.World,
    bpy.types.Particle,
    bpy.types.ShapeKey,
    bpy.types.Text,
    bpy.types.FreestyleLineStyle,
    bpy.types.GreasePencil,
    bpy.types.Texture,
    bpy.types.Camera,
    bpy.types.Material,
    bpy.types.Image,
    bpy.types.Group,
    bpy.types.Armature,
    bpy.types.Lamp,
    bpy.types.Lattice,
    bpy.types.NodeGroup,
    bpy.types.Sound,
    bpy.types.Mask,
    bpy.types.Mesh,
    bpy.types.MovieClip,
    bpy.types.Speaker,
    bpy.types.Palette,
    bpy.types.Action,
    bpy.types.Curve,
    bpy.types.Object,
    bpy.types.VectorFont,
    bpy.types.Scene,
    bpy.types.Library,
)

data_types_set = set(data_types)

data_groups = [
    'actions',
    'armatures',
    'brushes',
    'cameras',
    'curves',
    'fonts',
    'grease_pencil',
    'groups',
    'images',
    'lamps',
    'lattices',
    'libraries',
    'linestyles',
    'masks',
    'materials',
    'meshes',
    'metaballs',
    'movieclips',
    'node_groups',
    'objects',
    'palettes',
    'particles',
    'scenes',
    'screens',
    'shape_keys',
    'sounds',
    'speakers',
    'texts',
    'textures',
    'window_managers',
    'worlds'
]

class BlendEncoder(object):
    """Encode a .blend file in a json format"""
    def __init__(self, data_groups=data_groups):
        self._data_groups = data_groups
        self._prop_hooks = {}

    def register_prop_encoder(self, datablock, prop, encode_fn):
        self._prop_hooks.setdefault(datablock, {})[prop] = encode_fn

    def encode(self, data):
        """Encode the given blend data into json compatible python"""
        ret = {}
        for data_group in self._data_groups:
            ret[data_group] = {}
            for obj in getattr(data, data_group):
                # Skip datablocks that where loaded from a library.
                if not isinstance(obj, bpy.types.ID) or obj.library is None:
                    ret[data_group][obj.name] = self._encode_struct(obj, obj.rna_type)

        return ret

    def _encode_pointer(self, ptr):
        # TODO: find a better way of representing pointer properties other then the repr string.
        return repr(ptr)

    def _encode_prop(self, data, prop):
        """Serialize an rna property"""

        val = getattr(data, prop.identifier)

        if prop.type == "POINTER":
            if val is not None:
                # If it's a pointer to a data-block type then just return the repr string
                if isinstance(val, data_types):
                    return self._encode_pointer(val)
                else:
                    return self._encode_struct(val, prop.fixed_type)

        elif prop.type == "COLLECTION":
            ret = []
            for item in val:
                if item is not None:
                    # XXX: Faster then isinstance, if a RecursionError is raised revert back to isinstance
                    if type(item) in data_types_set:
                        ret.append(self._encode_pointer(item))
                    else:
                        ret.append(self._encode_struct(item, item.rna_type))
            return ret

        else:  # BOOLEAN, INT, FLOAT, STRING and ENUM
            if prop.type in {"BOOLEAN", "INT", "FLOAT"} and prop.is_array:
                # Check if it's a vector
                if len(val) > 0 and (hasattr(val[0], '__iter__') or hasattr(val[0], '__getitem__')):
                    val = [list(item) for item in val]
                else:
                    val = list(val)
            return val

    def _encode_struct(self, data, struct):
        ret = {}

        # Handle RNA properties
        for prop in struct.properties:
            if not prop.is_skip_save and prop.identifier not in {"rna_type"}:
                types = set(type(data).mro())
                typ = types.intersection(self._prop_hooks)

                if typ and prop.identifier in self._prop_hooks[next(iter(typ))]:
                    val = self._prop_hooks[next(iter(typ))][prop.identifier](self, data, prop)
                else:
                    val = self._encode_prop(data, prop)
                ret[prop.identifier] = val

        # Handle ID properties
        if isinstance(data, bpy.types.ID):
            id_properties = ret['id_properties'] = {}
            for prop, value in data.items():
                # Because custom RNA properties also show up as ID properties skip the ID props
                # that have the same name and value as an RNA prop.
                if not (prop in struct.properties and getattr(data, prop) == value):
                    # The value will either be a basic python type (int, string, etc.) or an IDPropertyGroup
                    # IDPropertyGroup's have the to_dict function which returns purely python representation.
                    if hasattr(value, 'to_dict'):
                        value = value.to_dict()
                    elif hasattr(value, 'to_list'):
                        value = value.to_list()
                    elif isinstance(value, list):
                        for i, item in enumerate(value):
                            if hasattr(item, 'to_dict'):
                                value[i] = item.to_dict()
                    id_properties[prop] = value
        return ret

# Use for computing the number of elements in a collection (e.g. the total number of vertices in a mesh)
def encode_collection_len(encoder, data, prop):
        return len(getattr(data, prop.identifier))

def encode_collection_pointer(encoder, data, prop):
    val = getattr(data, prop.identifier)
    return [encoder._encode_pointer(item) for item in val]

def encode_pointer(encoder, data, prop):
    return encoder._encode_pointer(getattr(data, prop.identifier))

def serialize():
    encoder = BlendEncoder()

    # Setup mesh prop encoders
    encoder.register_prop_encoder(bpy.types.Mesh, 'vertices', encode_collection_len)
    encoder.register_prop_encoder(bpy.types.Mesh, 'edges', encode_collection_len)
    encoder.register_prop_encoder(bpy.types.Mesh, 'polygons', encode_collection_len)
    encoder.register_prop_encoder(bpy.types.Mesh, 'loops', encode_collection_len)

    # Bones
    encoder.register_prop_encoder(bpy.types.Bone, 'parent', encode_pointer)
    encoder.register_prop_encoder(bpy.types.Bone, 'children', encode_collection_pointer)

    encoder.register_prop_encoder(bpy.types.PoseBone, 'parent', encode_pointer)
    encoder.register_prop_encoder(bpy.types.PoseBone, 'child', encode_pointer)

    # Nodes
    encoder.register_prop_encoder(bpy.types.NodeSocket, 'node', encode_pointer)

    # FCurves
    encoder.register_prop_encoder(bpy.types.FCurve, 'group', encode_pointer)

    return encoder.encode(bpy.data)

def main():
    import argparse
    import sys

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

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

    # When --help or no args are given, print this help
    usage_text = (
        "Export the entire blend file in json format."
    )
    parser = argparse.ArgumentParser(description=usage_text, prog="blender --background -P blend-data.py")
    parser.add_argument("-d", "--dest", dest="dest_path", metavar='FILE', required=True,
                        help="Save the generated file to the specified path")
    args = parser.parse_args(argv)

    data = serialize()

    with open(args.dest_path, 'w') as f:
        def default(o):
            if isinstance(o, set):
                return sorted(list(o))
            else:
                raise TypeError

        import json
        json.dump(data, f, indent=None, default=default)

if __name__ == '__main__':
    main()

This script will export all the RNA properties (except for the ones explicitly skipped), but some of those properties are computed at runtime for the python API and not necessary to export (e.g. the pixels in an external image.)
My question is, how can I know if a property was created at runtime and therefore should be skipped?
Edit:
If it's not possible to do entirely from python (it's looking like that might be the case) then I'm open to answers that involve changes to the C/C++ codebase as well.


text:
Invoke operator from another operator
I have an operator that needs the file to be saved before it can continue (it uploads the file but that's not relevant). Rather than just give an error message that the user needs to save the file first I would like to invoke the default save operator (with the confirmation dialog).
E.g.
import bpy
class TestOperator(bpy.types.Operator):
    bl_idname = "custom.test_operator"
    def execute(self, context):
        do_stuff_with_file()

    def invoke(self, context, event):
        if bpy.data.is_dirty:
            return bpy.ops.wm.save_mainfile('INVOKE_DEFAULT')
        return self.execute(context)

But in the example above execute() will never get called if the file is unsaved. Is there a way invoke save_mainfile with the default confirm popup and have execute() run after it's finished?
I could do something like this:
import bpy
class TestOperator(bpy.types.Operator):
    bl_idname = "custom.test_operator"
    bl_label = "Save File?"
    def execute(self, context):
        if bpy.data.is_dirty:
            bpy.ops.wm.save_mainfile()

        do_stuff_with_file()

    def invoke(self, context, event):
        if bpy.data.is_dirty:
            return context.window_manager.invoke_confirm(self, event)
        return self.execute(context)

But that doesn't use the same confirm as the save operator, I'd like it to show the path it'd overwrite and use the file browser if you're not editing a file.

Yes, that‘s possible: https://blender.stackexchange.com/a/73548

@p2or I already have an example that uses invoke_confirm to create a dialog box asking the user if they want to save. What I'm looking for is a way to call execute() on the main operator after execute() has been called on bpy.ops.wm.save_mainfile (which is called as soon as the user confirms to save).


text:
pinned vertices do no stay pinned when animating a cloth
I have created a cape and pinned the vertices I wanted to stay stationery however when I go to animate it they unpin and repel themselves from the armor they are supposed to be near. I turned down the repel and collision distance down as far as possible and it still occurs. Any ideas?

A .blend file would be nice for better analysis.

I have pasted a link to the file

@user2389 the link is gone

The cloth simulator actually uses vertex weights (1 = pinned and 0 = unpinned).
Your vertex group has been assigned with 0 weight, as can be seen by entering weight paint mode (blue = 0 weight):

Reassign your vertex group with the weight slider on 1 (or paint some weights in weight paint mode):

Now the vertex group will have a weight of 1 and should stay pinned.

In the cloth modifiers physics settings enable pinning and select the cape vertex group.

it still shoots away from the armor

@user2389 Hmm. in your file the cape is not near any armor at the start.. Could you possibly upload the part of the file with the cape and armor interacting?

I have figured it out I just had to pin more vertexes that were weighted

yes the original file was too large to upload so I had to Isolate the scene that was needed however when I did that it also re-adjusted the the male mesh and armor


text:
Wind force field not working
I am trying to get a waving effect for a flag in my animation I am working on. However when I click alt a the cloth fabric just hangs there not being affected at all by the wind. I have wind power at 163 and it is aimed right at the flag yet it still does not work. http://www.pasteall.org/blend/27552 is the link to the file.

Supplemental: Wind needs to be in the same layer with the cloth.

I am not sure what exactly the  problem is but this is my guess.
You need to decrease the mass of the flag. By default it is quite heavy.

Final Result
http://www.pasteall.org/pic/show.php?id=68256

Its set to the silk preset with a mass of .15

Ive tested it in new windows and it works just fine but for some reason it does not work in this file I've created.

If you want to upload the blend file I can take a look at it,

yeh how do I upload the file to here?

use  http://www.pasteall.org/blend/

It uses models from differing downloads off blend swap as well as elements which I created.

It's up to you to upload the file.

I already did the link is in the question

OKay I see it. That's one large blend file. in the future use copy and paste to paste the needed elements in their own blend file. This will keep the file size smaller.

oh ok didn't know I could do that awesome thank you. I had just appended them since thats what I had learned in a tutorial.

The meshes are too heavy for the wind to pick them up, I would decrease the mass and increase the strength of the wind.

I turned the masses down to .1 each and the wind up to 500 and still nothing could it be something with the settings?

wind to 1200, mass to 0.05

I had a similar problem, and my flag started to react to the wind force once I scaled it up 10 times.
The bigger the flag was (in Blender Units) the more it reacted to the wind force.
Check your scale!

I've found that the cloth seems to need to "drop" completely before it will be affected by the wind. I tried a plane hanging from the top edge and because it was already in the "dropped" position it animated straight away with a wind force of 2000 to 9000 it flapped nicely, 10000 made it go nuts. I tried with a cloak next, much more complex, and after pinning it, it took 100 frames before I got some ripples with a wind force of 9000

Also check Falloff power(my problem was: too low strength and too big falloff power).

If anyone else runs into a similar issue and comes across this thread, also please remember to make sure the Force Field is on the same layer as the cloth.

Scene size matters. If your clothes don't react to forces: go to the scene properties tab and scale up the Units. After you did it go to your cloth physics properties and you'll notice that the vertex mass has changed. Decrease the vertex mass and start the simulation

Just play with the strength, the higher the better, mine touched >900000, strange but feels awesome afterwards.


text:
IK + Pole Target {Rig} is =//= Twisting my Characters Mesh
When i apply this rig i have here to my test model.
With automatic weights. It totally twists my model.
Any clue whats causing this? I tried to mess with the poles rotation.
And i tried to apply rotation and scale.. nothings helping.
Picture:

Edit:
I found out that when i disable the Pole targets it seems to do it right.
But how can i make it right with poles enabled?

Turning on Axes for the bones can be really helpful when things twist, and/or before parenting mesh to rig. Like it seems in your case, the twist occurs when you parent mesh to rig with Auto-Weights.
I suspect a complete bone rotation in Y axis in one step, (Y axis is Up for bones)
So probably step 1 can solve it, step 2) 3) are more indepth regarding IK.

What happens if you change IK Solver to iTaSC

Sometimes adding stiffness can solve at least weird rotational behaviour.

Ok cool i will have a go at this later :) ty!


text:
Which is the better Topology? Left or Right? - [With Image Reference]
Which is the better topology for swimsuit?
Left or right.
I am thinking right because legs might move around.
But when i combine the meshes and sub-D them the left one looks better.
What do you guys think?
i started with planes to draw the line of how the V of the shape is made.
And from there i would build inwards. i also already make the center.
But you always get in trouble at some point. xP
Also is it best practice to keep every square same size?
cause sometimes i see people having way longer squares like i have at the edge.

(Was already answered with it being a choice not a fact)
  "Entirely depends on what you're doing. It can make certain things easier, like UV mapping (especially if you have to unwrap manually), and animated meshes will deform better (more predictably) if all the polys are the same size, but the renderer shouldn't care."

Its bottom part of swimsuit btw.
Ty so much everyone for all the tips.
I am trying my best to make this edit the best ^^
<3

Maybe the question can be reworded to, "What are some of the issues people face with different polygon layouts."
One answer to this might be another question:  What does the mesh look like when a Sub-D modifier is added to both meshes?  If there is a difference then you have to choose which method looks best to you.

It entirely depends on what you're making. Edge-flow is a well-studied science all its own, so there are some good articles out there about how to make those decisions, like this one.
That being said, you ask if it's good practice to keep all the polys the same size. That also entirely depends on what you're doing. It can make certain things easier, like UV mapping (especially if you have to unwrap manually), and animated meshes will deform better (more predictably) if all the polys are the same size, but the renderer shouldn't care.
The most important thing you need to do here is merge the center line into one line. Other than that, we need more info about what problems you're facing and what you're trying to accomplish.


text:
How to do Boolean operation on instance pairs with geometry nodes
I am new to this so I don't fully get everything. I want to place cylinders on a curve by using instances on points, and then on the same curve, place another set of cylinders that are smaller in size, and then do a boolean operation (difference) on those cylinders in pairs, so the cylinder on the index 1 should only do a difference operation with the cylinder on the other set at index 1. Whatever I tried, it seems that the cylinders from different indexes overlap.
This is what I have done so far:

And it looks like this:

So somehow, the inner cylinder of one index, merges with the inner cylinder of the next index and they subtract eachother somehow? I don't get it :(

You need to use a repeat zone to separate boolean operations. Or move hulls away so that they don't collide.

@MarkusvonBroady I don't know how to use repeat zones for this :(

Is it what you are trying to achieve ? https://i.sstatic.net/zNgioQ5n.png

@StefLAncien, it seems like it, but I am not quite sure, because now it seems that there is red both on the inner side of the discs, and on top. This means that it also subtracts from the neighbor discs as well, right?

Can you model manually what you want to achieve? I understand you need geonodes for parametric control, but once you model manually the desired topology, the question becomes much more clear. BTW, as per https://en.wikipedia.org/wiki/XY_problem , would you be satisfied with a solution that doesn't involve boolean at all?

(Blender 4.2.4)

To restrict boolean operations to pairs of instanced objects, the dark pink nodes are offsetting pairs to avoid overlap between pairs before the Mesh Boolean node, based on instance Index. Then the dark green nodes are restoring original positions after the Mesh Boolean node, based on mesh island Index.
Resources:
(Blender 4.2.4+)

Thank you! That seems to do the trick!


text:
File browser does not show up when operator is executed from a shortcut menu
I'm trying to create an action for the add menu in the video sequencer. I need it to open a file browser so the user can select a file to add. To do this I use ImportHelper, which works great if I trigger my action from the menu at the bottom of the Video Sequence Editor window. However, if I type ShiftA and then select the same action from the menu that pops up, the file browser doesn't show up. Is this a bug in Blender, or am I just missing something?
Here's a slightly modified version of the operator_file_import python template that exhibits this behavior:
import bpy
from bpy_extras.io_utils import ImportHelper
from bpy.types import Operator

class ImportSomeData(Operator, ImportHelper):
    """This appears in the tooltip of the operator and in the generated docs"""
    bl_idname = "sequencer.some_data"
    bl_label = "Import Some Data"

    def execute(self, context):
        print(self.filepath)
        return {"FINISHED"}

# Only needed if you want to add into a dynamic menu
def menu_func_import(self, context):
    self.layout.operator(ImportSomeData.bl_idname, text="Text Import Operator")

def register():
    bpy.utils.register_class(ImportSomeData)
    bpy.types.SEQUENCER_MT_add.append(menu_func_import)

def unregister():
    bpy.utils.unregister_class(ImportSomeData)
    bpy.types.SEQUENCER_MT_add.remove(menu_func_import)

if __name__ == "__main__":
    register()

By looking at the add menu defined in space_sequencer.py it sets layout.operator_context = 'INVOKE_REGION_WIN', this doesn't appear to carry into your menu item.
By setting the operator_context within your menu item method, the sample you provide would appear to work as you expect.
def menu_func_import(self, context):
    self.layout.operator_context = 'INVOKE_REGION_WIN'
    self.layout.operator(ImportSomeData.bl_idname, text="Text Import Operator")

Thank you so much! None of the examples I was looking at had that. Works like a charm now!


text:
How to make slime with procedural bubbles using Geometry Nodes?
I've just installed Blender 3.0 and it has renewed my curiosity for Geometry Nodes. I was thinking of what might be a fun use for Geom Nodes and the idea oozed into my head: SLIME! Because slime has these little air bubbles that move with the slime as it stretches and oozes...
Reference:

Rules for the bubbles:

They need to stay inside of the mesh volume.
Their positions should move with mesh deformations.
Bubble normals should be inside-out (as you do with bubbles inside a liquid).

Note: There probably isn't a way to make bubbles flow during a fluid sim, as the fluid mesh topology changes completely in each frame. I think that can't be helped. But if someone really clever thinks of a way, please share!
I'm looking forward to what the Geom Node wizards here can teach me... thanks!
Edit: As I'm digging through the types of Geometry Nodes here in the manual, I'm not seeing a lot in the way of volume-based nodes. But maybe the Raycast Node can be used to check if a point is inside a volume or not(?). This could be trickier than I first thought.

just in "theory" i am convinced you can do fluid sim with GN because you can control every vertex with it (via SetPosition Node). The question is: does it make sense in terms of performance and expense. So i personally would always try to go the way with flipfluids or any other way which already have fluid sims inside ;)

@Chris Interesting. It's been a while since I've done fluid sims in Blender, so I have some catching up to do. I didn't realize FLIP Fluids does high-viscosity slime type fluids as well. I'm not sure that it does bubbles inside the volume though. Are you able to provide more info on this? I guess I should open up this question to include methods beyond just GN...

yes, flip fluids has a viscosity value as well as mantaflow has. And it is still remarkable quicker than mantaflow is. So i never regret buying that ;)


text:
Geometry Nodes: Joining geometry breaks material's UV mapping
I'm using Geometry Nodes to create a sort of template object, with geometry being joined together from other objects and materials assigned to the different parts.
While creating the node setup I found that joining additional geometry breaks one of my materials. This is a material that relies on the original geometry's UV data.
They way it breaks is as follows: In the joining process, somehow the UV data is interfered with, apparently causing a Factor value of 0 to be sent to the Mix node instead of a gradient of 0-1 float values.
I created a simplified example file that illustrates the problem.
Here is a GIF for comparison (before and after joining):

Above: The cube is the original object with the Geometry Nodes modifier on it. When any other mesh source is joined (in this case an Ico Sphere), the mapping of the original object breaks, turning from a purple/green gradient to solid light green.
Does anyone know why this happens and how to get around it? It seems like it might be a bug. It occurs in both Eevee and Cycles. Thanks
 (Created using Blender 3.0.1)

This is one of the hottest known limitations right now, it's being worked on : https://developer.blender.org/T85962

@vklidu That's too bad, because a typical boolean will transfer UV data too. And simply selecting multiple objects and pressing Ctrl J will also join UV data. So I think the expectation of most people would be for UV data to carry over. Hopefully this will be improved on.

@Gorgious Thank you for the link. Nice to know it's being worked on, as many people seem to be in need of the ability to join UV data.

I deleted my comment (since it seems I was wrong) ...

I found out that if I use "Instance on points" node to add the textured object before joining the geometry with the other objects, then the uv map is preserved and works as expected.

According to Gorgious's link to dev ... Jacques is mentioning to access UV via Attribute node with specific uvmap name. Currently it works for Cycles only.
For me it seems to be working with UV Map node too ... just set UV map, don't keep it empty.

Thanks. Bummer about being Cycles only, but better than nothing. I tried it in Cycles, and when I applied the Geometry Nodes modifier it still looked okay in the viewport but... the UV Map node's data field turned red, and no map shows in the UV Editor. So I guess texture baking etc = out of the question. Still, I'm optimistic that we will see improvements on this functionality in the near future.

As workaround ... if you keep original object you can use Data Transfer modifier > Face Corner Data > UVs to get it back ... it is not efficient I know, but that is what it is.


text:
Geometry Nodes: How can vertices of a specific group be transformed in Blender 3.0?
I have some geometry I'm transforming in my Geometry Node setup. But certain vertices need to be moved differently. Unfortunately the Transform node does not have an input socket for Selection, which would allow only specific verts to be shifted while the others remain in place.
Maybe this annotated screenshot can explain it best:

So since such a socket does not exist, what can we do instead?
There is an answer addressing how to do it in 2.93, but the Attribute Vector Math node is now legacy, which changes everything.
So if you guys want to mark my question as a duplicate, go ahead - but please only do so after providing an answer to that original question that is viable for Blender 3.0+ ...Or if you want to answer my question here, of course that's fine by me too. I just would like to know how to do this in the current version of Blender. Thanks. (Oh, the awkwardness of solutions quickly becoming obsolete with frequent software changes...)

but you can use 'Set Position' node...

@calambre Heyyyy, thank you for that tip! I searched all the nodes under "Geometry", "Attribute", "Mesh", "Point"... but did not come across "Set Position". Go ahead and post that as an answer if you'd like. It completely solved my issue.  :-)

please don't get me wrong....it is not meant bad, but i think there is no solution in here for that, because it is THE "basic" node which might be the most important and used node at all. Without it you couldn't hardly morph anything in GN. And it is explained in nearly every GN tutorial and it is part of lots of answers here.

@Chris I see. Well it's fair enough to say I'm a GN n00b (because I am). I haven't followed that many GN tutorials yet. But I would not agree that because that may be considered a "basic" thing (subjective, btw) it does not deserve an answer. There are plenty of much more basic topics being asked about here on BSE that have answers and are helpful to people. A web search for transforming vertex groups led me to that outdated answer, which actually caused me more confusion. So I think an answer would be helpful. In fact... I just added one.

Voting to close my own question because I added an answer to the original one...

If the answer is for a new Blender version - I totally agree - there should be a New answer…or updated answer. Because I also am really confuse with answers of older Blender versions where Blender looked totally different (with my eyes)


text:
Geometry Nodes: How to iterate a Vertex Color gradient across geometries?
I want the geometry I create in Geometry Nodes to be generated with a Vertex Color gradient that I can use in the object's material.
In this example there are several rectangles, one original, and three more generated at each iteration of the Node Group.

Here's the inside of the Node Group:

As you can see, it's not really doing anything special in its current state. Just recursively creating a new transformed rectangle in each iteration. Brightness is supposed to get added in each iteration too, to step from black (0.0) to white (1.0), but this is not working.
In order to match the example I manually painted, the grayscale values should instead be approximately 0.0, 0.33, 0.66, 1.0.
The other (possibly greater) problem, is that despite being a property of vertices, vertex color appears not to be uniquely linked to each separate island of geometry.
If anyone knows how to do this, please share. I would like to access gradients from mesh vertices within my material, instead of having to make a separate material for each island of geometry. Thanks!
Example .blend file (Made with Blender 3.0.1)

There are a few small problems in your node tree:

your inputs and outputs are pink (= boolean) but you want to store Fac, which is a float. Boolean are either 1 or 0. No other value.

-> also inputs and outputs of your group node have to be changed
i hope/think, what you want is that?

result:

Thank you! The result is looking good! Is there also a way to do this using the Join Geometry node? Or is it only possible using Instance on Points? Because although I kept my example simple, what I ultimately want to do will involve more complex geometries, and I was planning to join them.

You are welcome. I am not sure whether i understand you right. Of course you could do a "join geometry" at the end of my tree - it would work. Or do you mean something different?

i have no idea now, how it should work because then you would have only one mesh which you cannot "separate" as you can do it with instances. I am sorry. Maybe some other GN pro's know how to do that.

I've been playing with different node setups. I feel like I'm close. Could you please take a look at my .blend? Join is working, but the gradient is spread across the vertices, without treating each iteration of geometry as having its own "step" value. Maybe the ID Node could be the key?

will your x values always be stable? so you could easily use the x values ;)

No, unfortunately it's not that simple. I'd like the group to be able to handle meshes of any shape, location, rotation, etc.

but then you node tree wouldn't work at all with different meshes because now you depend on index which if dependent on how " big" your mesh is....

Yeah, having to rely on index is the limitation. A "Set Vertex Weight" node would fix this. Too bad there is no such node (yet). Ideally we could specify the name of the vert group to edit (or create new from selection), and have an input slider for the weight value. It would also be useful if there were a way to handle the scaling of all weights of a group together. These kinds of operations are really easy when manually managing objects in the viewport, so naturally users will want to do them in GN too. A wishful observation in case devs are reading... ;-)

maan I just wanna thank you from the bottom of my heart cuz I am doing a light strip with all the individual led controlled by a color ramp and I couldn't find a way to translate the color ramp color to the leds (I just started guessing it prob had smt to do with the index) and after searching for days - I found your answer now and it's the exact solution. Thank you!!! :'D


text:
Using alpha channel of generated images for cycles
I am creating blank images within blender to add some fine detail, such as nails in wood boards. My blank image is black.
When I export the image and/or when I input it into image texture node in cycles, I cannot control the alpha channel, as it hasn't been saved.
When generating a new image, I am using all the default settings (including the option to create an alpha channel). Any suggestions on how to generate an image with usable alpha channel?

I tried it (creating a black blank image) with the default settings, but it created a very usable alpha channel. In what way is the alpha channel not being usable?

I'm not sure I understand the question entirely..
If you want an image with a transparent background,
Make sure you set the image background to completely transparent (assuming that is what you want)

When you save the image you also want to make sure you use an image format that supports alpha channels - png would be the most common.
The RGBA button enables saving the alpha channel and is only visible if the image format supports alpha.
(If you want to render the image, the RGBA button is in the render settings panel.).

You can then set up a simple material such as this:

thanks. i did not realize that i need to set the color alpha value, since i thought that black is transparent and white is opaque, but i guess an image is not an opacitiy mask without somehow making it so :)

In blender 2.75a, you must also select your Image Texture node, in the Nodes view, because you must click a "Use Alpha" checkbox that you won't find anywhere else.
You'll find that checkbox only if the Image Texture node is selected in Nodes view. Reveal the view's built-in Properties pane, if it's not already visible on the right side of the Nodes view, by pressing the N key. (Pressing N repeatedly will show/hide the Properties pane).
On that pane, you'll see a "Use Alpha" box, but only if the Image Texture input node is selected.
BTW, that's also the only place I know of in the entire blender program where you can find a reload button to reload your texture, if it changed on disk.

If you enable the Node Wrangler Add-on it, too, has a Reload Images button.  Good stuff!


text:
I'm using v2.71 and I can't find any blend sky option under the world tab
I'm using v2.71 and I can't find any blend sky option under the world tab. I'm following a tutorial that used an older version of Blender.Where is it in the newest version, or how do I set the Horizon and Zenith colors?

Make sure your using blender internal.

It's under the world panel as per screenshot.


text:
External image editor not found?
When I try to quick edit in texture paint I get an error saying that it couldn't find an image editor even though there is one (see photo)

You entered a link on your desktop.
Change the image editor to the executable C:\Program Files\Krita (x64)\bin\krita.exe (or where you have installed Krita)

this file is a link (.lnk) not the real program executable (.exe). You can get the real path in the link properties (right click you link, not in blender, select properties)

What you linked to is to a desktop shortcut (.ink), not the actual executable (.exe) which it needs to be.
I had a different issue when I got that error. For me, it had an issue with the parenthesis, so I simply renamed the ...\Krita (x64)\... to ...\Kritax64\...


text:
How do you make bullets do damagein the BGE?
I cannot figure out how to make bullets (physical bullets, not rays) actually do damage to the enemy (in a first-person shooter).  I have tried the collision sensor but I cant seem to make it work.
All I am trying to do is make it so when the bullet hits the enemy, then the enemy disappears (Edit Object: End Object Actuator).  The enemy has the physic type: Character and the bullet has the physics type: Static.  I am using simple motion for the bullet.
 What kind of properties does the bullet of enemy need if any? What should the logic bricks look like?

Your problem might be that the character is not detecting the collision from a static object. If you make your bullet a rigid body object, with all of the translations locked (rotation and location along X,Y, and Z) as in this picture,

Your bullet will have the same behavior as a static object (It will not fall due to gravity and it will not bounce off of other objects), but the rigid body type can detect collisions with a static object. Another thing you could try is changing the collision bounds on both your character and the bullet to something closer to it's actual shape. Normally, a box will work for the projectile, but for the character you will want something more precise such as a Triangle Mesh

Thank you!  the only problem is that when I change it to triangle mesh and I press P it stays for half a second and than blender crashes.  It works though you probably don't know why it is crashing

Here is what I do for my games. On each enemy you want to setup the following:
This checks for a collision with the material "Bullet", which would be the material assigned to your projectile. When it detects that collision it will take 10 LF(Life) of of the object. The second row of bricks tells it that when LF=0 the object should end.
You can change the LF in the properties (hit N), and you can change the damage of the bullet in the bricks.


text:
Collision Bounds Problem
The Collision bounds are messed up on my character and I cant seem to fix it.  It is set to Box.  I tried Triangle Mesh but blender crashes (I looked it up and this is a regular bug) and none of the other Collision Bounds work.  So basically I need it to be Box and I need it to have Physics Character.  I've centered the origin to the middle but it just messes it up and the character goes flying.

Nevermind it is working now and I don't know why...

In your screenshot the origin is not in the middle. Try using Ctrl Shift Alt C > Origin to Center of Mass


text:
How to only use a texture once?
I have a burn mark texture and the problem is that when I put it on a plane and adjust the UV mapping instead of there being one burn mark loads show up. How do I get only one?

in the texture tab under image_Mapping select Clip for the extention

@Chebhou I cant find it. Is this on cycles?

http://blender.stackexchange.com/q/1258/2217 or http://blender.stackexchange.com/q/2629/2217

Simply add a mapping node between the texture coordinates and the image texture in your nodes. Then check the Min and the Max check boxes on the Mapping node.
Those two check boxes will limit the repeating of the image. Use Min to control the side to the left of the image, and Max for the right. With both checked neither side will repeat.


text:
4 fast cores or 6 slower ones?
I have the option of 3.33 ghz 4 core processor, a 2.66ghz 6 core or a 2.93 ghz 6 core.
I know that the middle one will be slower than the last, you don't have to tell me that.
What I would like to know is what would work better? 4 fast cores or 6 slower ones? I know that if you do the math the last one is the best but how many cores can Blender use?
I would also like to know what would be the best for blender internal renderer and cycles (if there's any difference.)

Blender can use up to 8 cores, and it does.
For rendering, or baking the two most CPU intensive tasks, the 2.93 ghz 6 core would be better. The clock speed is not as important as computational power, and for that the more cores wins.
For Cycles a good GPU would be faster then any of those CPUs listed. However if you are rendering on the CPU (like me) then the same is true more computational power will win out over a faster clock speed.
Blender guru article on buying a computer for blender.

Thanks! I will mark as correct when the 2 mins are over (unless a better answer comes up)

why won't blender use more cores?

@BlendingJake meanwhile you can use 64 cores. The 8 cores were an older hardcoded limit.


text:
In Cycles, how can you make Particles Emit Starting from the Left to the Right?
I'm using the explode modifier and I want to try to make my object explode from left to right. I know you can do this with gradient textures but the only tutorial I saw either used Blender Render or was outdated. Does anyone know how you could achieve this?

You can use the same workflow seen for Blender Render

The ParticleSystem texture's editor is the same for both render engines (as it is for many things that don't involve shading properties)

That makes sense. Sorry I don't really understand all the differences between the engines yet. thanks for the answer

Don't worry, sometimes there are things not-shading related that changes between the engines (e.g. baking normals settings) because of the way they are coded, but generally developers try to keep as many things is possible in common

@Carlo FYI, see my answer here to do it without any textures.

You do not need to do anything special to the partial system. Just have the particle type set to Emitter and emitting from the vertices with Random unchecked.
The particles are emitting from the vertices according to the vertices' indexes, so if you reorder the indexes it will explode in a different order.
Reordering the indexes is very easy. Just select the whole object, then as explained in my answer here, just go to the 3D view header then Mesh > Sort Elements > View X axis (or accessible via the search menu).
That is all it takes to reorder particles. However you will now need to press the Refresh button on the Explode modifier.
Here is a animated gif showing the difference before ordering the indexes and then after the indexes have been ordered.

Nice! Surely this the fastes way to get the result.


text:
Weird bone rotation in copyRotation Constraint
I'm having a problem with this bone setup I've made. The Thing is, the bones in Y axis rotate as it is supposed to, but when in the X axis, it inverts and I really don't know why. Some images to explain:

I want the X axis bones to make the same movement as the ones in the y axis

I'm not sure, but you should try set World Space to Local Space

Under the armature object data, panel display, click Axes to true and inspect carefully.  The axis does matter. Is your goal to get a simple open and close of the box or to drive the action via a third bone?

just openning the box

Ok just did with local space to local with parent. Eheh thanks

Consider two separate bones .. one for x-axis rotation, one for y-axis rotation.
Consider pose space to pose space.
Consider keyframe of pose


text:
How to fix brush tool for sclupting?
My brush tool is not working (not even the grab one). I even tried the clip end solution, changing the values of clip start and clip end. Does anyone here have idea about what´s happening and how to fix this?

Hello and welcome, please don't use all cap, it is the online equivalente of shouting and is considered rude.

You probably need to add more geometry. Say for example you are trying to sculpt on the default cube. Select the cube, and press tab to enter edit mode. Notice how the cube is composed of just the eight corners. This means that the sculpting tools only have the 8 corners of the cube to play around with to simulate the brushes, which obviously isn't enough.
Now try adding and applying a Subdivision Surface modifier to the cube. Ignoring how it changes into a sphere, the sculpt tools now work since they can edit the existing geometry.
You can try enabling "Dyntopo" meaning Dynamic Topology in the top right-hand corner. This will add more geometry as you sculpt, but be careful as if it starts adding too much, your computer will lag.

Alternatively...You've turned the brush strength down to zero.

Thanks stphnl329 ! I trying to edit objects that were very near ( to compose a character ) , so i just put each separed part and then was able to sculpt each one on its own !


text:
command/object option window - how to recover

The small window which opens up when i execute a command goes off if i click anywhere else in the window and is not recoverable (screenshot attached). how can i get this back.

I am still a noob so forgive me if I'm wrong, but as far as I know, you can, but not for the operation you just completed (by clicking).
This command window appears after doing an operation (scale, add mesh, in your case move, etc) and allows you to set the parameters of the operation precisely by inputting numbers. When you click anywhere you complete the operation and can't adjust it anymore. But you can ctrl+z and try it again of course.
So if you want this window to reappear you select the object and hit G (for move), but then the move parameters will be based off the current position. If you put in numbers and click, you can hit G again, but now the move parameters will be based off the new position.
I hope this helps.


text:
Shading editor doesn't have nodes
I'd like to start adding a world node, but the "add nodes" button is replaced with a weird pin. What do i do?

In the top left corner of the bottom window, notice how there's a dropdown menu labelled Object? Click on that and select World.

aw thank you so much! I appreciate it!


text:
How do I stop both my path animations starting at the same time?
Hello I have been having trouble animating a scene. I know how to make the cars follow the path but my problem is that both of them start at the same time. The red car starts at frame 1 but I want the truck to start at frame 300. How do I do that? Thank you

The option Fixed Position let you control the position of the car from the starting point of the path (0) to the end (1).
To animate the position of the truck, go to frame 300 and set the value to 0, then press I to add a keyframe.
Do the same for the last frame of the animation and set the value to 1.
This method allows you to use the same path as a "Follow path" constraint for multiple objects.

I'm not sure that image needs to be quite so big...

this is the first screenshot I took with a new monitor (5k display). I will take it into account. Thank you

Wow, look at that clarity.


text:
How can I use Edge Creasing with OpenSubdiv?
I see that OpenSubdiv has been integrated but could not find any material about using it for utilizing its edge creasing capability to create harder edges in subd-modeling instead of using support loops. Of course I fiddled around but could get no result, just strange shading as if it's not working properly.
It seems to makes subd and hard edges so much easier as shown here for example in 3ds Max (video by Arrimus 3D)
https://www.youtube.com/watch?v=QFckVSyvVy4

OpenSubdiv has not been completely implemented into Blender. It is currently only used for viewport playback speed for animators.
Official Document about it's implementation
Limitations
There are number of limitations which are not resolvable with the current OpenSubdiv release and current OpenGL profile of Blender itself:

Smooth normals aren't currently correct. This goes into limitations of GLSL level we can currently use in Blender and what OpenSubdiv can provide us. It's being worked on though with high priority.
No OSX support, Historically Blender is using rather old OpenGL API and OpenSubdiv is using OpenGL 4. This makes it impossible to make Blender working with OpenSubdiv on OSX due to policy from Apple which forces everyone to drop older OpenGL code if newer API is used in application.
No UV maps support in viewport. This limitation is caused by OpenSubdiv which currently doesn't have nice support of UV mapping evaluation on GPU and has no way to calculate UVs on CPU as well.
No generated coordinates support. Generated coordinates in blender requires calculation of undeformed mesh on CPU which makes it rather really complicated to use OpenSubdiv in such configuration because all it's data is on GPU.
Tools which requires having mesh on CPU (for example snap tools) will fail for OpenSubdiv mesh. This also includes areas like geometry primitive counter in the Info header.
Currently shading is limited to a single material only. This is easy to resolve from Blender side and will happen sooner than later.
Loose edges and vertices are not supported.
Auto split is not working yet
Loop normals are not supported yet as well


text:
Whole armature moves when one bone is moved
I made an armature and when I try moving the leg bone or the hand or the body it moves the whole armature and the other mesh with it. I even tried merging all the meshes together to see if it works, but it still does the same problem. I even tried with an un-merged mesh

Could you upload the .blend file to try to help you?

authors: Лъчезар Вълчев


text:
Why are faces in my model fine in the viewport but distorted in the render?
I didn't find the mistake in my properties, perhaps somebody can help me.
This is my object in the viewport ('Rendered' shading mode):

This is the rendered result:

The problem are those distorted faces. It looks like the faces are getting shrunk.
I'm using Cycles Render, HDTV 720p, Aspect Ratio 1:1... If you need further information, just ask.

I would imagine you have a subsurf modifier on the object that is disabled for the viewport but enabled for the render.

HA! you´re great! Thank you very much!!! :) There was an inactive subsurf modifier on my pool table, i deleted this and everythings perfect :) THANKS!

It looks like you have a Subsurf modifier on your object that has been disabled for the viewport, but not the render. Either delete the modifier or disable it for rendering as well by clicking the camera icon on the modifier:

authors: Александр Волков


text:
Objects transforming with mouse movement
I create an object in blender and when I hit S to scale etc the object scales madly with the mouse movement. Same goes with rotate and other transform options.
The 3D widget simply changes to a circle, not the normal symbols.
I've reset the interface and even did a reinstall, but makes no difference.
Its make blender unusable because you try to transform something by a a few degrees or scale and it does what ever it wants.
ANY IDEAS or is this just a bug.  I noticed it only started doing this with the 2.78 update.  I also noticed that panels have move around as well but thats another story.

It matters where your mouse is relative to the pivot center before you start the scale. If you start far away from it, it will scale slowly, but if you start very close to it, it will scale madly.
You can change the pivot point in the 3D-Editor->Header->Pivot Point

And the 3-D Manipulator widget can also be changed from translate/rotate/scale.
You can switch the rotation mode from the regular to trackball rotation simply by hitting r a second time.

In previous version I use to be able to hit R for example and enter the degrees I wanted, OR it would show the 3 hoops etc without the object moving with the mouse.

You can still press r, then press x or y or z to choose which axis to rotate around and then enter how many degrees to rotate around that axis. But if you dont specify an axis, it will rotate around your current view point.


text:
Casting shadows for transparent textured material
Blend file here
I have two concentric cubes, both UV-textured, and sharing a material. The outer cube has a texture that is partially transparent.
When I render the scene, the inner cube acts as if the outer cube is fully opaque, and no light falls upon it.
I'd like the outer cube to only cast a shadow for the opaque parts of its texture, rather than all of it.

The problem seems to be the lighting. Both the ambient occlusion and the environment lighting are ignoring the transparent part of the outer cube, leaving the inner part completely shadowed.
To work around this, you could:

Use lamps. Lamps seem to illuminate the inner cube through the transparent texture fine.

Use cycles. The transparent part of the texture is lets light from environment lighting and AO as well as lamps through correctly when rendered with a node setup like this:

Bake AO in cycles (this is currently only available in development builds, but it will be in 2.71) and then use it in BI.

Model actual geometry for the outer hat instead of using an alpha texture.


text:
Why does image texture used in displace modifier not give the correct height?
I have got a custom heightmap-loader in Java, which converts each pixel of a Heightmap into a coordinate between 0 and 255, obviously with 255 being white and 0 being black.
The problem is, blender doesn't quite convert it the same.
Here's my rendering the heightmap with my own loader:

And here is the one created by blender:

Is it generally the same, White = up, black = down - But there are quite a lot of subtle differences. Certain places are higher, certain places are lower. And it generally is an incorrect mess.
To create the heightmap, I am following this tutorial. To sum it up, I create an image via a plane and use the Displace tool.
I just want an obj model which is 512 coordinates in size (ranging from 0 to 512) and has the same height as my custom generator, which simply sets the height directly to the amount of red on the heightmap at a certain coordinate.
And yes, the heightmap is black-and-white. So it doesn't matter if I get the red, green, or blue on the Heightmap, it'll be the same.
Why is it incorrect? What can I do to make it look exactly the same?

Did you see this tutorial on importing hightmaps into Blender? https://www.youtube.com/watch?v=cZxyN7esQkY I think what you might have to do is change the color space on the texture to linear, but I'm not 100% sure.

@TARDISMaker He just does exactly what I'm doing already. Unfortunately, he does it too generally for it to help me with my specific needs (of setting the height to be the colour between 0 and 255).

Yes, but did you try changing the color space? Your description sounds like a disp map that was getting interpreted with the wrong gamma.

@JtheNinja How do I change the color space?

did you set the modifiers Midlevel to 0.0?, if you expect black to be 0.0 then you should so this.  When Midlevel is at the default 0.5, it uses mid-grey as zero displacement with black being -1.0 and white as +1.0.

@MarcClintDion I did set it to 0.0 - It didn't solve the issue.

@Joehot200 in the textures panel simply change the colorspace from sRGB (default) to linear.

@NoviceInDisguise Where is the "textures panel"? Thanks.

@Joehot200 Blender Internal or Cycles render engine?

@NoviceInDisguise I don't even know what you're talking about, sorry. What were you suggesting I should do? I don't know where to click.

@Joehot200 It might show up under different conditions depending on what render engine you are using. It should show up beside the materials tab

see this for instructions for render engine. Texture Panel refers to  the Panel in the Properties Window

@NoviceInDisguise I changed it, and there was absolutely no difference. Am I changing the wrong thing? Could I have a screenshot of what I should modify? Thanks!

What you want to do is change the texture's Color Space to Linear. To do that, go to the Properties region, and find the Textures tab.
Make sure that you are editing the texture for the right thing (displace) by checking the area highlighted in blue.

Then look under Image and change the Color Space value (highlighted in red).
Linear is the lowest value on the list, and show up like this (use the one I highlighted):

When I changed the value, it didn't appear to change anything to the Heightmap in blender. Is that expected, or am I not doing something?

That is unexpected. What sort of height map are you using?

I'm not sure what you mean by "what sort". You can download the heightmap.bmp from http://www.endcraft.net/Blender

Interesting. Did you try using http://terrain.party/? You can select any area on the planet and export heightmaps that can be easily used like this.

I haven't ever used it before, though I'm not 100% sure why it's relevant right now. I'll try using it later and seeing if it's heightmaps have any difference in terms of incorrect height, but I'm not sure they would.

I have gotten them to work before, I'm just wondering if you are aware of any major issues. It would really help if we knew that so we could find a solution.

Let us continue this discussion in chat.

authors: Павел Веснин


text:
"Apply modifiers" button not appearing?
I am attempting to follow a youtube tutorial for decimating a model - I need to do this for a continuous LOD in a game I am creating.
However, in the tutorial, he uses some "Apply modifiers" button, which I can't find anywhere!
If I start up blender with the default box, I see it, but when I open a .blend, or import a model, the button disappears!
Screenshot:

What am I doing wrong here?

The button should be on the modifier itself.. Does selecting the object in object mode, then pressing Alt C > convert to mesh work?

@gamdalf3 I pressed ALT+C, but there is no "Convert to mesh" option.
I am using blender 2.7

@cegaton On that screenshot, you see that little button of a spanner? I can't see that after I import or open a model.

@cegaton My apologies - Should have done that from the start.

You need an active object in order to do thing like apply modifiers. Click on an object with RMB to make it active (it should appear with a yellow outline).

@gandalf3 Heh, that fixed it. Such a stupid mistake. I am just such a blender newbie :(.
Thanks!

The apply modifier button will be on the modifier.
Blender 2.9x
In Blender 2.9x click on the top triangle to apply the modifier, or use Ctrl+A.

See: How to apply a modifier in V2.9+
Blender 2.7x

You have to be in object mode to apply modifiers. Applying the  modifier does not work on multiple selections, only the active object gets applied.

THANK YOU. The fact that you need to be Object Mode, not Edit mode, to apply a modifier (which is an Edit) is bizarre.

For those interested, the v2.9 method is still the same in Blender 4.

@jm3 And everyone in old forum threads is just saying "press the "Apply" button", as if it was the most obvious thing to do (and back in those versions it was)! Made me nearly pull all of my hair out!

Make sure the object you want to edit is active (yellow outline). Usually the active object is always the last selected object, however sometimes you can end up without an active object after doing things such as importing.
To make an object the active object, click on it with  RMB (use ⇧ Shift RMB if you want to preserve the existing selection).