text:
Can blender create a topology of a face from real camera? (photogrammetry)
If you record your face on film, then use blender to create a geometry from it with its aligning topology. Is that possible? Using camera tracking? How?

Blender can't do this (easily), but it is possible to do this with OpenSource Photogrammetry software  (PPT and MeshLab) outside of Blender, then import the resulting model, see:
Example, blog posts.

http://arc-team-open-research.blogspot.com.au/2012/09/converting-pictures-into-3d-mesh-with.html
http://arc-team-open-research.blogspot.com.au/2013/04/scanning-skulls-to-forensics-with-ppt.html

Tools:

http://opensourcephotogrammetry.blogspot.com.au
http://meshlab.sourceforge.net

Blender-Artists Thread (~2012):

http://blenderartists.org/forum/showthread.php?280309-opensource-3D-scaning-with-one-camera-blender-ppt-meshlab

Some friends did that for a project and did it all with freeware...
Capture: First you capture your face with a kinect and extract a point cloud of your face (using depth as your parameter). A good idea would be to block any other stuff in the background by using a sheet, just so you get less garbage points (which need to be cleaned up).
Clean-up: The cleaning up could be done with a very short script that deletes all points a certain radius from the "origin" of your face, or if you want to be more clever, you can derive an algorithm that deletes points based on their closest neighbours... in such a way you will keep only the bulk of points which form your face and delete the garbage once scattered around... (in theory)
Reconstruct surface: there are many algorithms, techniques and programs, which would reconstruct a point cloud. I would suggest having a look at the following blender skinning script or MeshLab which specializes in such stuff.
Result would depend on the density of the point cloud and the quality of the reconstruction, but you can get a decent result. They got an animation of a human face, but I must warn you, you will be dealing with big data.

It can be done with blender, but it would be easier with different programs. You could get a close model by placing a LOT of tracking markers, like in this video.
It sounds like 123D Catch is what you are looking for.


text:
Incorrect Context error when calling bpy.ops.view3d.object_as_camera()
I am using blender command line to render image . But before that I need to select active object as camera, which I am doing by calling bpy.ops.view3d.object_as_camera() .
However I am getting the wicked error
Operator bpy.ops.view3d.object_as_camera.poll() failed, context is incorrect
Now when I do the following in Python Console in blender , the active camera is selected
bpy.data.objects['Camera001-5'].select = True
bpy.context.scene.objects.active = bpy.data.objects['Camera001-5']
bpy.data.scenes[0].camera = bpy.data.objects['Camera001-5']
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.object_as_camera(override)
        break

But when I run the script using blender command line, it gives error again.
What to do?

So it turns out -
I had to add area.spaces.active.region_3d.view_perspective = 'CAMERA'
this in the loop.
Got my answer on http://blenderartists.org/. Just sharing for the community.

This saved me so much pain and frustration today.

source: Stack Exchange

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

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

sort: votes


text:
Blender Python select an object with the sequence of letters in a name
How can I select the object using a sequence of letters in the name . I know there are operators endswith and starswith, they allocate objects to spell the end or the beginning . But how can I select an object if at the beginning and at the end of the characters are the same, but differ only in the middle of the name.
For example, the operator selects the object name in the end:
for ob in bpy.context.visible_objects:
      if ob.type == 'MESH' and ob.name.endswith("_P678GHNV"):
          obs.add(ob)
          ob.select = True

for example, my naming:
_Н480_2_ТХ_VALVE1_Linde_Clea
_Н480_3_ТХ_VALVE2_Linde_Clea

And I need to select the objects that include the VALVE in the name

please show a couple of examples of your naming convention.

but in this case exactly

I think whatever way you look at this, it is more a general Python string processing question rather than directly Blender Python related. There will be numerous ways to do it, depending on your object naming convention.

You could also use regular expressions which allow you flexible pattern matching:
import re
import bpy

pattern = re.compile("PREFIX.*POSTFIX") # edit this string

for ob in bpy.context.visible_objects:
    if ob.type != 'MESH':
        continue

    match = pattern.match(ob.name)
    if match == None:
        print("no match for %s"  % ob.name)
    else:
        print("matched %s" % match.group())
        ob.select = True

Let's not overlook that you can test if a name contains a certain sequence of letters.
for ob in bpy.context.visible_objects:
      if ob.type == 'MESH' and ('VALVE' in ob.name):
          obs.add(ob)
          ob.select = True

for example, my naming: _Н480_2_ТХ_VALVE1_Linde_Clea, _Н480_3_ТХ_VALVE2_Linde_Clea
And I need to select the objects that include the VALVE in the name

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


text:
How do I set a mp4 as my background?
Ok so i got this template from the internet, and it came with an mp4 file called shockwave, everything worked, but I dont know how to add that shockwave behind the text. here is how it suppose to look.
https://www.youtube.com/watch?v=X8WKpitwn4Q

Time where it shows it: 0:13 - 0:14

and right now i got the text and the audio working. I just need the shockwave to show on the background.
If someone can help, i would appreciate it a lot!!!
Thanks!

Upload .blend File?

Would you like to use the background as a reference while modelling or in the final shot?

@parameciostudio in the final shot.

You can combine a 3D Scene with a video using different tools:
Node Editor (Compositing)
PRO: Here you can apply filters, color correction, and other cool effects.
CONS: Non-linear editing is a little complicate
Some tips:

Set alpha mode Transparent in the Render Panel
Toggle Compositing in the Render Panel
Scale the Movie Clip to fit the render dimensions

VSE (Video Sequence Editor)
PRO: Easy control over the timeline
CONS: Little effects
Some tips:

Select the Scene Strip and set Blend to Alpha Over
Toggle Sequencer in the Render Panel

This is only an overview: you'll find a lot of tutorial on the web about Node Compositing and VSE (Video Sequence Editor)

Wow, im surprised!!! Thanks for that, it worked like I wanted to. Can I count of you if I have other questions? I appreciate all you did, you know what you are doing, YOU A PRO!!!

Oh and btw, I'll like your answer once i get 15 REP.

Galde to help you! This is an active community where people share their knowledge and experience. I learn something new every day :)

In your 3D Viewport, press [N] and a pop-up will come out on the side. Scroll down on it, and it has a box labeled "Background Images". Enable this by clicking the black box on it, and there you can choose between selecting the background to be an image, or a movie file. :D

Hey I appreciate your answer, but the video don't wanna show,any idea on how to make it show and how to set it at a specific time, like lets say staring at frame #9 of the animation.

Hey man, thanks for trying to help, that didint work, but you still tried, thats what counts!

That will set the background shown in the viewport, which is only visible in orthographic view in presets eg Front, Side, Top. The question is about a video as part of the final render.

@sambler Thx for explaining that in detail


text:
Image texture not showing on object
I set up the diffuse material, add a image texture node, select the image and yet everything remains beige. Any ideas? The tutorial I was following along it worked just fine when he did it... but he was using v2.6x

If you do have UVMaps make sure the one you are using is first, not the one you used for the painting. :D

You probably didn't add a uvmap. A UV map is what maps the 3d coordinates of the object to the 2d coordinates of the Image being used as a texture.

Notice properties -> Data -> UV Maps has no entries.
The simplest way to see a texture there is to press the + symbol to the right. Your viewport rendering will show a texture on the Cube.
See blender's manual page about uv_mapping.

Yeah, try unwrapping it as a cube in editmode by selecting the whole cube and then click on mesh, then uv unwrap and then cube projection. maybe it works then.


text:
Copy node tree from one material to another in cycles using python
I have two cycles materials (say source and target). I want to copy the Shader Nodetree from the source material to the target material after clearing any currently present node tree(s) in the target material all in python.

Another way is to copy the object itself to another file. And apply the material that is copied together with that object to the other object :)

Yeah that seems a lot of work. So I just scripted the whole node setup and used it whenever I needed it. Thanks for the help.


text:
Blender keeps flashing not responding
I am using windows 10 and the latest version of blender and even tried to reset windows however blender keeps flashing not responding and the complete UI flashes.
Please help

Tech support is outside the scope of this forum. You'll get better answers from BlenderArtists.org That being said, I'll try to help out.

