[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Bump mapping



Lì martedì, 2004/06/29 alle 15:41, -0700, Jasper Phillips ha scritto:
> As I posted a while ago, I want a clothify filter that I can use on
> dynamically created maps.  After some investigation I found that this was
> equivalent to bump mapping a carefully crafted image, so I hacked gimp to
> spit out a bump map it generated for clothify, made it seamless, and am
> tiling that to bump-map my map-images.
> 
> This was rather slow, so I've set it up so that the "shade map" that the
> bump-mapping algortihm calculates from the bump map can be saved as an image
> which can just be applied without any undue arithmetic.  Much faster, but
> still taking ~7 seconds for larger images.

you have a lot of math. have you tried psyco? that should speed-up your
math a lot.

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog@debian.org
INIT.D Developer                                           fog@initd.org
  Mi piace schioccare la lingua fortemente.
                                        -- Maria Luisa Benedetta Panzani