Raytracing particles?

Hi,

I know I’m probably beating a horse, but I have a question. I have no coding experience, I’m merely opening a thread for blender’s users to throw around ideas on how to get raytraced particles…whether it be real or faked raytracing. Also, I appreciate all of the efforts of jahka in overhauling the particle system. :slight_smile:

I know that in the current particle system, halos are not real objects and therefore can’t be reflected or refracted or cast shadows, etc, etc.

My question is…what would it take to get raytraced particles?

Is there a way to “fake” raytracing of halos? I noticed that blender’s spotlights have a new method of shadow casting that mimic raytracing…can something similar be done to particles?

Maybe if a temporary object was inserted in place of a halo then raytraced…then manipulate the halo to look like the result (probably not the most efficient method).

Any other ideas?

jaycun

Halos are often used to represent light sources. In those cases, if any raytracing needs to be done, the halos would be the sources, so all you need is to place a lamp near the particle emitter (or duplivert over an Alt-DKEY copy of the emitter it if you need very accurate lighting).

Probably, though, you’re asking for volumetrics. Faking volumetrics depends on the task at hand, but usually involves multiple emitters producing particles in similar paths with different colors.

Volumetrics? I don’t believe I know much about that…

Raytracing particles is not the issue – it’s raytracing something with a halo material, which particles have by default. For example, if you duplivert a simple mesh onto the emittor, creating bunch of little mesh particles, they will reflect, cast shadows, etc. Now, if you want big puffy halos to do that, it’s not going to work.

Also, for what you’re trying to do, is raytracing a complete necessity? Have you tried envmaps, which can work very well, and will show halos?

Maybe if a temporary object was inserted in place of a halo then raytraced…then manipulate the halo to look like the result (probably not the most efficient method
Ah! I think I get it. Well, here’s a suggestion that’s worked for me in the past:

  1. On an empty scene, set up your halo the way you want it to look. Render it on a black background, save to a file.
  2. Open your scene. Create a plane, use the rendered halo as a texture and as a transparency mask (you may have to create a separate black-and-white file so you can adjust the alpha separately.) If your halo is supposed to represent a light source, don’t forget making the texture emissive.
  3. Add a Track-To constraint, causing its Z or -Z to point to the camera object.

So far this gives you something that looks like a halo to the camera. Create duplicates as needed to account for reflecting surfaces; you might group them to keep them together. And if you need them coming out of a particle emitter, there’s dupligroups.

well, i’ve already used envmaps with halos (they are nice). But how to get stuff like refraction of halos and shadows…that is the question…

well, I believe that nobody in the industry is really raytracing particles in major productions, which is a typical expensive element, but using workarounds, solutions ‘in between’ and lot, I mean lot of eye-cheating. Remember that cheating is more important than brute force most of the times.

ok…finally…after messing around in photoshop a bit (i know it looks bad…but keep with me).

Ok…I used quite a few particle tricks throughout my past experiments.
but I keep running into a wall with raytracing halo (duh…cus ya can’t raytrace halos :wink: )

My idea/proposition would be to pseudo-raytrace particles…why? Well, because it would look cool…but also b/c it would give way for another channel of creativity.

Anyway…i don’t know if this has been thought of before (pardon me if it has)…but i’ll go ahead and pitch this idea. The method is really simpler than what I thought it would be.

To pseudo raytrace halos involves very little (in fact…zero) raytracing. it involves replacing the halos with a (very simple) mesh, perhaps just a circle oriented toward the camera. Raytracing occurs as normal, but the rays of light that reflect off the substitute mesh are stored. When the render is done it will look something similar to this. (Suzanne is emitting sphere particles under a distorted raytraced plane. The cylinder is a raytraced mirror)

http://img.photobucket.com/albums/v209/jaycun/all.jpg

However, since all the places where the (spheres in this instance) appear are already stored somewhere, all that is required is to “cover up” the spheres with a halo-like shading. Similar to this…(ignore the imperfections please…this is just to illustrate the general idea).

http://img.photobucket.com/albums/v209/jaycun/all-1.jpg

Now this could be done manually, but it can be a real pain. If blender could do this automatically, then it would appear as though halos can be raytraced (something new!).

I think this idea can also be applied to halos casting shadows (like smoke) by setting the size of the simple mesh to the size of the halo, applying the halos textures to the mesh and render.

That is my idea for pseudo raytraced halos. So…what does everyone think?

PS… Mods, you might have to move this to Blender Tests forum.