If you can add which package version are you using (.msi - installer or zip version)? If using the .msi, try the zip version (ie: simply unpack thew zip and run blender.exe) since "blender is installation free" (copyright Ton Rosendaal https://youtu.be/spKJ2jbnVI8?t=929)

There are a number of things that could cause this problem. It could be an old video driver. It could be a corrupt download.
The first thing I'd try is browse to C:\Users[user]\AppData\Roaming and delete the folder called "Blender Foundation." This is where Blender keeps all kinds of caches, settings, configurations, etc. Deleting this folder is like resetting Blender to the factory default configuration.
If that doesn't help, post your problem on BlenderArtists.org with a bit more detail about what "flashing" means, what GPU you have, when you last updated your drivers, and whether you're on a laptop or desktop.
Hope that helps!

There should be a problem with your video driver.
Do install the driver using disk you've got when buying it or go to the website of your graphic-card and download the latest driver available.


text:
error enabling .MHX mocap addon v 0.6 / 0.7
I have an error when using io_utils import * but i do not know why ?

you are trying to enable .MHX mocap addon?

from : space_view3d_mhx_mocap.py ? yep that file needs to be edited/fixed. you have done nothing wrong.

@zeffii Firstly thanks for your reply. Secondly the error in the space_view3d_mhx_mocap.py is importing io_utils .. I do not know what is the problem with writing
from io_utils import *

that's not the only problem, it should be from bpy_extras.io_utils import ImportHelper, but then you get a new error about restricted context. the addon hasn't been maintained for perhaps a year?..

yes exactly thats what happens in my case so what should i do to debug this error

https://gist.github.com/zeffii/a0d6087baec01fcfd615 is my attempt, I don't know if it works because I have no .mhx files to test with. My advice after looking at the addon is to contact the makehuman forum and ask what the blender users there use (there might be other addons for Blender? or newer releases of the addon, -- go to the source. come back when you get a working solution )


text:
Bump image texture doesn't work anymore
Weird trouble here.
Somewhere in the process, the object can't render the displacement map anymore, even in the preview window shows the right bump amount. At start it works well but somehow it lost it recently...
I check all connections, all values seems OK, the bump image shows in the right place and should make a huge bump effect (like in my image #2. But nothing, the surface remains flat as a sand desert. It's an animated object but no keyframe on this parameter, all frames show the same absence of bump.
I check there is no object's double superposed. I copied the object, I try tho connect the image directly to the Displacement node socket: nothing. I tried a Noise texture with Color Ramp to enhance the contrast and then, a very small amount of bump appears.
The goal is to have a small amount of relief, but here I exagerate to enhance the problem.
The object contains several materials. I tried to recreate a new material with new nodes: nothing change. I put simple Glossy node with another image for the bump: same result. Correct effect in preview window, nothing in render.
Bump mapping works on other objects in the scene.
Capture #1
The material preview show the expected result with these settings: a huge bump. Remark: there's two image for bump, one (top) for the bumpy surface, another (bottom) for slim lines barely visible.

Capture #2
When the texture image is connected to a View node, it shows as it should.

Ok I got a temporary solution.
The bump was still there but for some reason, it was so light that it was barely visible.
After the Color Mix node and before the Material Output node, I add a Math Multiply node (value x 20) and then the bump shows up again.
But now rendering, I see baaad artifacts in the bump texture due to A) the Math multiplier node who force the grey levels and B) a slightly poor image histogram. Photoshop's histogram shows some pikes. Looking closer, there is some posterize-effect in the gradient and its ugly in the render. The texture image is 4000x4000 pixels, large enough I think. I tried PNG and JPG, tried to remake it with more histogram values, same result.

Edit:
With Normal mapping it seems to work better finally. Still some poor histogram artifacts but better. I blurred it a little and its fine.

But still at some point the bump map went to almost zero for an unknown reason.

Using a normal map only gives the illusion that the surface is altered by changing the surface reflections at a given point. In the viewport you are viewing the shield at an acute angle so you see the true geometry of the mesh. Your second example is using an emit shader to view the bump map, by emitting light it will not show any of the reflections that give the illusion of an altered surface.
To get real surface changes you may want to try a displacement modifier. Note that this modifier will only move existing geometry, it will not add new geometry to get the final surface you want, so you may want to use a subdivision modifier before it.
A still experimental feature in cycles is textured surface displacement. While similar to the displacement modifier the displacement is performed within cycles using the material displacement. Cycles can also be set to perform some subdivision to get more detail.

Yep, I know all that, but it don't explain why at some point the bump was visible and later it disappear, making me pushing way up the value to see it again. - I observe that Blender sometimes loose the image map. I have to reload it manualy.


text:
White lines between objects in render
I am kind of new to the whole animation aspect and in fact still in high school.
 I am trying to make a Minecraft character rig and I want to make some 3D hair. I did not know how to quite make it so I kind of when just did something pretty simple. It isn't the greatest in any means, but any how the point is every time I render it white lines show up between objects or joined objects. I don't know how to fix this and would like help (a picture is posted below of the problem).

Regarding the white lines, is this in Cycles or BI?

I apologize for not putting it in the right section. I also got rid of the rig request. As for you gandalf3, I am not exactly sure what it is I would think BI but whatever default is. All I did was got the camera and rendered an image with F12 and it shows the white lines.

No worries :) The default is BI. Is it possible you could upload your blend or some screenshots of your settings?

Yeah I will try to upload the blend file. Give me a sec.

I uploaded it to this site http://www.pasteall.org/blend/25106. I didn't know any other way to upload it. I will also attach the image you need for the material/textures of everything.

It seems this is caused because the texture is not covering the insides of each object, so the diffuse color is showing through.

Yeah that does seem to be the problem is there a way I can fix this?

I would use Maya but being in High School I don't have that kind of money. I want to do animations and gameplay youtube videos, but just don't know when to start.

Gandalf3 is there a way I could get rid of the diffuse or make it so you cant see it I fixed it a little bit. Here is an updated image.

Nevermind I think I have fixed it or at least for the most part. Thanks for a little bit of help telling me it was a material issue and it was! :)

@GarrettLozano Please use the answer button below the question to post the solution that worked for you. This is not a forum, we don't update the question with the answer.

I used the texture , but a few tweaks fixed it. First I enabled Face Textures and Face Textures Alpha in the materials tab under the options sub-tab. I then went to the texture tab and under image sampling I changed the filter size from 1.00 to 0.10. This cleared up most if not all the visible white around the objects.

Hi Garrett, glad you find your way to fix it. However, I can still notice a few tiny white dots in this image, around the front and side edge of the head. which means, this only works better with certain view angle. I've tried your way, but such problem seem still occurs when viewing from other angle.

Yeah well on yours I see black or brown lines between objects. I also don't want to shrink the texture because then I won't be able to see the full skin.

Leon Cheung I think that is all I did maybe more but I don't seen any lines and like maybe 4 white dots per render from different angles. It seems really clean. I like your method as well it just won't work on my character maybe stuff I do in future I am sure.

Sure, if that's what you may accept.  :)

