text:
Fluid Simulation with Forces Blender 2.9. How do I get useful results?
This is about the built in Fluid Simulation with Blender 2.9
Yes I do see the effect of the gravity force and [force[shape curve]].
Will other forces work with Blender?   Such as Harmonic?
When I try to use other forces I get undesired

Explosion Splashes Messes
Splatters Droplets which seem to pass through obstacles
Increased Liquid (Visual Inspection with doubt.  I am not sure if Blender provides that measurement)

At the moment, I am seeking visual results not scientific results.
Is there some typical action I must take to get more flowing results?

Probably not.
Blender is for SFX. Stuff that's good enough to fool the human eye, but not precise enough for simulations that give scientific results.

Explosions can be due to obstacles that aren't solid enough. Make them really thick, thick enough to go out through the domain, if you can.

Droplets going through stuff might be fixed by increasing the particle size and/or increasing the time steps (so that the simulation can detect the collision even if the droplet is travelling very fast)

I don't know what to do about the last one, it just happens and you have to compensate for it.
You'll probably just have to forget about precision. For visualization and proof of concept it's probably fine (even if you have to tweak it and cheat here and there), but there's no true precision.


text:
Change the Starting Point on Bezier Curve?
A Bezier Curve was generated by a Text to Curve operation.  Active Spline Cyclic U was chosen by this operation.  The Curve appears closed just as most text glyphs do.
Now I would like to change the starting point on the curve.  Actions taken

closing the curve (Which seems to be detected by Blender and maybe defeated)
making two adjoining points buttressing  the destination point
deleting destination point

So far this attempt has failed.  What actions should be taken?
I have hand edited this as a workaround yet this is not a half ideal situation.
Thanks

I have updated the answer in the linked duplicate with additional methods

source: Stack Exchange

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

sort: votes


text:
Image Editor and Render Panel ... Pixel Click Color Information
When a Blender User Clicks on a Render or an Image the user interface show RGBA info.
Please see image below.
There are two pieces of information. One is marked [CM].
Perhaps this is Color Management.
I internet searched for a documentation link to explain this information ... I could not find it.
Is there a documentation link to explain this information? Can it be provided?  Thanks.

I'm sure there are quite a few answers already on this site, but just to summarize while the correct duplicate shows up: On the left is Scene Referred values, on the right (CM) are the values after the color management transforms.

Does this answer your question? What do these numbers mean?

No. It definitely does not answer my question. I asked for a link to Blender Documentation.  The link  provided in a comment also uses many terms not explained.  I will wait for a more explanatory answer.  I am requesting a link because there is a possibility there will be a more complete explanation with links.

Documentation is useless, but here it is: https://docs.blender.org/manual/en/latest/editors/image/introduction.html#main-view

Which terms are unfamiliar to you?

How to see RGB and XYZ image info in Blender 2.8?

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


text:
Simplest way to drive a pose bone's global location
When you drive a pose bone's location, you're actually driving its local, rather than global location (I guess that's true for any location, but still worth mentioning).
I've been trying to find the easiest way to drive the global location.
I already know I can find the global location using either of these methods:
poseBone.matrix.to_translation()
armature.matrix_world * pb.matrix * pb.location

So I thought that I'll write a custom driver function that will find the global location and drive the local location values according to a converting back from global-to-local.
But I can't seem to convert the global value back to the original local value. I tried:
armature.matrix_world.inverted() * pb.matrix.inverted() * globalLoc

And just:
pb.matrix.inverted() * globalLoc

But I could not get that original local value back. Since the order of these mutliplications is important, I tried to re-order the multiplicated variables in any arrangement possible but no luck.
I'm open to other methods for achieving this or any suggestions on how to solve it this way.

I already know I can find the global location using either of these methods:

Both will not give you the correct global matrix. The first lacks the armature object transformation and the second is twice multiplying the pose_bone location - it's in pb.matrix already. So the way to get global location is:
pbone_global_loc = (armature.matrix_world * pbone.matrix).to_translation()
And the way to get the pbone matrix back is:
pbone.matrix = armature.matrix_world.inverted() * pbone_global_loc
If the pbone_global_loc is 3x3 make it 4x4 with:
pbone_global_loc.to_4x4()

Eventually the solution to getting back the local from the global location was  using the inverted compound matrix: (armature.matrix_world * pbone.matrix).inverted() * globalLoc

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


text:
Triggerring left click events via python on 3D view screen
I want to be able to emulate a user clicking on a point on the 3D view screen with the left mouse button from a particular angle.
The goal here is to snap the 3D cursor to the volume of an object from that projected point (something that blender does very nicely when used via the UI, but would probably be more than a bit tricky to do in other ways).
Is this possible? If not, which approach can get the same result?

You could try casting a ray from a specific angle, and see where on the mesh the ray intersects.
Check the mathutils library for the function intersect_ray_tri
mathutils.geometry.intersect_ray_tri(v1, v2, v3, ray, orig, clip=True)

Blender API intersect_ray_tri Function
Here is some code I found googling:
http://blenderartists.org/forum/archive/index.php/t-154521.html
def CheckIntersections(mesh):
     intersects = 0
     obj = Blender.Object.GetSelected()
     origin = Blender.Mathutils.Vector(obj[0].getLocation("worldspace"))
     ray = Blender.Mathutils.Vector(0,0,20)
     print "Shooting ray from ",origin," towards ",ray
     for f in mesh.faces: # for each face
          v = f.verts # get vertices
          intersectionpoint = Blender.Mathutils.Intersect(v[0].co,v[1].co,v[2].co,ray,origin,1)
          if intersectionpoint != None:
               print "Ray intersects face at ", intersectionpoint
     intersects = intersects + 1

If you know the vertices of the object you want to position the 3D cursor on, you can select those verticies (1 or more) and snap cursor to selected (with more selected, it will go in the center (average) of the selected vertices).

Thanks! Although from an initial read of this function's API, it seems that it doesn't apply to an entire mesh object, but to a specific well defined triangle. Is there a similar function for intersections with a mesh or am I misunderstanding something?

Object.ray_cast()? In the next Blender release, there will also be BVHTree.ray_cast().

Yes honestly it is slightly more complex than I lead on, but I think it's a more robust method if you can get it to work. http://blender.stackexchange.com/questions/9073/how-to-check-if-two-meshes-intersect-in-python seems to have some code that may be useful. Its like you have to convert all faces to triangles, then loop through each one.

Thanks beiller,
Although it seems that function CoDEmanX mentioned might be a simpler solution. Thanks!

Of course, I didn't see that function! Looks nice good luck,

@beiller Do you know how I can do this for clicking on nodes? If so, could you please take a look at my question here and see if you can offer a solution? I think this should be the only way I can activate a node.

@Amir, I've seen your question, will try to find time to answer this week

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


text:
Blender 2.8: dynamically set particle locations via python
In Blender 2.7 it was possible to set particle locations dynamically as demonstrated in this answer.
In 2.8 particle data isn't up to date unless evaluating the emitter via the depsgraph as shown in this bug report.
This does provide up to date data about the number of particles and makes the individual particle location accessible, however trying to set this value does not update the view and seems to have no visible effect, although accessing the same particle location shows a change has been made.
In 2.7 we were able to force a scene redraw to fix this, any way to update the depsgraph or anything similar to manifest these changes?
Here's the code snippet I'm trying to get to work (requires adding a cube object named 'Cube' with a particle system that has a particle count of 50):
import bpy
import numpy as np
from mathutils import Vector

p = bpy.context.depsgraph.objects.get('Cube', None).particle_systems[0].particles

locations = np.random.randint(-10,10,size = (50,3))
locations = [ Vector(co) for co in locations ]

for pp, loc in zip( p, locations ):
    pp.location = loc

# None of this works
bpy.context.depsgraph.objects.update()
bpy.context.depsgraph.scene_eval.update()
bpy.context.depsgraph.scene.update()
bpy.ops.wm.redraw_timer(type='DRAW')

Object.evaluated_get()
In answering Get particle location using python came across this one.
Note this will work with instanced object or collection particles. Not those rendered as halo.
Test script, set object with ps as active.  Sets all particles on current frame to location (1, 1, 1)
import bpy
from mathutils import Matrix

context = bpy.context

dg = context.evaluated_depsgraph_get()
ob = context.object.evaluated_get(dg)

ps = ob.particle_systems.active
po = ps.settings.instance_object

for p in ps.particles:
    p.location = (1, 1, 1)

I'm currently getting this error:
AttributeError: 'Context' object has no attribute 'evaluated_depsgraph_get'
Blendfile: https://blend-exchange.giantcowfilms.com/b/6186

Need version later than whence scene.update() was replaced. Can confirm it works in 2.80.74.

Downloaded the latest build from https://builder.blender.org/download/ (from June 26, 2019). Now the script doesn't pop an exception, but the particle locations aren't affected either... anything else I'm missing?

DL'd file Oops didn't check with halo render.. ... works ok with object or collection instancing. better edit in

Nice, indeed works well with objects, cheers!


text:
How to show a tracked video in 3D view?
In the Movie Clip Editor I have tracked a video. Now when I go back to the 3D view, I can see that my camera is following the trackings, however, I can't see the video.
How can I display a tracked video in 3D View?
PS:
I'm new to Blender, so please forgive me if this question already has an answer and/or if I'm using the wrong terminology...

You can do this using background images, which are hiding at the bottom of the properties panel (toggle with n)

Thanks @GiantCowFilms, I'm not sure what I am doing wrong here, please see this screenshot: http://postimg.org/image/oyd4cmr19/

Try going into the camera view (numpad 0)

For the sake of completeness on this site, I am extending my comments to an answer.
To view the footage from the motion track in the camera, go into camera view Numpad 0, and then add a new background image. To do this go to the bottom of the properties panel, check background images, add a new one, and then set it to movie clip and select your clip.


text:
Old 3D paint mode instead of Project Paint
How do I switch off the Project Paint mode? The Project Paint mode is on by default and it seems there is no way to turn it off for painting around corners without projection.

It's no longer possible to disable Project Paint mode - the option was removed as of version 2.67.  Specifically:

Disabling projection mode is no longer possible in 3d viewport. This was exactly equivalent to simply painting in the image editor, so it was removed as part of the painting code refactoring.

https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Paint_System
However, this really isn't such a bad thing.  The best option, as far as I'm aware, is to enable Face Selection Masking for Painting while in Texture Paint mode.

With this enabled, you can now right-click on each face of your model (or Shift+RMB for multiple faces) to limit your brush strokes to those surfaces only.
Similarly, you can also use selection tools that would typically be available elsewhere, such as Circle select (C), Box select (B), or Select Linked via L while hovering mouse cursor over a surface to select the entire UV island with one button.
Whichever way you do it, your brush strokes will be limited to the selected faces.

The one downside is that this won't immediately give you the performance boost you might have appreciated by disabling Project Paint mode in the past - but hopefully that'll prove to be less and less of an issue as Blender continues to be optimized and hardware gets more powerful.


text:
Mode problem after reopening blend file
I have a problem with the mode after reopening a blender file (using Blender 2.74.2). When I run the following code:
import bpy

scn = bpy.context.scene
bpy.ops.mesh.primitive_plane_add(location=(0.0, 0.0, 10.0))
bpy.ops.transform.resize(value=(12.5, 12.5, 1.0))

# Delete the object
bpy.ops.object.delete()

# Close the scene and reopen it.
bpy.ops.wm.save_mainfile(filepath="/home/ma/Desktop/tempdelete.blend")
bpy.ops.wm.open_mainfile(filepath="/home/ma/Desktop/tempdelete.blend")

bpy.ops.mesh.primitive_plane_add(location=(0.0, 0.0, 0.0))
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.transform.resize(value=(12.5, 12.5, 1.0))

the script gives an error message and the 3D view is in a strange kind of mode, it displays "object" mode but behaves like "edit" mode. (see picture)
 Can anyone help me to figure out what the problem is? I would like to work (with python) on the added plane.

When I run 'bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.transform.resize(value=(12.5, 12.5, 1.0))' directly in the Blender Python console, I don't get the same error.

related http://blender.stackexchange.com/questions/51494/how-to-bring-the-context-back-after-running-read-homefile

What about replacing the save and open with one call to bpy.ops.wm.save_as_mainfile(filepath=filepath)


text:
Purge unused data (e.g. particle system, or groups) by script
How can I completely remove a objects (e.g. particle system or groups used in particle systems) in blender using python?
The problem is this: I have a script, with which I create a scene (e.g. adding some normal objects and some group of objects with a particle system). For a research study I would like to repeat that that several times, without restarting blender. So I can create a scene, delete everything, e.g. with a script like this:
import bpy
scn = bpy.context.scene
for obj in scn.objects:
    obj.select = True
bpy.ops.object.delete()

If I rerun the script to recreate the scene with objects using particle system, the latter is not shown in the scene anymore (only the placeholders of the particle system). Now I'm not sure where exactly the problem lies, but I guess not everything is immediately deleted, running the script above. Only the startup of blender helps (but that's not what I want) or pushing the purge button. The purge button seems to start the command:
bpy.ops.outliner.orphans_purge()

