[Sidefx-houdini-list] baking coverage into point particles

Michael K. O'Brien mobrien at pixar.com
Thu Dec 10 12:12:56 EST 2009


Hola~

Thanks, I'll give it a go.

Houdini is really good about allowing data to jump between contexts. It would
be really cool if Houdini was able to better integrate rendering/shading logic
into the interactive contexts.

The vop stuff goes part of the way, but it would be great if you could do
things like run the illuminance loop from sops w/out having to fire up mantra
to do it. Something to think about.

MO

>-- On Thu, Dec 10, 2009 at 12:08:19PM -0500, Mark Elendt wrote:
> On Thursday Dec 10 at 08:28, Michael K. O'Brien wrote:
> > > Or do you need it geometrically?
> > > If you have a DSM/DCM, you should be able to sample the data in a VEX
> > > SOP.
> > 
> > That sounds promising, I'll have to figure that out. I'm not really all that
> > familar with Mantra. Are there any things I need to worry about?
> 
> The tricky thing will be to get the point into the space of the shadow
> map.  Aside from that, the VEX code would be something like:
> 
>     sop
>     bake_coverage(string map=""; export float coverage=0;
> 	    float spread=0, bias=0, quality=1)
>     {
> 	if (map != "")
> 	{
> 	    vector	pp = transform_into_light_space(P);
> 	    vector	opacity;
> 	    opacity = shadowmap(map, pp, spread, bias, quality);
> 	    coverage = max(opacity);
> 	}
>     }
> 
> If you have a deep camera map, you can get other variables out of the
> map too (using the "channel" keyword argument to the shadowmap
> function).
> 
> The shadowmap call expects mantra NDC coordinates:
>     P.x in (0, 1)
>     P.y in (0, 1)
>     P.z the z-distance from the light source
> all in the space of the light.
> 
> You might be able to transform based on the Houdini light, or
> alternatively, you can use teximport() to extract the projection
> values out of the DSM.  I don't know of any code out there that does
> the automatic transformation though.
> 
> > > There may be other solutions (with either VEX ray-intersection (yes
> > > there is ray intersection in SOPs) or the Ray SOP).
> > > 
> > > How many points?
> > 
> > 100k ish.
> 
> -- 
> Mark Elendt
> 
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

-- 
Michael O'Brien                                                         Tools
Pixar                                                       mobrien at pixar.com

Censorship is the mother of metaphor.
                            -Jorges Luis Borges



More information about the Sidefx-houdini-list mailing list