It's caused by lack of bleeding in UV set, which will show poor result when sampling.
To solve this, just leave some room for the border pixel with the same color (that's what bleeding used for).

In this case I don't see a good reason to use a texture at all, because it's one solid color and it's a separate object anyway. Why not just set the diffuse color?

Yep. Anyway, he's problem seems really about bleeding. :) http://www.pasteall.org/pic/show.php?id=62269


text:
How to swap Y and Z axis on export to Collada
I'm using Blender as a modeling app and I need to export its data to Collada format for being consumed by a game engine. The thing is that Blender uses Z-axis to be the up-axis and the game engine uses Y as the up-axis.
I haven't found any option to swap the axis on Collada export dialog but I did find the option in almost every other export option. Is there a plugin out-there or other solution to add this option to the Collada export menu?
PS: I know that rotating through X-axis is achieved the same effect but its annoying to do it every single time I need to export, so I don't want to do that. Instead, propose another solution, if there is any.

AFAIK, The only way to do this in blender at the moment is rotating, as you mentioned. You could use an external tool such as Collada Refinery, but that might even more inconvenient then just rotating in blender.

No. Blender's Collada exporter does not have a convenient way to do this. Your best option is to rotate the object as you mentioned.
Note that just rotating the object might be insufficient for some applications, e.g those which actually care about Collada's up-axis specification (which can be either Z_UP or Y_UP).
If you're working with one of those, you'll also need to manually edit the exported file.

iOS uses Y_UP... Blender will just have to support it shortly.


text:
How to create a visible material that does not emit or reflect light?
I need to make a plane in the background that is independent of any lighting in the scene. This means that it does not emit light, and it does not reflect light, but it is visible. It is so I can create a green screen.

Unless you're making an animation that contains and actual green...screen, then there are MUCH better ways to do compositing than rendering a green plane...

For Blender Internal, on your material, check Shadeless.

edit:
If you're using Cycles, open your material in the node editor, and set up this for a green screen:
Basically this tells the material to only interact with the camera, and no other rays.

You don't need to use a shadeless green material to simulate a green screen. You can use an object to create a mask to use in compositing. If your not compositing in blender then these can also help with other applications, by saving the frames with alpha channels you have already cut out bits that you want.
In cycles you can use a holdout shader. The blender wiki describes the holdout shader as -

A holdout shader is useful for compositing, to create a "hole" in the image with zero alpha transparency where the object with this shader is located.

Blender Internal has a similar feature by choosing Mask under Transparency options

Mask Transparency is a special kind of transparency. Instead of making objects transparent/translucent, it hides the geometry behind it.

This is obviously easy and helpful if you render to an image format that supports alpha.
Another option that is available in both cycles and blender internal is Pass Indexes.
These can be set in the material properties for Blender internal -

and cycles -

Or you can set a pass index for an entire object -

To access them you need to enable Material or Object Index in the Render Layers -

Then in the compositor you use an ID Mask node to get an alpha mask of the material or object -

If you are rendering out to file for another application then you can use this mask to cutout the section you want and save with an alpha channel the same as when using a holdout material.
The pass index supplied to each material needs to match the index used in the ID Mask node. You can apply these to multiple objects and materials at the same time and can use more than one index id to handle each mask separately.

There is a holdout shader equivalent in BI too, Mask transparency.


text:
Checkered face on cube
On cubes, one of the faces has a checkered face, that doesn't like to cooperate with what I am doing. Can someone shed some light on what exactly this face is, and what it's purpose is?

Basic ingredients of a mesh are triangles (tris), quadrilaterals (quads), and polygons with n sides (n > 4, n-gons). N-gon is the least often used, and indeed Blender's own support for true n-gon is fairly recent (2.63).
The lower right face of your problematic mesh is a concave quad. Normally, proper rendering of a concave polygon requires it to be decomposed/fragmented into several convex polygons, a doable operation but potentially expensive [PDF] for realtime display. Blender doesn't do such operation, blindly drawing a face for each connected edges in each polygons in a mesh, hence the "ghost face".
To avoid such occurence, manually convert the quad to tris (select the face, then press Ctrl-T) for the upper and lower part of the quad:

Can you explain in your example why there are checkers on the bottom left?

If selected, the active face is also checkered, to differentiate it from other selected faces being highlighted.


text:
Looping Displacement Modifier Animation
Background: Originally I was making a water animation using displacement null objects and needed a way to convert them to shape keys and fortunately Chipmasque provided a solution (exporting to .mdd and then importing). The problem now is that I need the animation to loop (and the water must appear to only be moving in 1 direction). Blender does not seem to be able to interpolate the vertex information well enough to maintain the illusion of movement (it will just change Z height back to the original position). I've tried changing the animation on the Null Object used to influence the vertexes, but haven't found anything that looks good (either there is an obvious "jump/snap" or the mesh has to stop, then adjust height, then start cycling again).
Actual Question:
-Does anyone know a good way to loop this type of vertex animation?

Related: http://blender.stackexchange.com/questions/2858/create-looping-ocean

I would use an animation-image-texture for that, with each frame made seemless, in an other application like gimp. That texture with the displace-modifier and Texture-Coodinates to Object. As Object I would use an plane, that plane set to not rendered an animate it with key-frames. The Interpolation-Mode set in the Graph-editor to Linear.


text:
Object with a particle system doesn't show in render
for some reason, my person will not show up when rendered. I have checked the material and it is fine. Not sure what i did. Hoping that someone can figure it out for me.
here's a link to the .blend file: person

You're using the body as an emitter for the eyebrow particle system, and you've accidentally unchecked Emitter in the Render panel of the Particle Settings. Re-check that box, and you should be good to go:


text:
Where can I learn to do edge flows like in the attached image?
I am unable to create the edge flows in the below image. I have tried sculpting and retopo, but I just can’t recreate the ways it is done cleanly here. Is there a tutorial that I can follow that can help teach to do edge flows like this?

Hello and welcome. Asking for links to resources about X is considered off topic here, asking directly about X is encouraged though. If you can rephrase your question to focus on the specific difficulties you are encountering, rather that point you to some site, please [edit] your post so it can be reopened. As it stands it is not a good fit for this site.

How to learn it : following good examples and practice a lot on different models.
Now as for good examples, it's nearly impossible as a beginner to even tell appart good and bad examples.
Years ago Danny Mac did two series of how to retopologize a head and human body on Youtube:

How to Retopologize a Head like a Boss
How To Retopologize the Rest of the Body

They are not made on Blender, but what I found interesting here is that decomposes how to obtain shapes and flows.
You might want to have a look at CGCookies's Retopoflow, which adds a lot of retopology tools to Blender, akin to what 3D Coat or zBrush offer.
You can get it for free on github.com/CGCookie/retopoflow, or you can buy it on blendermarket.com/products/retopoflow to support the devs and also be entitled to tool support.

Thanks a lot, will try out the above resources :D

I guess the main thing, that you probably already know, is that when you retopologize you need to create these concentric circles around the eyes and mouth. The circles around the mouth need to contain the bottom of the nose. It will allow you to work and animate more easily:

Thanks for answer, i have seen the concentric circles. I guess i need to practice more to get it

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


text:
How can I visualize a negative energy source with Blender?
Imagine a light source from which light rays emanate in three-dimensional space. This is what Blender and any other program does in the case of ray tracing.
These light rays hit objects and are partly absorbed and partly reflected by them, and at some point the energy of the ray is so low that its effect can no longer be seen and it finally disappears completely.
In this game, shadows appear where little or no light falls, objects influence each other, and our brain gets a strong spatial impression of an apparent reality.
So far so clear, so far known.
But now imagine in addition an energy source, which functions exactly the same, however with the difference that these rays neutralize the energy of the light sources.
A negative light, so to say.
A light-eater.
A source of darkness.
And I don't just mean an inverted image, but a scene where both forms of energy actually occur simultaneously.
Where the dark source radiates its negative rays, or where it meets the rays of a light source, the energy of the light rays decreases, as if an invisible object absorbs or swallows light.
However, not punctually with an event horizon as with a black hole, but just flowing/smooth, completely according to the inverse-square law which also light follows.
It is difficult for me to explain this, and it is even more difficult for me to represent this with a picture. It is only a theoretical question for the time being, however, with a seriously meant technical interest.
...exactly therefore I ask here also this question to all thinkers, tinkerers and experts.
Above all, I wonder what such a thing could or should even look like.
Is something like this even remotely possible?
Would something like that be somehow feasible with Blender?

You can assign a negative wattage to a light source - in the .gif below I have 2 lights:  one (not moving) at 1000 watts, the other (moving) at -1000 watts. Notice how it also creates a negative "shadow" (whether you want this or not):

Here's an image showing the setup (with a nice sphere instead of a cube).

Oh, wow, thanks, very interesting (and amazingly simple) idea! I didn't know that was possible. I will experiment with it...

Wow, I have used negative lights before and never noticed this.  I've been attempting some stuff with light paths but I can't get rid of it..

See also CGMatter's video on this topic: https://www.youtube.com/watch?v=HEzYS8Cx0Zw

Please correct me if I'm wrong, but is it possible that this only works in combination with "Volume Scatter" in Cycles? I can't really get this to work with Eevee.

The examples above are both done in eevee, I didn't use a volume of any kind. Although, yes, volumetrics in Cycles is far superior to eevee's offerings.


text:
When I go in to rendered view, my object gets this weird shadow pattern
This is the shadow problem I get. There are no problems in either solid nor material view.
Picture:

Blend file:

It's because you have triangles on the sides of your roof that have vertices that are in the middle of the top faces, making them N-gon's (faces with more than 4 vertices). Blender does not like Tris or N'gon's for shading purposes. However, since the shape is so simple, you can get away with using a Decimate Modifier set to "Planar" to clean the topology up.

This being said, this method still leaves triangles on the sides (albeit larger) - you might want to make the roof truly quad-based by deleing the top and side faces (except for the "back"), then extrude the front edge on the Z axis just a little, then connect the top 2 edges to make a face (F), then the edge loops on the side and also make faces.

Note- pardon the pink - it looks like you forgot to pack your texture.

thank you that cleared some of the issues. i do still have some issues with my lighting though, see the edited picture if you care to help some more.

Ok. I'm working on it -  I notice your Roughness, Displacement and Normal Map images are set to sRGB - They should be set to non-color. Also, your displacement image should be run through the height input of a displacement node - but those still don't fix it. Still trying things - EDIT - it's definitely something to do with your Normal Map image - disconnect it from the input and you'll see.

thank you that worked, and when i changed the normal map from tangent space to object space it completely fixed it. thank you so much for the help!

It often happens when you import the files too, usually if they don't have the sharp edges then the object looks like it has some weird shadows when you move in 3D view or any view. Make the edges Mark Sharp, and recalculate normals, maybe it will solve the problem.
Before

After

As you can see in the above examples, that's how I solved it.

Hi, thanks for the post. This site is not a regular forum, answers should be substantial, stand on their own, and thoroughly explain the solution and required steps. One liners and short tips rarely make for a good answer. If you can [edit] your post and provide some more details about the procedure and how it works, perhaps add a few images illustrating some steps and final result. See How to write a good answer?, otherwise it may be converted to a comment.


text:
How do I make this cookie look more realistic?
After finishing the Blender tutorial, I tried this out. I do not know if it is good or not, and I need criticism and advice. I have discovered I actually love creating, and I want to get really good in Blender. But I am an absolute beginner firstly.
How do I get a good-looking cookie?

Maybe you should bake in some of the details? ;-)

Your cookie is lacking in 3 areas:
The chocolate chips are too round and uniform. On a real cookie, the chocolate chips generally start out as straight-edged shapes which then get melted when the cookie is baked. This leaves them as fairly irregular shapes. Also, the chocolate chips do not protrude far above the cookie's surface; they are embedded in it.
To fix, I'd recommend sculpting in some irregularities and maybe some slight noise textures for variation in bump and roughness. Take a look at a photo of a real cookie (or even better, a real cookie) to see how the chips should be positioned. You may have to model or sculpt some indentations in the cookie's surface for them to fit in.
The surface is too smooth. Cookies have a lot of irregularities in the surface. Look at any cookie and you'll see that the surface is very irregular, even for factory-made cookies. Look even close and you'll notice tiny cracks and bubbles in the baked dough.
To fix this, make sure the cookie material has at the very least a noise texture driving the bump. Better yet, add more (different) noise for displacement and bump. The roughness is important, and it depends on what kind of cookie it is. Is it a really greasy cookie? An old, dry, stale cookie?
For the base color, see what colors your reference uses and try to replicate those as closely as possible. Use sculpting and Displace Modifiers to make the surface uneven and lumpy. If it's a really high-detail cookie, sculpt in some tiny cracks and other irregularities.
Tiny details will really sell the realism. You need to think of tiny details, the kind of details that no one ever notices. These will really help push your model toward realism.
For example, cookies are messy. They make a lot of crumbs. You could scatter some tiny crumbs across the surface of the cookie and on the table around it. Or maybe there's some little chunks missing from the side of the cookie. A tiny burn mark from the oven or a chocolate smear where it rubbed against another cookie. The kind of thing that no one ever notices until it's not there.

In my opinion a good thing to do is to give a mix of tiny and bigger noises to the material so that it creates a kind of grainy texture on the surface. Use a Color > MixColor in Multiply mode in order to mix. You can also mix with a gradient on Z so that the bottom seems a bit more cooked. Also you create some bumps and even subdivide and sculpt a bit:

With the Dyntopo activated you can dig some cracks:


text:
How can I make three circles on the face of this rectangle?
How can I make three circles on the face of the following rectangle?

I am new to Blender and am still trying to figure out how to use all these tools to the fullest.

Suggest you watch a few videos on modelling! A quick one selected at random here.

@JohnEason: but only if you make sound off

@Chris You don't like the English accent? :^)

@JohnEason: uhm...well...in videos like this i am very happy that i can accelerate the youtube speed to 2 .... ;)