But I can't get this piece of code to run in the console. It says that "the context is incorrect". Is there a way to purge the unused data by python script? Thanks a lot for any help.

Possibly useful: How do I completely remove an image from my .blend file?

For the second part, bpy.ops.outliner... operators expect to be run from the outliner, running them from the text editor or console with give you a "context is incorrect" error.  http://blender.stackexchange.com/a/6105/15543

@batFINGER: I checked that link as well, but was not successful with implementing it, my blender crashed without any error message. The author of that post gives a hint to that problem "...which require scene bases - if you don't provide a reference to them...". Unfortunately I don't know how to provide the required reference in bpy.ops.outliner.orphans_purge(), so blender crashes.

@David: That worked fine. Saving the scene and reopening it removes all the "orphan data". Thanks.

The following python script solved the problem in that case (all the orphaned data was removed). After that, the objects with particle system can be rebuilt and the particle system is displayed properly.
import bpy
scn = bpy.context.scene
for obj in scn.objects:
    obj.select = True
bpy.ops.object.delete()

bpy.ops.wm.save_mainfile(filepath="/...../test.blend")
bpy.ops.wm.open_mainfile(filepath="/...../test.blend")

To permanently delete curve data blocks that have no users  without reloading the project file (which can be bit problematic at times), you can use this python code:
import bpy
from bpy import data as D

for block in D.curves:
    if block.users == 0:
        D.curves.remove(block)

It'll iterate through all data blocks of type "Curve" and delete them if they have no users.

This also works in 2.80. To remove objects linking to the block bevore removing the block itself: bpy.data.objects.remove(obj, do_unlink=True) does the trick.

Works in 4.0 as well.

You can remove all unlinked data blocks with the following solution. This way you can make sure there will never be any memory leakage what so ever and you will not need to save a .blend file and reopen it.
First remove the meshes/objects with the following code:
for obj in bpy.context.scene.objects:
     if obj.type == 'MESH':
         obj.select = True
     else:
         obj.select = False
 bpy.ops.object.delete()

where you can check type against any of the following values according to [this documentation][1]:
[‘MESH’, ‘CURVE’, ‘SURFACE’, ‘META’, ‘FONT’, ‘ARMATURE’, ‘LATTICE’, ‘EMPTY’, ‘CAMERA’, ‘LAMP’, ‘SPEAKER’]

Then you can execute the following code snippet to remove all the unused blocks. This way you don't have to close/open Blender or save/open a .blend file:
for block in bpy.data.meshes:
    if block.users == 0:
        bpy.data.meshes.remove(block)

for block in bpy.data.materials:
    if block.users == 0:
        bpy.data.materials.remove(block)

for block in bpy.data.textures:
    if block.users == 0:
        bpy.data.textures.remove(block)

for block in bpy.data.images:
    if block.users == 0:
        bpy.data.images.remove(block)

IMPORTANT NOTE: It looks like that there is some dependencies between some data blocks such as mesh, texture, image and materials. If you do not remove the data blocks on the highest level of the hierarchy, you will not be able to remove other data blocks or you have to take the risk and remove data blocks with users more than 0. So make sure you use the code above in the following order to remove data blocks. This way you can remove all unlinked (users == 0) data blocks:
remove meshes --> remove materials --> remove textures --> remove images
The followings also have data blocks:
bpy.data.curves
bpy.data.lamps
bpy.data.cameras

This is more relevant to how you can prevent memory leakage in Blender

How this answer is different to unfa's answer 2 years ago? Better suggest an edit. Also: if not block.users: is more pythonic.

@brockmann My answer is more comprehensive and is an extension to his answer :)

If it's just an extension (which is obvious), it's better practice suggesting an edit @Amir

@brockmann There is also a subtle point in my newly-updated answer :) I totally believe that my answer is completely distinct from unfa's answer in the sense that it provides information that he never did :)


text:
Normal Map ... Format Structure?
This link ..
https://docs.blender.org/manual/ru/2.79/render/blender_render/textures/properties/influence/bump_normal.html#:~:text=Normal%20maps%20in%20Blender%20store%20a%20normal%20as,%280%20-%20255%29%20to%20Z%20%280.0%20-%201.0%29
..  States ..

Normal maps in Blender store a normal as follows:
Red maps from (0 - 255) to X (-1.0 - 1.0)
Green maps from (0 - 255) to Y (-1.0 - 1.0)
Blue maps from (0 - 255) to Z (0.0 - 1.0)

Is this accurate ?.. The page was originated with Blender Render from a past version ... I would prefer a more recent version.

Is it correct to say Blue is the Y Component of XYZ since the Blender User Sees Y pointing towards the user in the user interface?
I have not found the similar discussion in 2.83 .. yet.

The camera is aligned along the Z axis, so it is correct to say Blue is the Z component.


text:
3D View Render Preview not in sychronization with texture paint, Cycles Render appears correctly
Blender 2.83.2
Cycles Render Engine
If I have both an Image Editor and a 3D View in Texture Paint
User Experience for Different 3D View Modes

3D View Solid Mode Interactive.. 3D View is updated and Image Editor Updated
3D View Material Preview Interactive... 3D View is updated and Image Editor Updated
3D View Render Preview  [ Not ] Interactive... 3D View is NOT updated and Image Editor Updated ⚠

Transparency was my emphasis today. Brush Erase Alpha and Add Alpha
Does the dependency mechanism ...topological sort and texture painting .. allow correctly updating in the 3D View ... for the bullet point marked ⚠ ?  I do see work occurring in the 3D View.  I do not know what is the correct expectation.
If I nudge and poke Blender by switching render modes in the 3D Viewport
Shading ..
from Rendered Preview.. to Material Preview .. back to Rendered Preview... then
I can see the correct results in 3D Viewport.  ⍖ File Save Required.⏻
An image on disk and a mask image and Shader Editor are used.   One static on being modified in texture paint. The mask image ..which is just and image with Alpha is used .. it does not have a special designation.  I have saved the modified file which is a mask.  For interactivity I would not want to save it all the time.
This appears in the console .. I am not sure if it is related.
Unsupported mode: OBJECT
As well my GPU is now rejected by Blender. So I would expect slower updating.


text:
Blender 2.82 Crashes often. What should I do?
I am getting crashes with Blender 2.82 multiple times a day.  I cannot pin point a specific action.
For example it crashed a few minutes ago while attempting to save an image file.  Is there some actions I should not be taking in 2.82 or are there some known states of Blender which cause these crashes?
From the Blender.org website.
The following builds have the latest features and cool bug fixes. They can be unstable and mess up your files. Use at your own risk.

I also have issues, like crashes and totally black windows, even with small projects (Nvidia gtx 970, Windows 10 Pro).

The usual first step is to ensure that the graphics driver are updated. If the problem still occurs, you will have to find a step by step instructions how to reproduce the issue. A bug report can be created through Help > Report a Bug in Blender.


text:
Best way to fix this mesh?
I exported this CAD model from a SolidWorks assembly using eDrawings in STL format, then imported into Blender:

As you can see there is alot of bad geometry. I have already done the following:

Removed any double vertices
Converted Quads to Tris with ALT+J
Mesh -> Clean Up -> Degenerate Dissolve

But I'm still left with a bit of a mess. Adding a Decimate modifier in Planar mode might be able to fix some of this but I will still be left with a less-than-perfect mesh.
Any tips on how I can make this any better? The model will be UV-unwrapped and imported into Unity.

