Rendering particles in 2.42a


I am rendering a scene which includes halo particles which must be in front of an object (actually, it is smoke from a candle, and needs to be in front of the furthest rim of the candle). The particle emitter is located in the right place, however, the candle itself is rendering completely in front of the particles, obscuring them. This same scene rendered fine in 2.40.

I assume this has something to do with the new render layers, etc, but if somebody could point me in the right direction for getting these things to render right I’d appreciate it.


Unified Render was dropped after the noodles recode. Ton said they will find a way to get round the problem in a future release.


A future release? So you’re saying at present it’s not possible to have halos and solid objects render properly in the same image together? That’s not happy news at all.

However, actually I don’t think this should have required the unified renderer even before. In fact, in 2.40, I encountered some problems with the unified renderer and halos which did not occur without the unified renderer. I could always render halo particles without the UR, and they would always appear in the correct place. Although docs always advised to use the UR, I never had this kind of problem either with or without.

I’ve got the halo particles on the same render layer as the candle, and all buttons (“halo”, “solid”, etc.) are pressed down. Maybe there is a way to get the particles into the position I want by using compositing?

When I try to replicate that in CVS, it looks ok. I don’t suppose you can provide a screenshot?

Anyway if need be, you can make sure the halos are on top by making a new render layer that just contains the halos (only the scene layer containing the halos, and also only the halo pass enabled) and then alphaover or add them on top in the compositor.

Here are some screen shots. The first shot shows where the particles are in relation to the candle. The second shot shows the particles alone. The third shot shows the render with particles concealed behind the candle.

The angle I took these renders at is not the actual I want to render at. I took them this way so you could better see the problem, but in fact I want the camera lower, meaning that the particles are partially concealed by the front lip of the candle and over the lip that is further from the camera. Which means that rendering the particles out in front of everything will also not solve the problem exactly as I want to.

With all this fancy new rendering functionality something as basic as putting x in front of y and behind z can’t be impossible, can it?

I’d be all over a CVS build now, but is still down. Anybody else hosting those things?

You should be able to do this using the compositor nodes already in the current release version (2.42a). You just need two render layers, one rendering the scene layer with the candle, and the other with the layer the particles are on. Then turn on ‘do composite’, switch a window to the node editor, switch the node editor to composite mode (buttons at the bottom). A ‘use nodes’ button will appear. When you press it your first render layer and a output node will appear. From there you need to add your other render_layer input node and a z-combine node. Now connect the image from the candle render_layer to the topmost image socket on the z-combine, and the candle’s z output to the z socket of the z-combine. Finally connect the second render_layers image output to the other z-combine image socket and connect the z-combine’s output to the output node (composite or whatever it’s called).

I did all that from memory so things may be a little off. If you want I can make a demo blend, but I don’t have time right now!


Thanks, kitsu. I tried your suggestion (at least I think I did) and I’m still having the exact same problem. Bizarre. You can see my nodes here, and you can see everything looking good in the viewer except the flame/smoke is behind the candle, just as it was previously.

This may be a hint… For some reason, when I render with edge turned on, no edge appears around the candle, even though edge is selected on that render layer. Perhaps that is a clue to what I’m doing wrong with that candle?



My discription from yesterday was a little off, but it looks like you got it anyway :slight_smile:

Here is what is really odd though - I just tried to recreate your problem so I could try to fix it, but I didn’t have any problem to fix
^ Blend file ^

Try this blend and see what your results are. This was rendered using Blender regular release 2.42a. I’m guessing there is something odd going on in your scene. Maybe try sticking a cube behind the particals and see how it renders?

Very odd…


I’ve uploaded a blend. It’s just 100kb, just the candle and the flame, and the problem is persisting. I have no idea what’s wrong. Totally baffled.

(Sorry, but it seems trivial registration is necessary to download the file. If you don’t want to do this let me know and I’ll email the blend.)

If you turn off ZTransp in the candle’s material (Render pipeline) the particles render properly. Halos are generated by some weird Z-buffer trickery that I don’t pretend to understand.

Oh… The good news is that when I turn of Ztransp in the file I uploaded, the candle renders properly…

The bad news is that when I turn it off in the actual blend file I’m working on… the blasted thing is still not working. Same problem.

In any case, this gives me a little bit of a hint. I’ll keep poking around (the actual file I’m working on is pretty big, and I’d rather not upload it directly, if I can avoid it).

Maybe there are other materials with Ztransp in the complete scene. As you’ve seen it doesn’t matter whether they are behind or in front of the halos.


Thanks everybody for the comments. The solution was to turn off ztransp on the materials and not use a z-combine node to combine the two, but rather to put them both on the same render layer (there may be other ways to get the same result, but I got it this way).

Anyway, thanks very much for helping me with this… it was getting to be a bit of a headache!

Yes, but you got to play around with the compositor and to learn a bit more about how Blender works inside :smiley:

Also the next time someone has this problem you have kindly posted the solution!

By all means, that’s true. It was definitely worth checking out.

I’ve also become a node-compositor convert. That stuff is cool!

I know :smiley:
I’m so addicted to the nodes now that I use them when they arn’t even needed!

I have also had some problems with transparency (either ray or Z), volumetric light halos and render layers. This was for streetlights in a night time city that I built for a tutorial on openexr files that I’m working on. I too had to scrap the render layers and put the light domes and halo lights on the same layer as the buildings to get the desired result. Strange.

As far as compositing nodes go, I think they are the best thing to happen to Blender that I have seen yet and I can scarcely imagine working without them even though I’ve only been using them for a month or so!