I would do it like this:
Add a curve circle, size and place it as you need it. Double it two times and move it, and then select all circles, Ctrl + J to join. Then select circle, shift-select plane (or your object), tab (edit mode), F3 → knife project.
Delete the circles, select your object, edit mode (tab) → extrude.

Very helpful thank you!

you are welcome!

Enable LoopTools via menu Edit → Preferences → Add-ons → LoopTools:

Model using these steps illustrated in this GIF image and use right-click → LoopTools → Circle to form a circular mesh which you can then extrude.

Second take with better quad topology and reduced faces. Well, I could have increased the hole radius a bit, but you get the idea.

How did you select all the subdivisions? What keyboard shortcut?

@HarryMcKenzie +1 That's how I would have done it - with the only difference that you could do it with a lot less faces. Just split the cuboid in three segments with loop cut Ctrl+R set to 2 cuts, then select three faces on one side, inset them individually and subdivide only those. Creates less polygons and simpler geometry, might be better depending on what you want to do with it afterwards or how complex the scene you want to use the object in will be.

@GordonBrinkmann thank u! yeah definitely better with less. my thoughts were not to have any n-gons. wouldnt that prodice n-gons?

@GordonBrinkmann thanks for mentioning that, why didnt i think of doing insets, ofcourse insets! haha but the subdivions in the inset face would contain n-gons?

@HarryMcKenzie Sure, but for this simple geometry the contemplated "fear of n-gons" by many people is often exaggerated and in this case unnecessary and the n-gons also make a more tidy mesh.

@GordonBrinkmann true! good to know!

@GordonBrinkmann i noticed that if i only subdivide the face where i want the circles, i cant apply a subdivision modifier due to the n-gon. so probably the latest screenshot i added in my post is the best that can be done?

@HarryMcKenzie That depends on what you mean with you "can't apply a subdivision modifier". You can always do that, the question is what you want it to look like and how it then does. Main problem with the Subdivision Surface modifier often is you need supporting cuts to make sure some edges are not rounded too much, and n-gons can't be loop cut which is a problem. But take a mesh primitive object like a cylinder with n-gons as top and bottom faces. Inset those n-gons a bit, make supporting loop cuts around the body and voilà, perfectly smooth subdivision despite the n-gons in the center.

@HarryMcKenzie You know, in the end it all depends on things you might have to consider before you use this or that method - there is no general workflow you can use for each and every project, no matter what the result should be. In this case it's like, do you want to model it easy and quick, how detailed should it be in the end. Is it low poly style or do you need a low poly count? If I for example new beforehand I will have to use a Subdivision Surface modifier on it, I would perhaps model it like that and still have less polygons then the screenshot above, but very smooth edges:

Not enough space here for long comments... but actually is this site not to encourage people to chat in the comments anyway. So here is the link to my solution for smoothed edges, left side the mesh, right side the smoothed version: traffic lights. Still lots of n-gons, but no problem.

@GordonBrinkmann hey thank you so much for your input and enlightening me! highly appreciate the time and effort to share your wisdom Gordon :)


text:
How can I model a flutted glass lamp's shade?
I'm struggling with this decorated glass...

I've tried with displacement, but it doesn't give me the desired look.

Create this segment, mirror it:

Array it on X and Z:

Make it circular with a Simple Deform modifier, Bend mode, on Z:

Deform it with a Lattice modifier:

Result:

wow! True mastercraft :) Thanks a lot, I'll try. Best!

You're welcome................   ;)


text:
How can I know where the normal ring is convex and where is concave?
Normals to understand - How can I know where the normal ring is convex and where it is concave?

This is a Tangent Space normal map.
That is to say, blue (Z) represents the interpolated normal of the underlying geometry, red (X) represents a tilt towards the tangent direction, which is positive X in the UV, (texture,) space, as mapped onto the surface, and green represents a tilt towards the bitangent direction, which is positive Y in the UV space, again, as mapped onto the surface of the geometry.
To quote directly from the Wikipedia page on normal mapping - 'How it Works':

A normal pointing directly towards the viewer (0,0,-1) is mapped to
(128,128,255). Hence the parts of object directly facing the viewer
are light blue. The most common color in a normal map.
A normal pointing to top right corner of the texture (1,1,0) is mapped to
(255,255,128). Hence the top-right corner of an object is usually
light yellow. The brightest part of a color map.
A normal pointing to
right of the texture (1,0,0) is mapped to (255,128,128). Hence the
right edge of an object is usually light red.
A normal pointing to top
of the texture (0,1,0) is mapped to (128,255,128). Hence the top edge
of an object is usually light green.
A normal pointing to left of the
texture (-1,0,0) is mapped to (0,128,128). Hence the left edge of an
object is usually dark cyan.
A normal pointing to bottom of the
texture (0,-1,0) is mapped to (128,0,128). Hence the bottom edge of an
object is usually dark magenta.
A normal pointing to bottom left
corner of the texture (-1,-1,0) is mapped to (0,0,128). Hence the
bottom-left corner of an object is usually dark blue. The darkest part
of a color map.

By Julian Herzog, CC BY 4.0, https://commons.wikimedia.org/w/index.php?curid=25512888
From this, you can see the top disc is convex, and the bottom disc concave.

First, I try to explain it in a shorter way. Further in more detail if something is not clear.

Concave -
Convex -

Love the lamp-bulbs :D

Important to note that the choice of "illuminating" the object from the top is not arbitrary : This is how we are used to see light interacting with lumpy object, because that's where the sun comes from, and most other froms of light inside buildings. It then makes sense that the "darker" parts emulate the "shadow" parts of a real life object lit by a real life light source.

In English, the subjective form of the singular first-person pronoun, "I", is capitalized, along with all its contractions such as I'll and I'm.