Have you tried a Remesh modifier? They aren't perfect, and can be a pain to tweak right, but you might get more useable geometry by combining one with a Decimate modifier set to Unsubdivide.

If you mean less than perfect in term of the exact volume, than this is problematic for numerical reasons already. A treshold is needed at some point to determine which edges can be removed.
The order in which you use the operations play a major role. As you mentioned, the Decimate Modifier in Planar Mode is probably your best bet for this. Note that dissolving and decimating will be similar in this case, but I would try Decimate first and then Dissolve in the next step.
Also don't use Convert Tris to Quads before using Dissolve or Decimate, it will make the geometry more messy. It should be the last step and probably guided by hand. Selecting some important loops and using sharp/seem edges will help to get cleaner Quads. Check Compare Sharp or Compare Seam.
`Beautify Faces" might help, but might make it worse aswell. Trying can't hurt.
You might also play with the export settings and try a different file format in SolidWorks.


text:
Script for splitting a mesh into n components along z axis
I'm trying to divide a mesh into multiple parts along the z axis. I've followed another tutorial and managed this, which divides the mesh into 2 parts, but I can't seem to divide it into more than two. Quite new to blender scripting so I'm not sure how to fix this. Any help would be appreciated, but the solution does need to be a script. The code I'm using at the moment is below.
import bpy, bmesh
from bpy import context as C

bpy.ops.object.mode_set(mode='EDIT')

bm = bmesh.from_edit_mesh(C.object.data)

edges = []

for i in range(-10, 10, 2):
    ret = bmesh.ops.bisect_plane(bm, geom=bm.verts[:]+bm.edges[:]+bm.faces[:], plane_co=(0,0,i), plane_no=(0,0,1))
    bmesh.ops.split_edges(bm, edges=[e for e in ret['geom_cut'] if isinstance(e, bmesh.types.BMEdge)])

bmesh.update_edit_mesh(C.object.data)

bpy.ops.mesh.separate(type='LOOSE')
bpy.ops.object.mode_set(mode='OBJECT')

Thanks!

My guess is you have scaled the mesh and haven't allowed for local space for the bmesh operator(s).  Eg if you add a prim cylinder and scale it by z 10 fold, it's local space will still range between -1 to 1 for z for each vert coord. Running the script will only give the 0 plane cut.
Multiplying the plane location by the inverse of the objects matrix world will put the cuts into local space.
import bpy, bmesh
from bpy import context as C
from  mathutils import Vector

# matrix world inverse
mwi = C.object.matrix_world.inverted()
bpy.ops.object.mode_set(mode='EDIT')

bm = bmesh.from_edit_mesh(C.object.data)
geom = bm.verts[:] + bm.edges[:] + bm.faces[:]

for i in range(-10, 10, 2):
    j = mwi @ Vector((0, 0, i))        # Blender <3.90: mwi * Vector((0, 0, i))
    ret = bmesh.ops.bisect_plane(bm, geom=geom, plane_co=j, plane_no=(0,0,1))
    bmesh.ops.split_edges(bm, edges=[e for e in ret['geom_cut'] if isinstance(e, bmesh.types.BMEdge)])

bmesh.update_edit_mesh(C.object.data)

bpy.ops.mesh.separate(type='LOOSE')
bpy.ops.object.mode_set(mode='OBJECT')

Alternatively apply scale before running splits.
bpy.ops.object.transform_apply(scale=True)


text:
combine objects by name in scene into one object
In my scene, I have multiple objects with the following names:
Verts
Verts.001
Verts.002
Verts.003
Verts.004

I want to combine all of these objects into one mesh which I can then export out as an stl. For what it's worth, the objects are just point clouds, with no face or edge information.

You can use the startswith() function to select all the objects that stqrts with Verts and join them into one object :
import bpy

bpy.ops.object.select_all(action='DESELECT')
objects = bpy.context.scene.objects
for o in objects:
    if obj.name.startswith("Verts") :
        obj.select = True
bpy.ops.object.join()

the joined object doesn't show up in the scene though

I changed some of the code such that it works for me, based off of responses to this question
http://blender.stackexchange.com/questions/13986/how-to-join-objects-with-python


text:
creating n random points on face of mesh
I'm trying to select 400 or so random points on the face of a mesh using a script (just on the face, not inside the volume) but I'm not sure how to do that.
I've tried looking into the following function:
bpy_extras.mesh_utils.face_random_points(num_points, tessfaces)

but I'm not sure how to use it in a script.
Currently, I've tried running it as such:
import bmesh

obj = bpy.data.objects[1] #Gets the object
me = obj.data
bm = bmesh.from_edit_mesh(me)
faces_select = [f for f in bm.faces if f.select]
bpy_extras.mesh_utils.face_random_points(400, faces_select)

but I get the following error:
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\modules\bpy_extras\mesh_utils.py", line 533, in face_random_points
    verts = f.id_data.vertices
AttributeError: 'BMFace' object has no attribute 'id_data'

and I have no idea what that means. A simple script to select an object from bpy.data.objects and select 400 points from its faces would be really helpful.

as it is written bpy_extras.mesh_utils.face_random_points(num_points, tessfaces) takes tessfaces not faces and to get access to the you'll have to calculate first :
obj = bpy.context.object #Gets the object
me = obj.data
me.calc_tessface() # recalculate tessfaces
tessfaces_select = [f for f in me.tessfaces if f.select]
bpy_extras.mesh_utils.face_random_points(400, tessfaces_select)

I think this works, but I'm not sure how to get the points to display in the scene. Sorry if this is a really simple question, I'm really new to blender scripting

@paragbhtngr you want to see the points in the 3d_view or just have there coordinates ? you should know that these points are not vertices ( real points ) they are just calculated and you'll have to create them to be visible

Yes, I want to create vertices from these points to be visible in the 3d view. How would I go about creating vertices from these points?

Actually, never mind. I found the answer over here:
http://blender.stackexchange.com/questions/23086/add-a-simple-vertex-via-python


text:
Can one access object position from previous frame in geometry nodes?
I'm working on a music visualizer. I baked the sound of a kick drum to an empty's z axis. I would like to access the position of the empty, of both the current frame and a previous frame or earlier point in time, in order to animate an object to visualize the sound. I know how to access the empty's current position, in order to affect the position of my visualizer object. However, can I also access the position of the empty a few frames earlier? I would like to create a "ghosting" effect, where a semi-transparent copy of my visualizer follows the original visualizer. In other words, the copy should be a few frames behind the original. Is this possible in geometry nodes?

No. No past history is available at a frame. unless you have a way to calculate the old position you can’t access it.

I don't know a way to pass information between different frames. But this may help:
Duplicate your empty. Shift the animation of the duplicate on the time line and use the duplicate for animating the ghost.

Thanks. Yes, I was thinking that I had to do something like this, outside of geometry nodes. Hopefully access to time can be incorporated in everything nodes soon.


text:
Transparent PNG on video?
i am trying to put a transparent PNG image onto a video clip in the video editor. I have tried to mark them as alpha over, but it did not work. How do i do this?

Is the image you added above the movie strip in the sequence editor?

Yes, it is over.

When that happens I check the Transparent image using Gimp to make sure it does have an alpha layer.  Also if you lay the transparent image into the VSE all by itself and check the viewport, a checkered pattern should appear in the transparent areas when you press on 'render animation'. (Top left of window under 'render').  Another factor might be that when mixing, you're using the OpenGL render instead of Blender's internal version.


text:
Animated text on the ring from LOTR
Can anyone point me in the right direction on making animated text appear like the inscription on the ring, from Lord of the Rings? You know the part where Gandalf pulls the ring out of the fire at Frodo's house and the inscription has this "burn in effect as it appears?
Many thanks

There are plenty of tutorials around for the ring its just a matter of simply adding an animated mask over the textures for the effect to appear gradually

Hi @DuarteFarrajotaRamos yes good idea. I ended up spending a little more time learning from a couple of tutorials and it has done me good :-) Now I can acheive the effect I was after. Thanks for replying!


text:
python code for existing node chain blender
I have created a complicated Cycles material with the node editor.  I am currently building a python script to recreate this material.   Is there any way to "export" python to create a material I have already made in the node editor?

Do you need to use python to re-create it? You can append or link the material to another file.

I have written a tool for that, but it has only features I needed for my nodetrees. The code is ugly, but might give some pointers for you in case you'd want to write something like that yourself. Maybe there are other - more complete - tools like that I'm not aware of.


text:
Cycles, shade based on proximity to another object's geometry
I am trying to make a texture that changes color based on how close one object's geometry is to another.  I've faked an example below.

I intend to use this on objects more complicated than planes, so pre-computing distances isn't reasonable.  Ideally I'd like to be able to provide a list of objects that the proximity-shader is affected by.  In particular, I don't want an object's proximity to itself to affect shading.

Dynamic Paint is the perfect tool for what you're trying to achieve.Here you find all information on the topic you nead.In case from some reason this tutorial will disappear,I'm talking about this:

Could you explain how to use the dynamic paint as input to a Cycles shader node?

@Jason Siefken - it's a subject for a whole tutorial, so I'm not able to cover it in details here. To make long story short, you can save canvas changes as image sequence and use this sequence to influence shaders mixing.

You can use "Point Dencity" texture with "Object Vertices"


text:
Adding specific information to file output
Is there a way to add extra information to the filename that is created by Blender? For example, if  I'm rendering images of an animation, is there a way to have Blender automatically add something like sample size to the file name it creates? Something like %samp?
I'm trying to end up with something like
C:\Blender\rendered\images\my_animation_00001-2000.jpg
Where 2000 is the sample size that was used for that particular image.

Not directly through the UI, as far as I know, but it may be possible with scripting through the Python API

Blender only adds the frame number to the filename. I expect you can do what you want by setting up a handler that sets the render filepath.

You can add an application handler to be run before rendering that sets the output filename with the desired information. You can use python's string format to fill in the filename from a template string.
import bpy

def set_filepath(scn):
    scn.render.filepath = '//renders/animation_{0:04}-{1}.jpg'.format(
            scn.frame_current, scn.cycles.samples)

bpy.app.handlers.render_pre.append(set_filepath)

By pasting this into a text block in blender and adjusting the filename for the file, it can then be setup to run when the blend file is opened so that it will always be available when using the file.
Note that the handler will set the filename, that means you adjust the filename in the script - not in the render settings.


text:
Colors in rendered image are too dark?
I was halfway through modeling a character when I decided to open a second viewport and see how it would look rendered. I really like how the texture and colors look when I have the model set as a solid, but when I try to render it, the colors are too dark and some objects seem faded, and a lot less solid.

Is there any way that I can make the rendered image look more like the view I normally see? I am using Blender version 2.77. Does anybody know what I could try to fix this? I can post screenshots of my settings too if that helps, but I wasn't sure if the problem was my lighting or the materials, so here are both:

This is my first time modeling so I'm sorry if there is a really obvious solution! I would really appreciate some help. (also I can show more of my settings if needed)

Solved the color problem by enabling ambient occlusion, thanks for your reply tho Billy. I still need help with the flickering colors at the barrel.

You need more lights.  Currently, you have one dim light.  Try creating a sun lamp, and putting it near your character.  This will make it a lot brighter.


text:
How to make a grid properly and render it faster?
Should I use grid fill tool and then use wireframe modifier, or subdivide the mesh? I want to make a grid and then use wireframe modifier.

Make a plane, and add the subsurf modifier. Change the subdivision algorithm from Catmull-Clark to Simple. Now add a wireframe modifier. You can increase or decrease the density of your wireframe grid by changing the number of subdivisions in the subsurf modifier.


text:
Is it Ok if i leave vertices alone?
I'm ongoing with my Private model again . This time it more complex and i'm adding some material in this work So here my problem

If i leave vertices like that just to keep the shape of the gun's curve , Will it be a problem when i subdivide model and add material and texture later ?

What do you mean by "alone"? Are you going to fill the holes with faces?

Yes it will probably be a problem with a subsurf. Try to get rid of them by connecting the last loop's vertices to an angle, trying to stick with 4 sides polygons as much as possible. Keep in mind that rendering with opengl uses triangles, always, to represent a mesh, for instance a square is vertices 0, 1, 2 (top, bottom, right) and 0, 2, 3.

I understand wanting to get a definitive answer on this, but couldn't you just add a subsurf and see the result yourself?

i already did that . it turn out ok but im not sure it will be stable when i adding material and rendering because this is a first time i will add material and texture in my 3d model


text:
3D Stereo - Saving both Left and Right render images
I wrote this code to save the render buffer:
bpy.ops.render.render(scene="Scene")
bpy.data.images['Render Result'].save_render('D:\\render.png')

But it doesn't work if I have a stereo camera.
Generally, if I click on Image > Save As Image Blender saves both the images adding _L and _R suffix to the filename if the Stereo 3D is enabled.
Some suggest on how to solve?

If you want to save the render result you can simply use the keyword argument write_still = True.
The saved image will conform to your view format settings in the render options panel. If you set the view format to Individual, the following lines will save two images named render_L.png and render_R.png.
bpy.data.scenes['Scene'].render.filepath = 'D:\\render.png'
bpy.ops.render.render(write_still=True)

It works.
Actually I prefer to use filenames different from the one blender use to save the rendered files....but I could use it as a temporary solution.
Thanks for the suggest binweg!

The suffix is defined in Render Layers > Views > File Suffix, you can edit that... @Give_me_back_Softimage_bastard


text:
How can I crop and export parts of STL Objects?
I'm a blender beginner. I have an .STL of an anatomical figure and I need to crop a small chunk of it and export it in a separat .STL file, but so far I haven't found anything quite relevant on the web. Since I'm a blender-nobb, I figured out I don't even know what to search for exactly.

What do you mean by "crop"? I'm only familiar with that term in a 2D setting and I see a couple different ways it could apply here.

I have a maxilary 3D scan and I need to select a tooth and export it in a different STL in order to create a few different final STLs with that tooth in different positions from the original one (either rotated or moved a few mm right or left).

Have you tried looking into the Boolean modifier?
If you object is a closed, watertight, manifold mesh you could use Boolean operations to break it into chunks of the desirable parts.
Just create a new closed watertight mesh object that as a shape or volume that engulfs or includes the part of the STL you want to keep and use it in a Boolean operation to intersect with the existing mesh and extract the part you want.
You can also try the Knife Project operator if a simpler cutting or slicing of the original geometry in one direction will suffice to obtain what you want.
You can use something as simple as a plane or a bezier curve to cut your geometry in the desired way.

Edit If your object is already composed of separate parts but all joined in a single object you can simply enter edit mode, select them all press P to separate them and select the option All loose parts to divide them into different objects.


text:
Armature doesn't properly bend arm mesh
I have a problem. I'm making an animation for project and all I need is to animate bending arm. I have a mesh, but when I add armature and pose it it doesn't seems good. Any ideas what's wrong?

Post you .blend.

Here You are ;) http://www.filedropper.com/bending

At first glance, there are multiple reasons why your rig could be bending sharply, but if you try moving the upper arm, things should become a little clearer.

Your model has weird bends because of your automatic bone envelopes rig.
The vertices in the range of the bone envelope need to slightly affect the vertices outside of the envelope as well, producing a falloff.
You are using a modifier with automatic bone envelopes, so you will have to manually weight-paint the bone influences, or assign vertices manually with vertex group rigging.
It is going to be tedious due to the sheer number of vertices your model has. However, you can make rigging easier for yourself in the future by following a very important rule: BE CAREFUL WHEN APPLYING SUBDIVISION SURFACE MODIFIERS.
Applying a subdivision surface modifier is destructive and cannot be reverted. You will have to make your 3D model from scratch if you are unable to weight paint every single vertex to each bone or use the vertex group method.
The cubes in the top image are all the same model; the desired result has an un-applied subdivision surface modifier, and the sharp bend result has an applied subdivision surface modifier. It is better to work with un-applied subdivision surface modifiers since there are less vertices to select and navigate around when rigging manually, which you will have to do to fix your rig.
Automatic rigging options, such as the checkbox in the armature modifier, or parenting a mesh to an armature with automatic weights, sadly, do not always work.


text:
Remove Object and part of object its overlapping
How would I remove the selected object and the part of the other object taken up by it?

Boolean operations are what you need https://www.youtube.com/watch?v=lDweCpDAB_o

Welcome to Blender Stack exchange, you might need to edit your question to explain better what you are willing to achieve. Remove the selected object might mean separate it to become an independent object, or might mean subtracting the selected mesh from the unselected.

Possible duplicate of Cut mesh at intersection

authors: Евгений Черных

authors: Росен Пенчеджиев


text:
How do I make an object move along a path in either direction?
I'm trying to make a garage door open or close by rolling up or down like they usually do. I know how to make an object follow a path in one direction along a curve using constraints, but I need it to move in both directions. Is there a way to do this?
Also, when I try using the Follow Path constraint with a NURBS Path, the object attached to it only goes about a third of the way along the path and then lifts off and heads out into space. By reducing the number of keyframes, I can get it to follow the path just long enough to roll up like I want it to, but that seems to be a poor way to do this, and it still only allows the object to go in one direction.

"in either direction" what does that mean?

Please include a Blender screen capture to clarify your success and problems.

A screen capture won't help much, since I don't know how to capture this problem.

I want to move an object in both directions along a curved path. I.e. move it in one direction along a curve, as well as move it back in the other direction. Garage doors go up and down along the same path. That's what I'm trying to simulate.

There's a better way to do this, using array modifier and curve modifiet, I'm away from my computer now, but you can find lots of answers using this method.

Also using follow path, I am sure there's an option to reverse the curve's direction.

http://blender.stackexchange.com/questions/510/how-can-i-duplicate-a-mesh-along-a-curve if you use this method, you can slide the object and it's instances along the path usig G, you can move it in both directions.

I started out trying to use the array and curve modifiers, but it didn't want to work no matter how I fiddled with it. Then I tried using the Follow Path constraint as described in countless tutorials, posts, and manuals. That only allowed me to move one object in an array, destroying the array in the process. I wanted the door to consist of panels that swiveled on the curve, but I'm stuck with having to use a single large panel that can only go one direction.

Select your curve. Put more frames in 'Path Animation' and tick 'Follow'.
Select your object. Add 'Follow the Path' in Constraints
Specify curve and hit 'Animate Path' button.

UPD: "and then lifts off and heads out into space." -- make sure you don't have any animation moving your object off it's original center position. If you have two or more animations combined, affecting center point of object, it will cause all sorts of strange movement.
UPD2: Door.blend uploaded http://www.pasteall.org/blend/41938

That allows me to move it in one direction only. I want it to move back and forth, as I've tried to explain twice already.

Just resize your Nurbs Circle (the curve to follow) into the line.

I give up. Nobody is reading the question properly and I can't state it any clearer.

Blend file uploaded.


text:
Combine several textures into one
This might have been answered before, but my problem is a little bit more complicated. I'm porting some WW2 warship models and they have lots of different small models like cranes, anchors, lifeboats and whatnot. Each one of those models has its own material, making it absurdly complicated to export them all as textures one by one.
This is the problem I'm currently facing, as you can see on the right there are dozens of individual materials, and my goal is to join them all into a single one if possible so I don't have to export them one by one:

I want to add that those materials have both a diffuse and a normal map texture, so I'd like to know if it's possible to combine all the normal maps into one single texture as well

I think that if you want to keep the quality of the textures maybe you need to make 4 or 5 materials, or a very large texture for all. For one material you need to join a couple of meshes, make a "Lightmap Pack" unwrap and then a bake of the textures, that way you'll have a single texture for all the meshes you have joined

I've already joined all the meshes into one single object, so could I just unwrap the whole object to get all the materials into a single texture? And what about normal maps, each one of those materials has one and I also need to get one single texture of it to convert it to .vtf later.

I don't see the point. If you export to obj it will export all your materials including the textures. If you were to combine all existing image textures into one single huge image texture, then you'd have to edit all UV-Maps to fit to the new image texture. That would be even more work to do....

I'm exporting to .smd for the Source engine, and I'll need to convert each texture to .vtf manually. There are approximately 70 materials in there, each one having both a diffuse and a normal map texture, so I would have to manually convert 140 textures. I think editing the UV maps would be at least twice as fast.

Converting textures can be done with a script, editing the UV maps is hard manual work.

The problem with those textures is that each one of them is in a separate folder, so unless there's a script that can read the .blend project, fetch each texture and copy them to a single directory for later bulk-conversion using VTFEdit, I don't think it will work.


text:
How to cut all faces in a specific direction from a point?
I'd like to be able to cut the faces belonging to a mesh, from a specific point,  in a specific direction. For example, if I were trying to cut an icosphere from it's center at an angle 30 from the x-axis, like so:

How would I do this? More importantly, how would I create a script to automate this process? It seems that running
    bpy.ops.mesh.knife_tool()
only creates an error that reads
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules\bpy\ops.py", line 189, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.mesh.knife_tool.poll() failed, context is incorrect

and I can't seem to find any more information about what I would need to do to use it in a script.
Currently, I only need to make vertical slices, from a specific point to the edge of the mesh.
Thanks for any help.

This question does not talk about scripting, but it shows how to cut any angle.

Alright, that's pretty helpful, and it'll at least get me started in the right direction. Thanks.

I'd would use a boolean modifier to go around this. It's a pretty easy way, not quite with the script though but works.
Start  by creating a very thin cube and rotating it by any angle you want, but make sure its cutting through all your mesh. Then give your icosphere a boolean modifier and set this new cube you have created as the mesh to use for boolean operation, don't forget to set the operation to difference.
p.s. It won't work with a plane as a boolean, only cube, just like that:

I found a great way to do this, though it doesn't use any scripting. I'm still trying to figure out how to re-create this process with python and the bmesh module, but this is how I've done it otherwise.
Lets say you want to cut a UV sphere at an angle of exactly 31 degrees cw from the x axis.

First, hide the UV sphere with h. Then, create a new mesh -> plane. Give it a 90 degree turn about the X axis.

Then, toggle it into edit mode. With everything selected, translate it 1 unit in the X direction.

You'll notice that the origin of this plane is still the same, but the geometry of the plane is moved over. This is useful, since it means that the geometry of the plane can be used to cut our UV sphere is the exact spot and direction we want.
Now, exit edit mode, and rotate the object about the Z axis by the 31 degrees we  mentioned earlier. Notice that one edge is still an the origin.

At this point, you can reveal your original mesh with atl-h. Your cutting plane  should extend beyond the limits of your other mesh, and you can achieve this using the scale operator.

Now, make sure nothing is selected. Then, holding shift, select the cutting plane, followed by the UV sphere. Press tab to enter edit mode, and numpad 5 then numpad 7 to enter Top Ortho view. From here, you can use the Knife Project tool, making sure to check the cut-through option.

Hiding the cutting plane at this point, you can see that a new set of edges has been created on the UV sphere at the intersection of the cutting plane. Since it was done in top ortho view, only one new edge is created per face, and with cut-through checked, it also cut the faces at the bottom of the UV sphere.

Now, if you want to cut the UV sphere at a location other than its origin, all you need to do in translate the cutting plane to that spot.


text:
Calling bpy.ops.object.bake_image() gives error "No valid images found to bake to"
I'm trying to write a script that'll automatically combine different textures each with a unique UV into a common UV.
This is a portion of my script so far:
# Create new image
bpy.ops.image.new(name=currentImageName, width=1024, height=1024)

# Set bake margins
bpy.context.scene.render.bake_margin = 2

# Set the UV coordinates
ob.data.uv_textures['SmartProject'].active = True

# Specify the bake type
bpy.data.scenes["Scene"].render.bake_type = "TEXTURE"

#Bake the image
bpy.ops.object.bake_image()

When I call this last line, however, I get the error "No valid images found to bake to," in spite of the fact that I just created a new image. I can't find any way to specify which image I want Blender to bake to.
Thanks for your help

I think so too, but it doesn't seem like there's any clear way to do that. bpy.data.image doesn't have an member functions which let you set an image as 'active.'

I've also seen people suggest I use ob.data.uv_textures['SmartProject'].data[0].image = bpy.data.images[currentImageName] to set the destination image, but then I get the error basically saying that uv_texture[' ... '].data has no elements, so I get an indexing error. -

Is this different to the previous question you asked? http://blender.stackexchange.com/questions/54108/texture-baking-in-a-script-how-do-you-specify-the-destination-image

No, but that one didn't get any responses, I figure because I submitted it on a Friday afternoon.

You shouldn't post your question more than once. If you have more information then you can use the 'edit' button below the post.

Also, you need to '@' people for them to be notified of your comment, e.g. @RayMairlot

There were a few apparent issues.
The first is that the I needed to use the function
ob.data.uv_textures['SmartProject'].data[0].image = bpy.data.images[currentImageName]

to select the correct image. This wasn't enough though, since if the object 'ob' was in edit mode, data would have no elements, returning an index error for data[0].
The next issue was that data has many elements, so I had to actually loop through them setting them all to the current image. The correct code block is now:
# Create new image
bpy.ops.image.new(name=currentImageName, width=1024, height=1024)

# Set bake margins
bpy.context.scene.render.bake_margin = 2

# Set the UV coordinates
ob.data.uv_textures['SmartProject'].active = True

# Specify the bake type
bpy.data.scenes["Scene"].render.bake_type = "TEXTURE"

# Exit edit mode
bpy.ops.object.mode_set(mode='OBJECT')

# Set the target image
for d in ob.data.uv_textures['SmartProject'].data:
    d.image = bpy.data.images[currentImageName]

# Enter edit mode
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')

#Bake the image
bpy.ops.object.bake_image()


text:
Bake a texture from a geometric property of the faces in a mesh?
I'd like to be able to generate a Black and White texture using the distance the distance each face is from a specific point, scaled between zero and one (i.e. the closest face is a value of one, while the farthest face is a value of zero, while all other faces are linearly interpolated). The calculation for each face is easy enough to do using python, but is there a built in method of applying these values to a texture? Like a face-by-face texture bake?

One pixel per face? You can generate an image fairly easily in blender and set pixel values. Here's an example: http://blender.stackexchange.com/questions/47378/save-every-other-pixel-of-an-image-at-half-res/47594#47594

This script will generate a vertex color map, where each face's color is represented by a grayscale value matching the normalized distance of that face's center from the cursor, inverted (closer is brighter, farther is darker).
You can run this, then bake the vertex color to a texture file to get the image texture based on the distance. You can of course also use another object instead of the 3D cursor as your distance reference.
import bpy

o = bpy.context.object
d = o.data

if not d.vertex_colors:
    d.vertex_colors.new()

color_layer = d.vertex_colors["Col"]
curloc = bpy.context.scene.cursor_location

distances = [ ( p.center - curloc ).length for p in d.polygons ]

# Normalize distances
normalize      = lambda x, minX, maxX: round( ( x - minX ) / ( maxX - minX ), 2 )
minD, maxD     = min( distances ), max( distances )
distNormalized = [ 1 - normalize( v, minD, maxD ) for v in distances ]

for i, poly in enumerate( d.polygons ):
    for li in poly.loop_indices:
        color_layer.data[li].color = [ distNormalized[i] for c in 'rgb' ]

Baking with a lamp at the position of your specific point ? Approximated solution... to lower the faces orientations impact I added a transparent shader here.
The bake option can be diffuse or combine.
The result is not normalized between 0 and 1. But I hope that can help.


text:
"Current render engine does not support baking" when calling bpy.ops.object.bake(type='SHADOW')?
I'm trying to write a script that creates a texture of the shadows on an object. It's supposed to create a new image texture, set the selected object to edit mode, perform a UV smart project, then bake the shadows using " bpy.ops.object.bake(type='SHADOW') "
However, when blender gets to this line, it gives the error " Current render engine does not support baking ". Even though if I omit this line, and click the bake button under the Render properties menu, it works fine.
Also, calling the line " print(bpy.data.scenes["Scene"].render.engine) " just prior to the bake function call prints "BLENDER RENDER", which to me implies that the expected engine is in fact selected.
What should I do to fix this?

A quick look shows that the operator you might need is bpy.ops.object.bake_image. Have a look if it's giving you the same trouble.

That is helpful, but now I have another issue with setting the destination image, receiving an error message "No valid images found to bake to." Any help with this one?

I am encountering the exact same problem of no valid images found. Were u able to solve it?


text:
How can I create a single image texture from several different, overlapping image textures?
I have a bit of a specialized problem to solve.
I have a mesh model, created from laser scanning data. Also from that data are 10 different equirectangular images of the scene being scanned. Here's an example of one:

I've erased some tripods and added a transparent buffer at the bottom to make the image properly equirectangular. I also already know the UV maps to align my scanner mesh with all of the different images.
The trouble is that when I try to add all of these images to the material for my mesh, Blender slows down and eventually crashes well before I add all 10. I think it has to do with the fact that each one is a very large image texture (8168x4085 pixels). Also, probably due to the many different UV maps, the render of the mesh looks pretty awful. Here's an example using 4 image textures:

Clearly, there's something wrong, but I haven't any idea what it would be.
I think a good solution to these problems may be to bake a new texture that contains all the colour information of my ten textures, but I don't know how I would do that without loading all 10 textures at once. I'd need to do it sequentially, one after the other. I'd also like to consider the alpha values in each texture, to accommodate for the fact that some portions of the textures are transparent.
Any advice on this would be helpful, I'm really stuck here.

Map the textures, then bake.

I don't know if there is a method in Blender that let you achieve all at once, but it should be possible to bake one texture at time and then mix them in an external editor. They'll be surely more easy to handle.

If blender is crashing these textures may be too big for it to handle or beyond the memory available on your machine. I have very little experience in baking, but have you considered maybe using a lower resolution version of the images instead? Make a copy, scale them down in some Image editing software and then try re-rendering. You probably wont notice the quality loss unless you are doing some serious closeups, and the good news is scaling them down should reduce memory required exponentially, so you may not need to reduce them all that much. Powers-of-two are usually memory friendly

I would create low res versions of the image textures, then bring them all into Blender and apply them to the object material with the various UV maps. (If you bake out the combined low res image you'll have a starting point for after the next step when you have all your high res texture bakes.)
Then bring in the high res image textures (one at a time) and bake out the high res UV texture as applied to the image.
Once you've baked out all the applied high res textures, you should be able to combine them all in an external image editor (alphas included if baked out properly). You can use the previous combined low res bake as a reference.
Then you'll have a single high res image texture. If Blender still cannot handle working with this single high res texture image, you'll have to lower the resolution until Blender can work with it. It should be fine on shots that are not too close to the object in your scene.


text:
Strange black lines in import of FBX file from Maya 2014
We tried to import an FBX file and it shows very strange black lines. Are these normals? Is it going to cause an issue? Also, trying to zoom in into this model makes it disappear. Just can't get close enough to analyze anything.

Those lines indicate a parent-child relationship.
It's actually a good thing, because it means the hierarchy of your model will still work in Blender! :)
If you find these lines annoying, open up the properties sidebar of the 3D Viewport by hitting N, open up the Display Panel and disable "Relationship Lines".


text:
I have some very weirdly pieced together materials, can I merge and separate them?
I have some very odd Materials in an OBJ file made from photogrammetry. I was wondering, can I combine them all and then separate new objects, materials, and textures?

Welcome to BSE, adding more details, attaching screen shots, will help getting more accurate answers.

you can UV unwrap any object and map a texture on it


text:
Rendering what's in viewport
I am trying to animate what shows up in the viewport moving around in wireframe mode. I would like to keep the vertex highlighting 'look' (in edit mode wireframe) while panning around the camera. Can anyone advise how to accomplish this? I can render in 'wireframe' but I can't get the vertex highlighting texture.
Thanks

This can be done using OpenGL render while in edit mode. Click the buttons in the header, or Info > Render > OpenGL Render:

Result:


text:
Bake Built-in Function in Graph Editor to keyframe?
I have a sine wave I generated in the graph editor for a pendulum and I was wondering if there's a way to bake the sine wave in a certain range to keyframes so I can easily edit the beginning and ending frames. Ideas?
Spencer

You can always use the cycles modifier in the graphs animation editor. Besides that, I'm not entirely sure what you're trying to do.

When I can't find a direct or inbuilt way of doing this, I simply 'trace' over the generated waveform in the Graph editor.  i.e. create an animation  channel for the pendulum and in the editor, add a keyframe for each of the sine wave's + or - extemities and adjust each of those to match the other.  If they're not being cycled you could probably make a few and duplicate those in the Dopesheet.

Further - I've had a play around with this and baked audio to keyframes which produces a pure curve in the Graph editor but no keyframes.  I'm assuming this is what you've come up against.  A curve without keyframes. I selected the object concerned and in the "Object" menu, selected -> Animation -> Bake action".  In the bake panel you enter the frame range you need, plus tick all boxes EXCEPT the one that says "Overwrite existing keyframes" or words to that effect in your version.  That converts the raw curve to a keyframed curve and might do the job for you.


text:
Tube Deformation Animation with Pill Passing Through
I'm making a medical video featuring a robotic pill passing through the human digestive tract. The animation features the pill sliding down a cross-section of the esophagus and small intestine. I'm wondering if anyone has an idea of how I would create the deformation effect of the pill pressing against the wall of the tube. For example, the pill is larger than the diameter of the tube, when when the tube is relaxed, but when the pill passes through, the tube stretches to fit the pill as it slides through the tube. I'm trying to find a more procedural way of going about this to avoid shape-keying the whole thing. Any ideas?

You can search for Dynamic Paint. Pill as a Brush, Tube as a Canvas with displace effect. https://www.youtube.com/watch?v=pGujs4z2C6E

Interesting approach. I'll give it a shot

You can also create your Answer here, so others can learn from you. Thank you keep this site useful :)

I looked up the Dynamic Paint approach that @vklidu cited and it worked very well. Blender 2.8+ changed a few things, which actually made this task easier. There's a displacement option directly in the canvas settings for the object, and when everything's set up right, it works great, and procedurally, is flawless.

Someone downvote probably for very low info, Usually step by step is expected with screens illustrates process. Thank you keep this site useful.


text:
Heat Flare Ideas?
I've been wondering for a while how one would go about creating this heat flare effect around the Starship so I would like to reach out to you guys to see what your techniques would be to go about this.
Thanks,
Spencer

Personally, I'd model the basic shape of the flare around the ship, then use a mixture of VFX elements that you could download online along with some gradient, noise, and colour ramp nodes driving the colour and factorial of a mix shader for the emission and transparent parts

yeah technically you have to model that, maybe use a smoothed mesh around the object, with a shrinkwrap modifier with a vertex group to limit it in some areas, and a displace modifier to get some little warping, and then a procedural material that you may animate for the flame...

Here is a try, I've created 2 envelops that contain the rocket, they are lightly deformed by a Displace modifier, and I gave them a variation of the same kind of material, which is basically a mix between Emission and Transparent, and a Noise as factor, that is stretched on the length, and moves with an empty as Object in the Texture Coordinate. This Mix is mixed with another Mix so that the trace fades on its length. At the end I gave a bit of Glare in the Compositor to make it glow a bit.

One way you could do something like this is with a Cloth Simulator, combined with a shader.
Start by setting your object at a desired angle, and then adding a plane above it. The plane should be subdivided - I find 100 subdivisions works just fine.

Enable cloth physics for the plane under the Physics Properties tab. Also, you must enable "Collision" for the rocket object under the Physics Properties tab as well. Play the simulation and freeze it at a frame where the cloth looks like a proper "heat emission", or whatever seems close.

Apply the cloth modifier, and to make it more smooth, give it a Subdivision Surface modifier (one level of subdivision works fine), and shade smooth.

Then, give the cloth a material and head over to the shading tab. As you can see from the image, the idea I was shooting for was to make an alpha mask that would cause the texture to show (already slightly transparent) at the base of the craft, and slowly fall off from there. I was able to achieve this effect by using a Wave Texture, constrained to the Z-axis, and an ugly mess of inverts, MixRGB Nodes's (to alter the grey levels), and ColorRamps (to change the cuttoffs) - I could have done much better, but I'm short on time. The point is, you can do better than I did.

Anyway, I used this "mask" I created as both a mix factor for the colors, as well as an alpha factor. Pay attention to the blend modes highlighted on the right. I also had to use the inverse of this mask as a mix factor between the Principled BSDF and and Emission Shader (looking now, I didn't need the inverse if I had switched the positions of the inputs on the Mix Shader, but at least this way it makes for an orderly looking graph).

Because the "rocket is reflective" the effect can be "enhanced" by the placement of lights in the scene. The final result looks like this:

As I said, this was a rushed effort - only meant to demonstrate the method. I'm certain you can achieve better results than this with a little tweaking.


text:
Cannot get fur on hands
I have a character I am applying fur to and all seems to be working well except for his hands and feet.  I am applying fur to his hands and feet using the weight paint mode with the hands in total red.  The hair/ fur emitter setting is at 2000 and children have been added with interpolation. I am using Blender 2.75 with Cycles render.  I can get fur on the wrists but the hand and fingers do not appear or are so short nothing appears.  Here is a picture of my problem.  Any suggestions would be greatly appreciated.

You may want to try the latest build from our buildbot, some issues here were fixed recently (both recent regressions and old problems).

Thanks for the help...found the problem. I had some polygons that were turned inside out and the hair was growing inside.


text:
How to decrease vertex and Face ?
Everyone . This is my private work. I'm trying to upload this model via SketchFab.com bbut this model got too much data and too much Face
Anything i can do to reduce face and vertex ??

Have you tried the Decimate Modifier?

Do any objects have a subsurf modifier that can be reduced or removed? For instance, small detail items with 2 or more levels that may only need one or none.

Decreasing subdivsions and removing inner faces is definitely the best way

There was a day when I thought anything over a million vertices was a lot :) Time flies.

I would say the best thing you could do would be to decrease the amount of subdivisions on faces which are less likely to be seen, So for instance the chain, yes they play a valuable role in telling the story of the tank but when a texture is added you don't need as many faces.
So just think of spaces that people wont be able to see. Like the back part and the inside or even underneath it. But great bloody Model mate, I can see you like Battlefield 1.
Also for the pins/bolts/rivets along the tank, are they spheres? If so change them to Hemisphere's.

Great advice , Thx you man . and by the way ,this model has been built before battlefield 1 release but i still looking forward to build some model base on battlefield 1 :)

No worries mate.


text:
I cant render this Grid
I'm trying to create my first 3d model with material . so i pick up my radio to be my guide . There is a problem that i cant solve . i tried to create a grid in front of the radio but when i render it for testing i cant see that grid

and im not sure i did the right way to create this grid . I just use plane and then subdivide it 10 time twice ! and then use wireframe modifier to create tiny hold in the grid  AM i doing it right ? Plz give me some advice Thx you :)

Can you see the little camera right to the object grid in the outline view. Click to re-enable render.

Click this button:

The if the little camera is grayed out, it means that the object is not visible in the render
If the eye is grayed out, it means that the object is not visible in the preview

Woah !! i didnt notice it was disabled :P Thx by the way


text:
How to scale a mesh evenly without causing the faces to intersect?
I'm still pretty new to Blender and 3d modeling in general so I probably don't have the right vocabulary to describe exactly what I'm trying to do, but I hope the question is clear enough.
What I need is to scale a mesh evenly but without creating intersecting geometry as shrink/fatten tool does. In other words I want the scaled mesh to fit neatly inside/outside of the original unscaled one.
Here's a mesh off thingiverse that is complex enough to illustrate the issues I have when using either scale or shrink/fatten tools.

As you can see the duplicate mesh that is simply scaled along the axes naturally doesn't fit inside the bigger one at all, and the one edited with the shrink tool while being kind of closer to what I want intersects both on itself and with the original mesh.
I've been stuck with this for a while now and would be grateful for any tips you can provide.

Use Inset, then select inverse and delete.

ALTS is to scale along the Normals and if your vertices are all on the same plane they should only move up and down. If not, select all and scale the Z axis to Zero, and then remove doubles - just to keep things simple.

You could start by trying to scale the model just on the X axis and then the Y and see where the distortion starts. After that you will probably need to proportional scale - and it might be handy to turn on connected. You can also move and rotate proportionally.

What you might be thinking when you say 'scale evenly' is probably more correctly offsetting. There are tricks and work-a rounds but most software I have come across runs into trouble with intersecting surfaces.

Yeah, offsetting was what I had in mind, thank you. Ctrl+F>Solidify seems to work fine for that.


text:
Problem with Texture on Plane
I've got a little problem. I tried to put a texture on a plane, but now it looks like this.

It looks very buggy and its cut at the half of the plane. How can I fix this?
Thanks for your help.

There is a much easier way to project an image onto a plane.

Enable the images as planes addon under 'user preferences'
Press 'SHIFT + A' -> Mesh -> Images as planes

Then search for your image and voila!

This does not really answer your question but it should work out fine for you I guess.
If you really need to fix the problem you're facing:

Get into 'edit mode'
Select all (press 'A')
Go to top view in ortographic projection
Press 'U'
select 'project from view'
Go to image editor en scale your UV's if necessary
Done!

If you still have problems after these steps, try recalculating the normals.
(shortcut: 'CTR +N')

Go into edit mode with tab, then double press a to select all the vertices. Then press u and choose Unwrap. Then switch to the UV Editor panel and move the vertices around, scale them, etc until you get the image you'd like. I do not currently have access to a computer, but when I do I'll provide screenshots to explain what I mean if needed.


text:
How can I have a seperate texture and UV map for each of my different vertex groups?
I have ten different image textures, and I have sorted each face in my mesh into 10 corresponding vertex groups. I'd like to associate each group with their image, and have a unique UV map for each one. How would you do this? How do vertex groups and UV maps interact with textures?

They don't, as far as I know vertex groups and UV coordinates are totally independent. What are you trying to do, can you post a screenshot of what you want?. If I understand correctly to assign a different image to each face you don't need vertex groups or even multiple UV coordinates, layers at all. Simply unwrapping each face independently as an island and assign a different material to each face, each material will hold it's own image. A basic Unwrap > Reset should probably suffice

You add multiple materials to an object, then assign a material to selected faces


text:
How do you specify the name of a new vertex group?
Pretty simple question, it's pretty easy to create a new vertex group using bpy.ops.object.vertex_group_add(), but I can't find any way to specify the name of this new group without editing it in the Properties menu. Maybe I'm blind, but it just doesn't seem to be obvious to me.

You can use  obj.vertex_groups.new(name="mygroup") instead where you can specify the name while creating the group.
if you need to use bpy.ops.object.vertex_group_add() and want to specify the name after that you can also set it as follows :  obj.vertex_groups[-1].name="mygroup"

Easier method discovered by a newbie: click on "Weight" (directly beneath, where you would change the default value away from 1.000) and then press tab to scroll through the names of the vertex groups and change them accordingly. I think this is a bug. There's a similar workaround for the name of particle groups in the Active Particle System Index: click in the reusable name slot beneath (above "Emitter"/"Hair" buttons) and then tab through the index.

FYI, this is not a bug. Tab is a standard way to navigate through input field. and the question was about to rename a group using Python. If you want to rename it directly using the gui, without using tab, you can double click on it.

You only need two lines of code, one to create a vertex group with a specific name and the other to assign the selected vertices to this new group.
import bpy

# your code here

# New Vertex group from selected vertices

bpy.context.object.vertex_groups.new(name='New_Vertex.000')
bpy.ops.object.vertex_group_assign()

here my full post:
How do I create a vertex group from selected vertices in edit Mode with Python (Blender 2.8)?


text:
Rigging Challenges for fur and curves
I am having some challenges rigging and know here has to be a simple answer to this.  I created a furry figure but right now just placed the bones and linking, noticing the fur is not folloing the object when I move the bone but follows the object the fur is attached to.

Also, I am noticing ridges that are not smooth when I move the bone with the object attached as shown...there has to be a simple solution to this problem.
Thanks, any help greatly appreciated.

particles(fur) doesn't update that fast try alt-a or a quick render it should be fine

This is a good answer. It definitely deserves some elaboration.

Thanks for the help but that didn't solve the problem.  The problem turned out to be my particle systems being in a wrong order in the modifier stack. I am still having challenges though with edges produced when I rotate the bone  at junctions.  I am using a graduated weight paint near the joints to smooth it out but is still seems that when I turn a bone, the object still has an edge on it when I turn it as shown by the image in the original post


text:
An alternative to time.sleep()?
I am trying to create a game in wich there are 2 threads running constantly, one for the car controls and another one for determining the speed. The speed is calculated by comparing the car's current position to the position 0.1 seconds after (for wich I use time.sleep(0.1))
The thing is, I want the thread that determines the speed to start again only when is has finished, for this I use threadSpeed.isAlive().
But i think that when i use time.sleep, the thread shows up as not alive and so it starts generating many times, messing the program and throwing errors, so the question is: Is there a way to generate a delay without time.sleep? or is the problem totally unrelated? Thanks.

Why do you want to calculate the velocity by yourself? It's already provided by the API with getLinearVelocity
Alternatively - in case you really want to do it yourself - you could use the "Skip" Setting in the Always Actuator to tell Blender it shall execute your own velocity calculation only every n-th game loop.
Hope this helps!

It makes not much sense to use asynchronous processing within a synchronous environment unless you expect it exceeds the available time.
I suggest you stay with the proven concept:
Time period = 1 logical frame
Calculate controls once per logical frame
Calculate speed once per logical frame.


text:
delete one by one the vertices of a curve?
I have a spiral shaped nurbsPath, and i need to delete each vertex from first to last, one for each frame of animation. Can anyone come up with a phyton script to acomplish this? Thanks.

You don't actually want a python script to delete points on your curve. If you delete the points on the curve they will be gone, you will need to create new points or reload the blend file if you want to run your animation a second time.
I think animating the curve's bevel factor is closer to what you want.

On frame 1, right click the "start", and "insert keyframe". On frame 100, add another keyframe. :D Animated.

Thanks for the answers, is not "exactly" what I needed, but very useful :)


text:
Moving one leg moves the rest of the armature
https://gfycat.com/ContentLividBullmastiff
I did a simple rig following a tutorial but when i want to move its legs using ik, every time the thigh moves, the whole body follows, i already checked the weighs and that is not the problem, any idea what could it be?
P.S: The problem is solved when I un-parent the thighs from the hips, but I cant leave it that way...

Hi tacofisher welcome to Blender SE.  What's the length of the IK chain constraint set to?

Does changing the chain length fix it?
In the Properties Editor->Constraints->IK
https://www.blender.org/manual/rigging/constraints/tracking/ik_solver.html

that fixed it, i had it set to 0 so it moved all bones but changing it to 2 fixed the problem, thanks!


text:
Merge two curves into new one like rhino
Hi guys Im trying really hard to find the best way to model an egg chair, and I came across a tutorial from rhino: https://youtu.be/1-rQqb921w0?t=9m4s That given 2 curves it does the wizardry of bounding them together.
Does blender have a similar modifier, curve option that can perform the same?
Thanks for the help

Rhino is a NURBS based modeling application, Blender has very basic support for NURBS, with limited tools , it can't be modeled that way in Blender. Look into the Bsurfaces addon for similar workflow https://blenderartists.org/forum/showthread.php?225190-Bsurfaces-v1-5 or model it properly using traditional mesh subdivision.

@DuarteFarrajotaRamos True, I'm just trying to see if anybody as a trick that I'm missing to see... If there's none I will continue with the mesh subdivision ;) (4h into it right now...)

Look into the linked addon, or consider trying third party software, if that is an option. MoI 3D is a great and simple NURBS based 3D modeling tool. It is commercial but relatively cheap for its kind

do you mean using a curve that represents the top view and a curve that represents the side view and combine them (so similar to the boolean intersect)?

@FacebFaceb , I don't really understand how intersect would merge the two views like in the video. But the main concept, answered by Duarte, is yeah have to lines, or beziers and make a different path between the two.
Thought i already model the chair (good old mesh subdivision) my question remains if someone know a try of doing that in the video above.

So if i understand correctly, you want two curves to connect like branches of a tree?

I tried to do it as a mesh and then converted to curve, but then they are separated again

@FacebFaceb, no I want something like Bsurfaces does. Tree branches are added right? you connect one to another. What I'm asking is if giving two curves blender could generate a Third completely different using the shapes of the two parent curves. Not connected at all, something different, like the video i linked.

first - in video it is fake armchair shape. not even near to original example.
second - in Sverchok we can make interpolation node mk# to deal. if you admit, he made row of curves along outer line, we can use only them and acheave the same result.
especially me will use for kind of stuff math for definition shape (real egg shape)

in sverchok, i use pink curve's z position and blue curve's xy position to create a new green curve.

In the video the shape of the armchair is not close to the original example, which is OK if all it intends to do is show a technique.
In Sverchok we can use interpolation node mk# to interpolate the points of multiple curves, by sampling them along their trajectory. If you observe closely the videos, he made a row of curves along the exterior profile, those are all we need to achieve the same result. The outer curve profile (egg shape), can be generated via the math nodes.

In sverchok we can do the above and it all stays parametric, or use Blenders bundled "looptools" add-on at the cost of parametric interaction.


text:
How can I get the rotatation with fcurves.find()?
What I want is a way to take the rotation fcurves with the code fcurves.find(), is there any way to do it?

From blender 2.76 we can use fcurves.find(data_path, index) to get specific fcurves for an object. The fcurves for rotation data may be stored under several different data_path values depending on what rotation_mode was enabled when the keyframes were added.
Of the eight possible values for rotation_mode three different data_path values are used, one is rotation_quaternion, one is rotation_axis_angle and the other is rotation_euler that is used by all six permutations of XYZ used for euler rotation modes.
import bpy

obj = bpy.context.object
obj_fcurves = obj.animation_data.action.fcurves

if obj.rotation_mode == 'QUATERNION':
    w_fcurve = obj_fcurves.find('rotation_quaternion', index=0)
    x_fcurve = obj_fcurves.find('rotation_quaternion', index=1)
    y_fcurve = obj_fcurves.find('rotation_quaternion', index=2)
    z_fcurve = obj_fcurves.find('rotation_quaternion', index=3)
elif obj.rotation_mode == 'AXIS_ANGLE':
    w_fcurve = obj_fcurves.find('rotation_axis_angle', index=0)
    x_fcurve = obj_fcurves.find('rotation_axis_angle', index=1)
    y_fcurve = obj_fcurves.find('rotation_axis_angle', index=2)
    z_fcurve = obj_fcurves.find('rotation_axis_angle', index=3)
else:
    x_fcurve = obj_fcurves.find('rotation_euler', index=0)
    y_fcurve = obj_fcurves.find('rotation_euler', index=1)
    z_fcurve = obj_fcurves.find('rotation_euler', index=2)

For versions before 2.76 fcurves.find() is a generic find that doesn't work as expected, in this case you need to loop through the curves to find the one you want.
for c in obj_fcurves:
    if c.data_path == 'rotation_quaternion':
        if c.array_index == 0:
            w_fcurve = c
        elif c.array_index == 1:
            x_fcurve = c
        elif c.array_index == 2:
            y_fcurve = c
        elif c.array_index == 3:
            z_fcurve = c


text:
is the front/back (.Fr .Bk) naming convention useful for mirror weight painting or poses? why does it exist?
I just discovered this exist and I'm curious to know if it actually helps in something, like mirror weight painting or poses on "Y" axis.

For rigging quadrupeds?


text:
Merged characters hand to the arm and got a weird choppy result
Looking for a smooth transition

Welcome to the Blender.SE! You should provide more details in order to get useful answer, .e.g screenshot of mesh in Edit mode, how did you model and join meshes, do they have any modifiers. You could upload your blend to get more help with your particular problem. Try to enter Edit mode and remove doubles (select all > W > Remove Doubles). You might want to take a tour to get more idea how to use this site.

@MrZak
I Removed Doubles as you suggested, but the choppy transition stays the same.
As for Modifiers I have Subdivision Surface and Mirror active.
I joined the meshes by merging vertexes in the center between them.
.

In Edit mode select all and press Ctrl+N to recalculate normals. Note that they may be flipped instead of becoming consistent, while the goal is to get rid of black faces like on your top screenshot. See http://blender.stackexchange.com/questions/3606/why-are-some-faces-in-my-mesh-darker

@MrZak That worked perfectly, the normals was indeed flipped! Thank you very much.

Normals was inverted,
you can flip normals of selected faces while in Edit mode by:
3D Viewport Header -> Mesh -> Faces -> Flip Normals
If you want to quickly fix all the normals in your mesh, while in Edit mode you can use Recalculate Normals:

3D Viewport Header -> Mesh -> Normals -> Recalculate Outside (CTRL + N)
3D Viewport Header -> Mesh -> Normals -> Recalculate Inside (SHIFT + CTRL + N)

Why are some faces in my mesh darker?

Thanks to Mr Zak & Thom Blair III

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - From Review

@PGmath Thanks for the feedback, hope it's looking ok now.


text:
Maya compatibility
I need to know if Blender will import Maya model files with Shaders and rigging?
I am having a model produced and they use Maya for rigging.

As you may know importing the shader isn't possible (or limited), since this depends on the render engine. However, exchanging the geometry works flawless via .fbx or .obj file format.

Related https://blender.stackexchange.com/questions/14808/how-to-import-a-max-model-into-blender

Try exporting your models as a .fbx file that way Blender will know how to open it and read the file.   This question has been written alot of times though if you want to find other people's questions you can just go on google and look up "how to import Blender models to Maya" and you will get great results.
How to Export "Selected Objects" to fbx in 2.77a


text:
Code or workaround to create snap to pixels from unwrap
How can I have the snaptopixel feature working from UV editor when I use
+ Lightmap
+ SmartUV
+ Unwrap
any of the above commands. In UV editor UVs->SnapToPixel selected executing any of the above commands causes the vertices of island to be to positioned proportionally that is vertices of islands have fractioned numbers e.g. 19.11, 28.12 etc.. , rather than integer numbers 19.00 , 28.00 etc..  . I want to remedy that.
If there is workaround I'd like to apply it, if there is not then I would like to implement python code for this, your guidance will be appreicated.

I'm greatly interested in this potential feature too ! :)

I'm not a massive user of this feature, but as far as I can tell, Snap to Pixels refers to snapping while you are moving UVs around in the editor using the standard translation tools, like G, R and S. See the comparison in this GIF (first I move around without Snap to Pixels enabled, then with):

The trick is, you simply enable the G tool, and the vertices will already snap. Just LMB click to confirm.

telling that pressing G is compulsory, was really helpfull, my only remaining discrepancy is islands smaller than 1 pixel or close to 1 pixel but not greater than one, are morphed into a line or dot, can you suggest any trick for that.

@SonyaBlade regarding the lines issue, I believe that's impossible to achieve. Think about it: The UV coordinates are simply rounded to the closest value by the algorithm. How would you guarantee that faces are preserved? UVs unfortunately don't come in very pixel-friendly, and depending on the geometry (say, you have a lot of triangles around like in my example) there could be five, six, seven points within an area, while there is only tone or two pixels around to snap to. You can only provide an image with enough resolution, so the likelyhood of collapsing is reduced, or fix the areas manual

In my example, I was snapping to a 256 x 256 pixel image. If you give it a 1024x1024 pixel image to snap to, it will work out a lot better, But I don't know if you have this freedom in your case.

@SonyaBlade Also, if the island gets averaged into a dot, chances are it's too small in the first place to really even need more than a dot. BTW What would be the purpose of snapping to pixels anyway? It's actually kind of pointless except for in a very few cases.

@pycoder Unreal Engine has troublesome seam issues if the lightmap is not generated on the pixel. It colors half filled pixels as black making shadows at the end of faces. Sometimes it can be useful but most of the time not. Especially in context of modular pieces. This is what brought me here in fact. I'm modding texture atlas addon to give me the option to snap to pixel among a few other things game related.

@jollarvia Good to know, and welcome to Blender Stack Exchange!


text:
Import .jpg texture into Blender
I have a cityscape 3d model that is in .obj format. When I import it into Blender, it does not import the .jpg texture files. Is there any way that I can import the textures manually? Any help would be appreciated.

You could try to convert the .obj file in a different format.
To load images as textures I used that plugin:
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Planes_from_Images

How would I then apply the image to the mesh? @user3054986

Can you publish your obj file?


text:
How to map an Image on a plane manually?
I'm trying to put an image onto a plane. I've used the Import Image as Plane add-on, but I'd like to know how to do it myself. I tried setting my image as the texture for the plane, but it appeared stretched. I think that I need to adjust some mapping setting. Thanks!

You have to unwrap you mesh and make sure its size matches the image proportions. Might be hard to do precisely by hand alone

One thing might do to get the dimensions of the plane right is to look at the resolution of the image and use that to set the x and y dimensions of the plane. You can scale the plane down (it will probably be pretty huge) from there.

@DuarteFarrajotaRamos All you need to do is type the numbers for the dimensions in the proper edit field. What do you mean "might be hard"?


text:
Custom caps for curve to mesh
I want to create tubes using geometry nodes. I want to use different materials for the caps and the sides. I reduced it to a solid strand while i solve my rotation issue.
The problem is that I can't figure out how to rotate the end caps.
Here is an attempt using "sample curve" for the cap positions. I have also tried "instance on points" with "select endpoints" with a similar result.

If you Instances on Points and use an Align Euler to Vector with a Curve Tangent connected into the vector socket it should work  (Z axis).

Works! Alignment axis: Z, Pivot: Auto, Factor: 1.0. @Vagabonk You want to make it an answer?

Hi, John! Glad you've got a fix! .. (BTW, don't forget to flip one end.) This question might be clobbered, though, as a duplicate of https://blender.stackexchange.com/q/243389/35559 .. would that be fair?

@RobinBetts I looked at that before posting. Thought it was different with the spherical ends.

https://blender.stackexchange.com/questions/254598/ and https://blender.stackexchange.com/questions/286437/

Yeah... This is a duplicate alright. Sorry.

@John ...a duplicate of which existing question/answer?

@quellenform This is pretty spot on: https://blender.stackexchange.com/questions/286437/extruding-a-filled-face-with-a-hole-in-it-along-a-curve-using-geometry-nodes


text:
Blender crashes when decimating hi-poly mesh
I just recieved a terrain mesh with over 16M polys.
I can open it and mess around the scene quite well since I'm on a really decent PC.
But I'm trying to decimate it (using the modifier itself) and my PC just crashes. It gets stuck for a while and then the sound and signal dies and PC freezes forever.
I haven't tried letting it frozen for more than 10min but since the sound on the PC dies I'm assuming it won't get out of the dead lock.
I don't think I'm recieving a less hi-poly version of that mesh, so I don't know what to do.
Thanks.

Additionnal of Doyousketch2's answer, try to split your mesh on multiple objects, by using Separate by Loosing part or Knife tools.

Make sure you have the newest release of Blender.
Recalculate normals, then try Clean up options on the mesh.
Maybe you'll have more luck that way than through the modifier.


text:
Object dimensions changing but not changing
I am having a simple problem with Blender 2.76b using Python 3.4.2.
I'm trying to change the dimensions (not scale) of a mesh, and then put another object next to it, depending on the new size.   However, after changing the dimensions (which works fine, the actual size in the animation changes) it still gives me the original dimensions when called.
Code:
add_cube  = bpy.ops.mesh.primitive_cube_add
add_cube(location=(0,0,0))
actor_name = bpy.context.scene.objects.active.name

#randomized size to check if post resize call is working:
sizex = random.randint(3,10)
sizey = random.randint(3,10)
sizez = random.randint(3,10)
bpy.data.objects[actor_name].dimensions = (sizex, sizey, sizez)
#end of random resize test

objdim = bpy.data.objects[actor_name].dimensions
print('Actor Dimensions: ', objdim)

A standard cube is (2,2,2) big.  When the code runs it changes the object size, but then prints "Vector((2.0, 2.0, 2.0))" when it should be bigger.  Putting in static values instead of random numbers produces the same problem.
Running this in the python command line in the scripts window works fine, running from script does not.  Am I missing some refresh thing?
Anyone come across this?  It's like it's not refreshing the actual dimensions when I call them.

It seems the answer is to do a scene refresh after updating values.   This works for this particular problem, but I suspect this issue is also elsewhere in the API.
Code up to 2.79:
bpy.context.scene.update()

For 2.8+ version:
bpy.context.view_layer.update()

bpy.context.view_layer.update() for Blender 2.8+