[Bf-committers] Volumetrics Update and Question

Brecht Van Lommel brechtvanlommel at pandora.be
Fri May 16 22:21:24 CEST 2008


Hi,

>About particle volumetrics I have some questions:
>I could plug the volumetric core to anything that the raytracer handle or
>ray based, but particles seems that are nor raytraced at all (am I wrong?)
>and allthoug I have maked some test with halos and the new soft settigs
>and they could render a limited version of volumetrics with no world
>shadows at all (particles dont cast shadows on geometries) I am not
>satisfied with it, I could develop it as an option but the limited nature
>of halos does not make them a good candidate for particle volumetrics.

Indeed, halo's are fairly limited an don't work with raytracing.

>Solutions? Suggestions?
>
>I have thinking on make spheres/boxes at render time for every particle
>since they are properly raytraced ,and also have develop the multipoint
>falloffs, that, as an option to, could be used for the "window effect"
>(using raytraced surfaces to reveal the volumetric world behind like a
>window in a room)
>
> I really need to know sugestions because it keeps me from moving foward
>to particle volumetrics.For plug the core I will only need an entry
>point,direction and a ShadeInput structure or al least a material asigned
>one and properly shadow detected for the current render.
>
>  I could not avoid to start thinking on my next moves while I still coding
>pending features, but It have save me time before. Now I'm concern because
>its near the day when I will jump to volumetric particles and havent find
>a correct solution yet.

The easiest solution is probably to replace the particles created with RE_inithalo_particle in convertblender.c if some volumetric option is enabled in the material and then make spheres/boxes instead. Then it will get raytraced automatically and will be compatible with your existing code.

Another solution is to add support for raytracing halo's. The advantage is that it won't take up as much memory and will probably raytrace faster for many particles, but it is more work.

The first solution should be reasonably simple to add, so you could start with that.

>Also I need to know how to access to the particle position and data for a
>given time (where in the code are that?)

I don't think there is a simple way to get the position for any given time. The whole dependency graph and particle system should be updated to get the particle at a different time than the current one. But what is this for? Or are you asking for the place in the code where the particle system is exported to the render? That's in render_new_particle_system, convertblender.c. For halo's then RE_inithalo_particle is eventually called which creates a halo.

Brecht.






More information about the Bf-committers mailing list