(So, before anything else: if you're going to listen to this answer, please use your own head as well :)  I find 3D math difficult, even though I enjoy it, and I'm working this answer out as I go. The output is what I want, which suggests that I did it right, but I'm not sure, and I don't want to make myself out to be an expert-- I'm only offering what I think is right, in case it or the thought processes it involves are useful.)
Concavity and convexity are per-axis values.  A sphere is convex in both axes.  A cave is concave in both axes.  A saddle is convex in one axis and concave in one axis.
Tangent space normal maps cannot be understood without knowing information about the mesh-- their normals are in tangent space, and tangent space depends on both the mesh normal and the UV tangent.  So asking about the concavity or convexity of a tangent space normal map, without taking the mesh into consideration, isn't really something that makes any sense.  Change the UV, and you might change the curvature.
But an object space normal map doesn't rely on the mesh, and per-axis concavity or convexity makes sense in that case-- and an object space normal map can be created from a mesh + tangent space normal map, just by baking an object space normal map (or by remapping object-space normals to the 0,1 space and baking raw emission.)
Now, how to evaluate whether our normals are convex or concave in some particular axis?  By comparing offset normals-- that is, we want to see how our normals change as we travel across our UV:

So I compare our normal if we offset 1 pixel in U with our normal if we offset -1 pixel in U.  Then I take the cross product of those two vectors.  If our second vector is positively rotated relative to the first vector, the cross product is going to point in one direction, but if it's negatively rotated, then the cross product is going to point the other direction.  So I can take the dot product of the cross product with any arbitrary vector to figure out which way it's pointing, and thus whether the cross product points this way or that way.
I'm outputting the convexity in U-- that is, convexity in the UV tangent.  The full map of convexity would also output convexity in the V, by looking at the normals with offset V inputs instead of offset U inputs.  If the convexity of U is different than the convexity of V, we have negative (saddle) curvature; if they're the same, we have positive (sphere or cave) curvature.
Also note that because I'm doing this by looking up actual values on an actual image, that seams impact this; and note that I'm not handling the special case of when my offset normals are identical (which would lead to a 0-vector cross product, which would lead to a 0 dot product, and would indicate no curvature, neither convexity nor concavity.)
Blender isn't really great for doing this.  A decent game engine shader could get you delta(normal)/delta(UV) a lot more easily and more accurately; and really, this is the sort of work that would make more sense to do in compositing, except Blender just doesn't have the compositing tools developed enough to be able to do it without a lot of dumb busy work.


text:
Is it possible to specify a complex rendering area in Blender?
I am trying to render a complex object (suppose this is a torus). The area occupied by the object itself is much smaller than the area of the object bounding rectangle. I only need to render this object.
The surrounding scene is not important to me (besides its effect on the object lighting). I try to adjust the object material and I often have to rerender the scene.
It takes a lot of time, so I want to throw out the rendering of all the excess. I know about rendering boundaries, but this only works for a rectangular area, which is not effective for a torus. Can I somehow define the rendering area including only interesting object?
My guess how I could do it:

Disable some tiles during rendering.
Determine the non-standard ray density distribution for tracing.

Unfortunately, I did not find the standard functions and plugins for this. Maybe someone has already solved a similar problem and knows the solution.

If you are tweaking materials you can try only rendering small patches of the torus or low resolution and then deciding whether to go for a bigger render or not. Your point 2 is effectively adaptive sampling, where the renderer detects more complicated areas to get more ray samples. Tthere is currently a patch in progress, but it isn't in blender yet: https://developer.blender.org/D4686

Is it possible to turn off other objects from rendering entirely, or do you need them for their indirect contribution to the object's shading?  That is, could you turn the rest of the scene (except lights) and not lose much?  Alternatively, could you bake the rest of the scene somehow and then turn them off?

You could put your model on a renderlayer and then model a plane with a custom shape hole on another layer and then tick exclude and mask for that layer on the model-layer.

He can just use the original object as a making object, right?

It is a pity that the blender does not have control functions for the trace zones, but the layers can partially solve the problem.

EDIT: All of this is surely possible in 2.8, but I haven't really used it yet so I'm not sure about where to find all these settings.
If you're using 2.79, you could restrict rendering on all objects in your scene you don't want to be rendered. This can be done by unchecking the camera icon of the object you want to restrict rendering on. It should look something like this:

So in this case, the cubes are getting rendered, but the planes aren't. They still affect the movement of some objects in my scene though, since I'm using cubes to bounce off of the planes, but I don't want the plains to be visible.
Also, try turning off your background by opening the film tab under render options and tick the 'transparent' box. Make sure you've set your output data to PNG, so the final render will have a transparent background.


text:
Strange liquid appearance inside glass
I am trying to make a simple scene where there is a glass bottle with some liquid inside of it. To make the liquid, I just sliced a sphere in half, gave it a volume and glass shader, and put it inside the bottle.
When I rendered it (Blender Cycles 2.83 Beta), I noticed some very strange things appearing in the liquid. (Look below)
Here is the .blend- before discovering this issue, I wanted to replace the liquid with fluid simulation. The objects that you won't need to investigate should be hidden from view.

Here is a closer view with the problems labeled:

As you can see, the borders of the liquid inside the glass have a strange "pixelated" look that does not match the resolution of the image, nor does it look realistic.
For lighting, I am using a completely black environment. I added a red and blue light next to each other to use as the main lighting.
I can also guarantee that there are no intersecting surfaces. I have no idea why this is happening. I also couldn't find any other people who have experienced a similar issue.

How it looks depends on what liquid that is. The 'pixelation' is because of the mesh of the glass shaded flat. You need smooth shading for it. However there are many more problems here. There is only one interface for light traveling from glass to liquid here so there should be only one surface, not two with a gap between them and you need to take IOR into consideration which is different when light goes from glass to liquid than the 'regular' IOR that everyone is used to that is usually between the material and air. You will have to look into physics to make it look right. See: Liquid / glass interface IOR and normals in Cycles

Turning on smooth shading worked for me. I had probably forgotten to turn back on after editing the bottle when it was very low poly. I will look into the other problems. Thanks!


text:
Fluid sticking to surface (2.8)
I am trying to make a beach. When I tried simulating the fluid (2.82 mantaflow), it went mostly well. However, I noticed that the water would stick to the entire floor when all I wanted is that around 2/3 of the ocean floor is covered.

As you can see there is a sloped down part, and I want some section of it to not be covered by water. However, it seems that if the water touches something, it will never recede from it leading to this unrealistic simulation.
I baked it at 100 resolution and then baked it as a mesh to make it easier to see. If you need more information please request it.

After playing around with the settings I tried enabling Fractional Obstacles inside the Liquid settings in the physics tab. This solved the issue for me. I think that the reason things like this were happening was that the obstacle was represented as a bunch of voxels, so in the fluid's perspective, it looked like a bunch of stairs. Checking Fractional Obstacles will probably smooth out the surface depending on the ratio.


text:
Mirrored object is textured incorrectly
While making the eyes for a character I was creating, I came across an issue where when I mirrored the first eyeball, the result was textured incorrectly.

As you can see in the picture above, the original eyeball (on the right) has sort of a gradient on the iris where the outer rim is a darker brown than the inner rim. But then, if you look at the mirrored eyeball (on the left), it completely loses the effect and just becomes what looks like a solid color. I have tried applying the mirror modifier but it does nothing.
This effect was 100% procedural and achieved through a node setup I found in a tutorial. I'll also share it here for convenience. If anyone is wondering, the ColorRamp actually has two colors except they are extremely close to each other. I can share the file as well if anyone needs it. The white and the pupil of the eyeball are separate materials.

i think this is a better approach, since setting the texture coordinate node to object will take that object's origin as the center point for the gradient to start, i also used a linear gradient and rotated it with a mapping node since its easier to handle, setting it to generated will set the center of the gradient to the mesh and not the object's origin


text:
How to convert image textures to different formats?
I used Blender to export a 3D model in X3D format. However, textures are automatically exported in TGA format. In order to print multicolor models in Shapeways (https://www.shapeways.com), the requirement is to provide textures in JPG or GIF format. Is there any way to do this in Blender or any other tool?


text:
How to save the render result within Blender
Is it possible to render an image and have blender remember it, so that next time I open the file the render result will not be blank?  I am not talking about saving to an external file.  Specifically I would like to render an image, close blender, and come back later and be able to do some compositing on the render without having to waste a half an hour rendering it again (my GPU drivers are messed up so I have to use the CPU).  Currently the render result is blank when ever I open a file.

No, Blender doesn't have this functionality.
Its possible to write an addon to do this, on-save it could save the render result to a Multi-Layer-EXR image, and on load it could check for that image, loading it if its available. (probably not all that hard to get basic functionality, but you will loose render slots).

An alternative which is admittedly little clumsy, you could use a file-output node in the compositor and save this in your user-defaults,
so your renders are automatically saved. In the user default you could have an image view pointing to this file, so on-load it would read the last rendered image.

I am not familiar with EXR files, would it be able to have all data the render layers node does, i.e. z-depth, RGB values greater than 1, material pass indices, etc.?  If so this would be extremely helpful.

Yes, multi-layer EXR's store passes & render-layers.

This sounds like what I am looking for, if you could explain how I would go about doing this that would be great!  I have never done any scripting for Blender before and my Python is a bit rusty (I do do quite a bit of programming in other languages though).  So if you could add some code to your answer it would be greatly appreciated. - Thanks!

For info on writing an addon, best you have a go, and if you run into troubles, ask a different question. (link to it from here is fine)

Yes, but it's a pain.
If you just need the image:

Render your image
save the image externally (this isn't the answer, just a step)
open the saved image in in UV/Image editor (now separate image from your 'live' render)
Pack all your images
save your work
you can now delete the external image, the packed version will travel with the blend, and be available the next time you open the file.

However, when you need to update the render, you need to unpack, update, and repack. So, it's just a pain.
If you need the individual render layers, then you should render to .exr as @ideasman42 suggests.
Edit: You can render the EXR, then pack it with the steps above. Same effect, the render will be stored in the blend, and available next time you open.


text:
Alpha PNG as Texture with nodes -> isn't totally transparent
I saw the threads on PNG alpha and made what It was recommended to do but I still have the problem although it brought me forward.
So I've a picture with transparent background (PNG), all seems ok for this picture.
I want to use it as a texture so I mapped it and it's maybe a bit deformed but seems also ok.
My problem is that the background is not totally black anymore but still on the edges.
Here is my node structure:

And here is the result:

I want to remove these black borders.
EDIT:
Here is the texture I want to apply:

EDIT 2:
The blend file of the project (all the present textures are not used).

Please post the texture you are trying to apply; Try switching the transparent to the last, and the glossy to the first mix node.

Switching the nodes changes nothing and I'll edit my questions in few seconds

Would be easier if you just pack the file and upload the blend. I can't see any black borders, unless you're referring to the fact that you've made the mug transparent so that we can see the inside of the mesh.

Yeah, surely the black borders are shadows.

Yeah, ok I'll pack the blend! Thanks for your support :)

So, do you see something wrong? :)

SE doesn't notify me when a new comment is posted, only saw it now. 17mb for a mug? seriously? and next time use pasteall.org/blend

Ok, I'm a new to Blender and to BlenderSE (I come from Android Dev world and I've to do a bit of OpenGL/3d Modelling). Thanks for the tips

Everything is working as it's supposed to. Those black borders you see are simply shadows cast by the mug onto itself because you've made a hole in the side with the transparency shader. It's easier to see from the side:

It seems like you're trying to do something like this:

You don't need a transparency shader because you're not making anything transparent - you simply need to make the background of the image the same colour as the rest of the mug, so just use a MixRGB node and the alpha of the image as the Fac.
You'll notice I added a math node as well - that's just to control how much of the glossy is being mixed in, since if you used the alpha directly without the math node it'd be mixing 100% glossy and 0% diffuse.

Wahou! Great! Sorry for disturbing you for a so simple problem! Thank you (I'd like to upvote you but I do not have enough rep... :( ).

Just a little last question, (I know that I'm annoying!), how did you do to get the same background color as the mug because I did what you did but we see a square that is not the same color as the mug. Which color did use in the mix?

That's what this site is for, happy to help :) If you hover the mouse over any colour value (like the one in your other material for the rest of the mug) and hit Ctrl+C, then hover over another colour value (the one on that Mix node) and Ctrl+V, it'll copy it there. (See: http://adaptivesamples.com/2014/02/01/cif-11-hover-copypaste/ )

Thank you, you helped me a lot, I much better understand these texture concepts yet!


text:
Color picker default behavior?
Just a theoretical question here.
Why is the color wheel selector in blender white in the center? Is there any reason not to use the neutral colors that usually are in the center of the color wheel?

White isn't a neutral color? What would you expect to be there?

It's just a system that represents the color in HSV space. What exactly do you mean?

gandalf3, a neutral desaturated grey.

someonewithpc, I was pointing that comonly the midle of the circle is a neutral desaturated gray. Your coment about HSV make me think about the color space and that answered a lot of my question. Thank you!

You can change the color selector type in the user preferences.
To open user preferences, press CtrlAltU then under the System tab change the Color Picker Type. I think you may be looking for the Circle (HSL) type.

Thanks for the data, I never pay atention to that particular selector in the user prefs. I was asking for HSL selector just because a theorical thing I'm trying to explain about colors :) Thankyou!!


text:
Cast ray from the cursor and get the index of the hit face
Trying to find the simplest way to fire a ray from the mouse cursor and get just the face index of the intersected face. I'm looking through operator_modal_view3d_raycast.py, but getting the feeling that there's more going on there than I need. Is there an easier way, or should I stick with this course?

operator_modal_view3d_raycast.py had a bug in Orthograhic mode, which is fixed in 2.72 (next release, but you can grab a test build too). https://developer.blender.org/rB61baf6e8135d11bc53cbfa45c75f910a99e57971

I assume it's fixed if I build from source?

yep, if you build from current master.

regarding "but getting the feeling that there's more going on there than I need"
This is too vague, you didn't state what you need.
There is Scene.ray_cast - which you can use to ray-cast into the entire scene's visible objects, but this doesn't expose access to the face thats hit. (only the point of intersection & the normal)
In general, no, this can't be further simplified. you need to.

Get the mouse coordinates from an Event.
Get the RegionView3D from the context.
Calculate a point-of-origin from the viewport (not always obvious with orthographic projections)
Convert the mouse coordinates into a view-vector (using view3d_utils).
loop over all objects you want to ray cast.
convert the ray origin and direction into the object's local-space.
run the ray-cast function on a selection of objects.
find the closest result by shortening the ray each time.

Of course you can write your own function to handle all this, and just re-use. But there are many decisions involved in which objects are used, and how far to cast the ray, weather to use the views near-clip to offset the origin or not... etc.
If you don't need dupli-object support the script could be simplified to loop over scene-objects (but not duplicators).

Thanks, this is what I needed to know. Converting between spaces is something I've put off learning for a long time. Guess it's time to finally dive in!

So, I thought I had this working but I've run into a snag. I'm using a (mostly) unmodified version of the raycast template from 2.72 master. Using it to select objects works exactly as expected, but the returned face index returns as None unless I select one specific object in the scene. I'm not sure what even determines which object this is, as I can add a cube and have the correct face returned, but if I duplicate that cube the second will select on click, but still return None as the face_index. If objects are alone in the scene they always return correctly. Am I misunderstanding something?

On this info alone, I wouldn't know why it fails, it would be good to see some test-case. to show the odd behavior.

The code I'm running is:
http://www.pasteall.org/54350/python
On LMB. As you can see I have a print function to tell what the face index is after picking an object, which works just fine with a single object visible, but fails with multiple visible objects. If I catch you on IRC I'll share the whole script and a .blend, but creating any scene with two objects and running that as an operator should give the same result.

Crushed the bug thanks to Aligorith. Turns out face_index is overwritten for each loop and I wasn't catching it. Was as simple as adding in a best_face = face_index after storing best_obj.

Apparently, this is supposed to give you all the components, including the index of the face, however, it gave me an index way to big. Maybe that happened because my object was beveled:
ray_origin = Vector(location)
ray_direction = Vector(direction)
Get the dependency graph of the current scene
depsgraph = bpy.context.evaluated_depsgraph_get()
result, location, normal, index, obj, matrix = bpy.context.scene.ray_cast(depsgraph, ray_origin, ray_direction)


text:
How to get correct results when baking a fluid simulation
I have a student who is trying to bake her fluid, but it won't do it correctly. Below are the steps she told me she takes when she does it. I have no idea on how to fix it and I have been trying for days. Any help would be appreciated. I also included screen shots of what she does.
"Before I bake, I assign the larger icosphere as the domain, and the cube to the fluid and the other objects as obstacles. When I bake it, the fluid moves up to its starting point at the square like it's supposed to. After that, however, when the fluid falls, it passes through the objects marked as obstacles and lands as if it were landing inside a large rectangular prism, or some of it gets suspended in midair. (the pictures show it)"

Is it possible you could upload the .blend?

"Before I bake, I assign the larger icosphere as the domain"  Only rectangular solids can be domains. an icosphere will not work.

I see that the obstacles are only surfaces (I assume), obstacles work better with mesh with thickness

@gandalf3
http://www.pasteall.org/blend/36462

There are several issues:

The scene is upside down. The Z axis (blue) always points up in world space. In the file provided, the view is upside down and the blue arrow appears to be pointing down. When righted, it looks like this:

So in your scene the the fluid emitter is actually below the domain and collision objects.
The fluid domain is always a box shape, as it uses the object's bounding box. When assigned to a non-box shape, this means that it will be a cuboid with the same dimensions as the shape.
If you replace the icosphere with a cube, the reasons for the odd behavior become clearer:

Note that I duplicated the domain object in this screenshot so that the domain bounds would be visible at the same time as the fluid
The collision planes are non-manifold. The fluid simulator has no way of determining where the insides and outsides of the 2D planes are, so it will guess, usually resulting in strange behavior.
Related: Fluid not filling container completely

If the fluid emitter object is moved above the collision objects and the collision objects are given volume and correctly oriented normals, then it appears to work:


text:
Planet surface material recreation
Recently I was working on a project in which I was attempting to re-create a planet surface similar to that of the one in the following image:

I was using the compositor to create the material for the surface. This is what I was able to get with the following node setup:

Would anyone we able to provide advice on how to better emulate the surface of the planet from the provided image? I believe it is of the planet Jakku from Star Wars, and my struggle is with regards to the grey mountainous areas that I can't quite seem to get right. I am new to Blender, so any advice is appreciated, thank you!

You should check this extensive answer to a similar question: http://blender.stackexchange.com/questions/31424/planet-texture-generator

A good material consist of the following element.

Diffuse map with no harsh reflection, usually resembling photos taken on an overcast day.
Normal map to improve the surface texture, usually to push the limitation of a lower polygon mesh to look really high in density.
Specular / Roughness map to provide information where the object is more reflective than other areas. Real material in the real world don't reflect in a linear fashion or have the same roughness over all of it's surface.
Ambient Occlusion map to improve cracks and fine crevices. Giving a fine touch to realism.
Dirt and Grime map added to improve on wear and tear like scratches, can be bundle with or multiplied with Specular map.

Note : If you look at the image you posted the planet you aim to achieve has an atmosphere. By looking at the blue glow around the planet we know that atmosphere exist in that image. The moon for example will never have a blue band of glow, because it doesn't have atmosphere. You will want to look into how atmosphere affects color at a glancing angle, normally the word used in CGI is "fresnel" effect.
And remember due to the harshness of the way sun light reflect off a close by celestial object like a planet. Stars would be very difficult to see with the naked eyes. That is to say not only your material but your understanding of how light behave in the background is needed to communicate realism.


text:
Why are my SVG imports so small?
I'm definitely a newbie with blender still, as I've dipped my toe in a bit being a video editor.  My issue is importing .svg saved from illustrator.  Just simple vectors with not too many paths.  Just a thick text company logo.  I want to bring in and extrude, light, etc.  I've done it before in older versions of blender with no problem.  Am I not doing something right? Can someone tell me how to get an eps saved as an svg from illustrator to size correctly?

there's an answer here: http://blender.stackexchange.com/a/35995/47 (question isn't the same, but the answer is)

The Grid Plane in Blender by default is 1m X 1m for every square. When you make a Vector drawing usually your Vector Editor (Illustrator / Inkscape) will be set to something standard like A4 or A3. The longest side of an A4 is about 30 cm. (one third of a meter), an svg the size of A4 would look like this in your Vector Editor.

Imported in Blender that looks like this:

SVG drawings are based on Scalar values, but when you use Vector graphics in a layout program or import into something like Blender the program needs to know what kind of world-dimensions the shape has. It's either pixels, cm, inches, meters, etc.
In Illustrator
You might have a tick-box checked to make your .svg export 'responsive'. From what I read this will omit any width / height / units information -- it assumes you want to use the .svg on the web or something. For more insight about how Illustrator saves / exports .svg files I recommend their built-in manual or support site.
In Blender
currently when the default SVG importer (io_curve_svg) encounters an .svg which has no dimensions or 'SVGUnits' it will treat the coordinates the same as it would if you had set the units to pixels in your Vector Editor.

Thanks for your elaborate and richly illustrated answer! Having encounterd this problem countless of times, I searched S.E. and followed along with your advice. However, it still scales wrongly. I tested by making my svg 1000x1000 mm (width="1000.4mm"  height="1000.4mm" ) and adding a rectangle of that size. However, in Blender, this rectangle becomes exactly (!) 1.25 m. Well, I can scale now everything to 80% and everything is fine,... but,... is there something I am missing?


text:
Create subscript text
I am creating some physics animations in Blender and looking for a way to create subscript characters in text objects (for all the indices). The only way I figured out is to place two separate Text Objects close to each other, but that's rather uncomfortable as soon as they get animated, edited, moved around etc.
Is there any better way?

method 1
The answer here shows how to add extended unicode characters to the body of a Text Object
For the subscript digits it's this range.
import bpy

obj = bpy.data.objects['Text']

start_char = ord(u'\u2080')
end_char = ord(u'\u2089') + 1
subscript = ''.join([chr(i) for i in range(start_char, end_char)])
obj.data.body = 'Regular' + subscript

The above image uses a font called "Junicode". Support for the sub/super script characters depends on the font you pick. Blender's default font (Bfont) has limited extended characters. You can find many good unicode TrueType fonts with extensive extended character sets.
For more superscript and subscript unicode sequences see the tables here:
Unicode subscript and superscript block
method 2
Add a Driver to the offset_x parameter of the superscript text object, to tell it to update its value based on the obj.dimensions[0] component of the regular script text Object.
You'll have to enable Auto Run Python Scripts from UserPreferences > File

You tweak the superscript size an offset_y to look right, and you might also include some default spacing between the regular script and superscript, here I added 0.1 to the width of the regular script to avoid getting too cramped.

Reasons not to use parenting or drivers
In quality typefaces (fonts) a lot of effort is put into the spacing between letters to make all letter combinations look as good as possible. Adjacent letters should never be too close or too far apart. Find a good font where this is implemented and you'll save yourself a lot of work.
Valid reason to use parent or drivers
If you need superscript and subscript at the same time. Blender isn't a dedicated typesetting tool for notation like LaTeX, and provides no convenient syntax for it. The suggested work-arounds might be sufficient.

wikipedia article about superscript and subscript subtleties in typesetting
The unicode chart at unicode.org

Method 01
Parent your superscript and subscript to the regular size text.  Then animate the parent.
Select in this order Text2 (Superscript), then Text3 (Subscript) then Text1 (ValueName)
Keystroke [Control P] Parent. Menu Appears.
Of course you might combine the Superscript and Subscript into one text object with a carriage return if that suits you.
Method 02
Consider creating your text in some other program such as Gimp or free equation editor or free document editors. Saving them as in image.  UV Map a plane and apply image as texture.
Assuming you are not emphasizing 3D Text.  No extrusion for example.
Otherwise you might consider using the same image as a displacement texture.

Starting from the idea of @Zeffii, you can use this script to determine the substripts and the superscripts too.

Select the text object
In the Properties Panel set 'Junicode' for Normal, Bold and Italic Font
In Edit Mode, set the character Style (in the Tool Shelf T): BOLD for SUBSCRIPTS, ITALIC for SUPERSCRIPTS
Run the script

-
import bpy

text = bpy.context.active_object
l = len(text.data.body)

def changeScripts(code, sub = True):
    if(sub):
        inc = 8272
    else:
        inc = 8256
    result = code + inc
    print(result)

    # special cases:
    # 1 superscript
    if result == 8305:
        result = 185
    # 2 superscript
    elif result == 8306:
        result = 178
    # 3 superscript
    elif result == 8307:
        result = 179
    return result

def applyChanges():
    newBody = ''
    for i in range(0,l):
        char_format = text.data.body_format[i]
        char = text.data.body[i]
        code = ord(char)
        #BOLD -> SUBSCRIPTS
        if char_format.use_bold:
            code = changeScripts(code, True)
        #ITALIC _> SUPERSCRIPTS
        elif char_format.use_italic:
            code = changeScripts(code, False)
        newBody += chr(code)
    text.data.body = newBody

applyChanges()

For subscript, you can always use "small caps" in the font tab (when editing).
See the pic for an example.
Note that:

it does only caps, with respective scale
it works in edit mode in a limited way: you check small caps and then type, you cannot select a part and apply small caps. So it works if you type while it's on. (there are script workarounds)

There are also script/addon ways to do this, using same, with a bit more freedom, like changing such property after, not in edit mode, or like using a certain rule to automate such formatting.
If you need such, say so, to complete my answer with those.
(They are probably worth only if you have lots of texts or if you need an automation of sorts. )

nice solution, here's a script for that: https://gist.github.com/zeffii/9864fa22e8148c3b9e2b

thanks :)    precisely cause you cannot later select and apply such (edit mode is weird here) I made this  https://github.com/JacquesLucke/animation_nodes/blob/master/nodes/text/character_properties_output.py   where you can also "select" (slice) the part you wanna change.  That is why I said "if u need automation etc, say so". But probably, as the question goes, manual mode will suffice.

yes, plenty of valid solutions


text:
How to make textures made in Blender appear in Unity3d?
So I am modeling a truck to be used in Unity. I colored different parts of the truck, but when I apply UV texture, it doesn't show up in Unity, but the colors do. What am I doing wrong, how can I make UV textures show in Unity? Thanks!

This is a bit of an off-topic, but related to Blender so makes sense to explain here too. Adding a UV texture from blender to your model in Unity is fairly simple, no more than dragging and and dropping the texture on to your model.
Here's an example of a model created, UV mapped and textured in blender:

Now to add to unity with the UV texture, all I needed to do is add the model from the project browser, then drag the UV texture file on top of it. Unity will automatically create or assign a material to the model, with the texture mapped to it. You can then edit the material properties in Unity.

Fantastic answer! I got it to work by saving as .fbx then moving the fbx file into the Unity editor window. Then I took my texture (PNG) and dragged it onto my model (a box in the shape of a brick for starters) and it worked!

Most likely you will have to import your texture to Unity as well as your model, then edit the object you have imported and its material. You often have to reassign the texture to the material inside of Unity to make the texture appear.


text:
How to invoke the mirror modifier object eyedropper command with python?
I'm creating a simple script where once executed it adds a mirror modifier to an object. The next step would be to invoke this button through the script and then I click on the object I want to mirror my selected object around:

But the command doesn't show up on the last executed command list and I can't find anything about it on the net. I just want to execute the command this button invokes.
my code:
import bpy from bpy.types import Menu

class MirrorPicker(bpy.types.Operator):
    bl_idname = "mirror.picker"
    bl_label = "Mirror Picker"

    def execute(self, context):
        bpy.ops.object.modifier_add(type='MIRROR')
        # the eyedropper code goes here somewhere
        return {'FINISHED'}

def register():
    bpy.utils.register_class(MirrorPicker)

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

if __name__ == "__main__": register()

related: http://blender.stackexchange.com/questions/30487/object-selection-box-with-eyedropper, but if you could make a similar operator that picks up the active object like in animation nodes.

so, the 1st link says that it can't be done with python. and where do i look for it in the animation nodes link you provided. if implementing manually means some uber level coding then i'm out of luck as i just do basic scripting to streamline my modeling workflow :)

then we can mark it as duplicate, because the answer is still the same.

Stumbled upon this (due to a link from zeffii) https://github.com/CGCookie/retopoflow/tree/63228e8ea25abc48388d83c534fbdc07ca53c61a/op_eyedropper  doesn't show an eyedropper  cursor, but works the same.


text:
Shader nodes are missing?
I have blender 2.69 and I've been following a tutorial on how to make text.
The only problem is when I go to add a glossy shader in the node editor it does not exist. Neither does the shader category.

It sounds like your render engine is set to Blender Render (also known as Blender Internal or BI) in the Info panel at the top of the window.
Try setting it to Cycles instead:

Make sure that the object of interest is selected in 3D View. The nodes in the Node Editor are specific to the object, so for instance, if you added a lamp into the scene and the lamp is selected in the 3D View, you won't be able to see the nodes in the Node Editor that relate to a Cube, Sphere, or other object.


text:
How to check whether a list exists?
How to check whether the list (of vertices) exists?
I want to append a new vertex to a list or create one if it does not exists.
if verts is not exist:
    verts = [[0,0,0]]
    edges = []
    faces = []
else: verts.append([1,1,1])

If you want to test whether a variable exists, you can follow this solution and see if it's in locals() or globals().  So your code would be
if 'verts' in globals() or 'verts' in locals():
    verts.append([1,1,1])
else:
    verts = [[0,0,0]]
    edges = []
    faces = []

You could initialize your list like:
verts = None

...
if verts is not None:
    verts = [[0,0,0]]
    edges = []
    faces = []
else:
    verts.append([1,1,1])

Also you could initialize everything:
    verts = []
    edges = []
    faces = []

and simply invoke append later on (without having the need to do any tests):
    verts.append([1,1,1])


text:
How to animate a cube pivoting more than once without affecting it's original position
Hi I'm in desperate need of help, I'm creating an animation for a Magic Cube.
http://www.youtube.com/watch?v=BcQ0xYWhX0k
This video shows what I need to create
So far I have been able to move the pivot of a cube one way and then again another by using an armature and an empty, however because these are now linked up I cannot figure out how to move the cube another turn
http://i33.photobucket.com/albums/d8...19at162154.png
here demonstrates the point i'm at, I have place empty cubes to show where I need the actual cubes to be, however if I attempt to link them the original position has changed. Is there anyway I can animate these cubes rotating with the one above them?
I'm new to Blender and have had to learn after using 3Ds max for a while I'm struggling a lot would really appreciate the help please! Also I hope this makes sense...

The image link is broken, maybe incomplete, please check.

Related https://blender.stackexchange.com/questions/42144/rolling-cube-animation-how-to https://blender.stackexchange.com/questions/7183/how-to-animate-a-cube-pivoting-more-than-once-without-affecting-its-original-po https://blender.stackexchange.com/questions/143046/how-can-i-roll-a-cube-around-its-edges-with-armatures https://blender.stackexchange.com/questions/69731/rotate-a-cube-on-a-plane-using-drivers https://blender.stackexchange.com/questions/119677/how-can-i-rig-a-cylinder-so-that-when-its-rotated-its-end-cap-will-not-penetrat

One way is to do this with help of empties. to parent them one after one:
For example, in the GIF below, D (the cube) is parented to empty C; C is parented to B; B is parented to A, which is the top-level parent here ("great-grandfather" :P). Then, insert keyframe for C, B and A in turn.
By using this method, the hierachy should be well planned before parenting, based on the expected rotation orders.

You may also want to replace the empties with armature of bones. You can see the hierachy better in this way since bones have head and tails, though a bit more complicated.
P.S.: For a pivot-switchable animation like this(especially with rotations), which can be really tricky, you have to find a way to control the pivots (better to be "pivot objects") to have them in position in time.

A driver based approach
In answer to Rolling cube animation. How to? which is marked as a dupe of this question, although I'm not too sure...
The cube is given a speed custom property, ie how many frames to move 1 blender unit.
location.x is driven by (frame / speed) where frame is current frame, speed is the custom prop.
rotation.y is driven by frames * radians(90) / (w * speed) w is the side dimension of the cube.  The cube will "roll" 90 degrees every w * speed frames.
location.z is driven by abs(cos(var) * sin(var)) var is the cube's rotation.

What you have to change in parameters if instead of cube you have a brick for example?

Simple case is scaling on y.  The driver is set up to rotate 90 degrees by the time it has travelled the width of the square edge it is "rolling" on.  Lets say for instance every 10 frames it travels one side's width, and hence rotates 90 degs, and steps up in middle on pivot.  Same would apply for a non regular brick w x b x h rolling on w x b would need a switch to rotate 90 in time to travel w frames when stepping on w,  then rotate 90 when in b frames, based on the angles step w for (0, 90), step b for (90, 180) etc  btw there's something strangely hypnotic about rolling cubes.

You might use a pivot constraint.

The Child Of constraint might be interesting as well.


text:
Why can I no longer easily navigate inside of this mesh?
While originally modeling a mesh, I was able to easily re-orient my view to inside of the mesh.  In the process, I made the following changes:

made the mesh completely hollow (removed some extraneous faces from the inside)
added texture

Now I can't seem to navigate or zoom into the mesh like I was doing earlier.  All I can do is get ridiculously close to the outer surface.  Even in wireframe mode, I either can't do this or it seems as if everything is zoomed in much too close to do anything productive.

You're likely in Orthographic view, rather than Perspective View. Press 5 on your numeric keypad to toggle between the two.
If for some reason you want to stay in orthographic view and still see the inside of the mesh.
Some options:

Hide faces that obscure the interior.
Use mask modifier on meshes to mask out some geometry.
Use view-clipping feature (⎇ AltB)
Invert the normals of your mesh (⎈ Ctrl⇧ ShiftN) and enable backface culling in 3D view > Properties

Added some alternative methods incase users want to stay in ortho mode.

for anyone struggling with this and finding that switching to perspective does nothing to help the issue... The problem is with the viewport Navigation Method settings, Specifically the Zoom Method (Edit>Preferences>Navigation>Zoom). Zooming decelerates closer to a poligon surface until you can't zoom any further because your camera is as close as it can get to it.
I'm still looking for a way to have viewport navigation IGNORE some meshes. like fog volumes which drives me mad that their bounds block my zooms and rotate but One work around to get ur camera inside those meshes is this:
Turning off "Orbit Around Selection" and togge On "Zoom to Mouse Position" will let you orbit around selection of mouse position (the poly surface it points at) which lets you rotate inside any mesh.

You are in Orthographic View, just Press "5" to switch to Perspective View, now you can zoom to the inside of the object.

why add the same thing the other answer already says?


text:
How do I remove weight from weight painting?
I am trying to remove some weight. I left click to add it, but I cannot figure out how to remove it.

From the Manual on  blend mode:
Subtract: In this blend mode the specified weight is subtracted from the vertex weights. The strength determines which fraction of the weight gets removed per stroke. However the brush will not paint weight values below 0.0.
Lighten: In this blend mode the specified weight value is interpreted as the target weight very similar to the Mix Blend mode. But only weights below the target weight are affected. Weights above the target weight remain unchanged.
Blur: tries to smooth out the weighting of adjacent vertices. In this mode the Weight Value is ignored. The strength defines how effectively the blur is applied.

You can enter edit mode, select the part(s) of the mesh where you need the weight changed (you can press C and also paint select) and in the Data panel (the button with the triangle) in the Properties context under Vertex Groups, set the weight slider to 0 and press Assign.

Paint zero weight to effectively remove it (zero weight has no effect)
If you want to remove the vertex from the group you can run the "Clean" tool, or manually select and remove the vertices from the group.
See: Weight Paint Mode -> 3D View Header -> Weights -> Clean

what i "the "clean" tool" ?

You can erase with draw brush. Change the weight parameter.

0.0: Deep eraser
0.3: Shallow eraser
0.7: Shallow brush
1.0: Deep brush

*Precautions:
Weight paint does not wet only vertex. Clicking on the vertex makes it dark.
Mirror side is not wet.
Weight values is recorded on the vertex data of the target mesh.
Vertex data is made only of the number of bones. When is it? Setting armature to parent. (with Automatic weight or with Empty group)
Please select together the target mesh and the bones in the order goes to the weight painting mode.
Operation: Shift+Click Selection of the bones. can be released by Shift+Double Click. This operation looks confusing.
When you paint the weight value is easy to understand and see while switching the object mode and weight painting mode in the Ctrl+Tab.


text:
Where can I change the settings for UV unwrap?
Angle based and Conformal for Blender 2.69? Are these still there?

Feel free to accept the answer if it worked for you.

When you unwrap, at the bottom of the Tool Shelf accessed by pressing T or press F6 to bring up the popup.


text:
Displaying the wireframe of a beveled Bezier curve
I'm following a tutorial in which a Bezier curve is supposed to represent a vine. The vine is a collection of control points with their bevel depth and bevel resolution set appropriately:

However, the vine in the tutorial's included .blend file displays its wireframe over the typical solid viewport shading:

In both .blend files, Object Mode is selected. How do I get my .blend file to display a wireframed Bezier curve?

Thanks to this answer, I realized that you need to check the "Wire" checkbox within the Object Properties panel.


text:
Realistic Cereal
I am trying to make an animation that has some cereal inside of it, and the camera will get somewhat close to it so I want it to look as realistic as possible without severely impacting performance. (I am using the Cycles render engine.)
Unfortunately, this isn't easy because if you zoom in, you will see cereal actually has many tiny holes on it and this is giving me a lot of trouble to reproduce. The reference image I am working off of is down below. I could get the colors and the base geometry somewhat correct, but I have no idea how to create that "baked" look where there are tiny holes and some sort of actual roughness. I am completely lost in this area and don't have any clue what to do or even begin with.
It would be desirable if the end result does not have a lot of geometry and is mainly procedural because I will have many copies of this object inside my end result.

What have you tried so far?

Not sure if it would work but you could try using low geometry spheres and making tiny boolean holes in the mesh, and only use the high quality ones in the area where the camera will zoom in.

good starting point from the performance angle: https://www.youtube.com/watch?v=CQ9VmCN2EsE - Are you planning to zoom all the way inside one of these tiny holes?

Here, you can try this.
Start with a torus object such as this (this is just the geometry/subdiv level I used, you can use as much or as little as you need, however I will decimate later):

The rest will be done with a shader such as this, almost completely generated from noise textures:

I started with a rather large (scaled down) Noise Texture, stretched by 2 on the X to make it more realistic (default looked stretched).

Then I made the little "micro holes" you mentioned by using a small (scaled up) Noise Texture, with a rather high detail level to give the most variance ( of cavity shape). I then used a ColorRamp to clamp alot of the values, so the holes don't "take over" the whole object.
NOTE - throughout the graph, you will see me mix the noise values with pure white using MixRGB nodes. This is because often the default "strength" (more related to contrast) of noise textures looks too strong when put through a bump node, and I don't feel the strength value of the Bump Node gives me the proper "control" over these strengths. Therefore, I control them by mixing them with pure white (often quite heavily).

I felt the large overall warp was lacking something, so I mixed it with yet another large Noise Texture, this one with a bit more detail.

I then mixed (multiplied) these values together, and used the result as the basis for both a Bump Node and an Ambient Occlusion node. I also used one of the large Noise Textures as a mix factor for a couple of "cereal colors. I then multiplied the cereal colors by the Ambient Occlusion values to make the distortion "stand out". I also used the colors by themselves as a small subsurface color contribution, to give a bit of that cereal "see-through corn glow" look.
Note - you can use stronger values for the Ambient Occlusion or a stronger mix factor than I did - this result looks rather subtle, I know, but I go on to use this as part of a particle system, and as particles, the detail stands out more. Change the values to your taste, but do it once the particles are made.

To make the mesh more conducive to being a part of a particle system, I used a decimate modifier. You can do this any way you like, or just start with "smarter" geometry than I did.

I then made a bowl and a plane with some "milk" and gave the plane a particle system. I also gave the "milk" a subsurface value to show the "immersed" cereal better. Make sure that Ambient Occlusion is checked in the render properties.

Here's the result zoomed in quite close:

Amazing shader! I appreciate the detail, it made it very clear. Thanks!

Hey, no problem. I just realized I made this in eevee, but it looks just as good (or better) in cycles. Also, I recommend using "un-subdivide" as opposed to "collapse" as I did in the example if you choose to decimate. It works way better - I don't know what I was thinking.

Almost like the donut tutorial, but in a single page!

I've also given a try, a bit long to explain but basically I've mixed different noises to have 3 levels of bumps, I've also mixed colors to have variations of brown, plus white sprinkles, and at last I gave a bit of Subsurface Scattering and glossiness. Of course it would need a bit of improvement but I think I'm not too far.
File :


text:
Multi Colored Smoke
I have two emitters in a smoke simulation (2.9). I want them to both emit different colors of smoke. How should I do this? The two colors of smoke should also interact with each other.

Simply set the smoke colour in the smoke emitter properties :

In the Shader Editor you can use the Volume Info node to feed the Color into the volume shader :

Thanks, I never thought it was this simple. Can the colors mix?

@EricXue Glad to help. Yes - the smoke can mix and will result in a blend of the colors.

As a side note, you need to re-bake simulations for the color to be taken into account


text:
Eevee shadow inaccuracy
I am experimenting with making some animations in Eevee because it renders much faster.
I created a simple animation where a few discs roll around and slice through a larger object. The issue is with the discs is how the shadows are rendered. Here is a photo (the disc is using a glossy shader):

It may seem like the disc is hovering above the ground, but in reality, it is not. The reason it looks that way is that the shadows seem to be cut off near the contact point between the disc and the ground. This gives the illusion that it is floating. It is not. Using Cycles, this is made obvious.

With cycles, the shadows are much more accurately rendered. Can I achieve similar realism using Eevee? Are there some settings that I need to tweak? Or is it not possible for my case?

Have you tried adding an Irradiance Volume and baking the light?

@MarkJackson no, will try that.

The Eevee "Contact Shadows" setting may help.  With the rendering engine set to Eevee, go to the light parameters for the light source casting the shadow.  There will be a "Shadow -> Contact Shadows" checkbox you can turn on, plus some settings you may need to adjust to get a good merge between the contact shadow and the other shadows.
Here's an example, with and without contact shadows turned on:
No contact:

With contact: