On Fri, May 05, 2006, Jan Ciger wrote:
> > 1) Images are currently sent to OpenGL decoded.  This is wasteful of
> > ram and CPU power.  Decoding should only happen when nessesary.
>
> Am I missing something or OpenGL suddenly knows how to deal with e.g.
> Jpeg or PNG format? You need to decode the image before putting it into
> a texture.

You misunderstand.  Look in your materials directory.  When Soya loads 
an image, it decodes it in RAM, saves it decoded as a "Material" pickle, 
so it can be sent to OpenGL without extra fuss.

I'm arguing that, especially for larger games, a more tightly 
integrated image-loading system could "load" just the vitals, if 
nessesary save as still-encoded, and only decode when it's actually 
going to be used.  IE, when a 3d object is thrown in which needs it.


> This you can do as well with a series of individual pictures if really
> necessary (see Sprite class in PyGame). It doesn't make any difference
> when it comes to the point of displaying these frames by OpenGL. Hardly
> a feature I would consider breaking an API for.

Who said anything about breaking the API?  From the "game developer" 
standpoint the API would be mostly unchanged.

IE, this would still return a soya.Image:
 i = soya.Image.get("filename.png")

The only possible change is to_pil could go away, or it could even be 
kept since PIL technically supports animated images. 

Runtime dependencies are another problem for Soya because we need to be 
able to count on Soya being able to handle a certain set of images on 
every system, every distro.

This is not to say that image decoding/etc needs to be in Soya, but PIL 
doesn't have what we need nor can we reasonably add what we need to PIL, 
so at the very least, a small PIL replacement needs to be created to 
load the formats we care about (we don't care about the others).


> >
> > 2) PIL doesn't support APNG, MNG, or Ogg Theora
> 
> What for? These are formats for animations/videos. What do you need
> those for? Do you want to make a movie player in Soya?

Animated textures, landscapes, etc.  We need to be able to still use 
soya.Image, pass this to the appropriate function, and have it work.  
Being able to display a short Ogg Theora video as a 3d texture is also a 
very cool idea.

I want to see water surface with animated bump maps rendering fluid 
waves, particles and sprites that are elegantly animated, and billboards 
made to look like projector screens with humerous/fake ads on them.


> > PIL is dual-licensed, meaning they only GPL older versions while making
> > people pay for the newest.  For this reason I don't want to contribute
> > to them to add APNG/etc support (nor do I want anyone else to).
>
> This is really politics and ideology and has little to do with
> technological merits of using one library or another. I am not saying
> that it is not important, but if we should break something that works
> only on ideological grounds, that is not sound decision.

To re-iterate, we are not talking about breaking anything.  This is 
discussion of how to add APNG/MNG/Theora support to Soya cleanly and is 
seperate from any API changes that may need to be done to soya.Image.

This is also primarily about politics or ideology.  The PIL authors do 
not offer access to their most recent sourcecode for free, you will have 
a very difficult time proposing patches to them, and if they accept 
them, those patches will not be available to the community for many, 
many months.  Possibly over a year.  Virtually nobody from the community 
contributes to PIL, it's a commercial endevour which tosses our 
community it's leftovers when they release a new version.


If you are comfortable doing free work under these conditions and feel 
it's vital for PIL to have support for these formats, then I think 
you're volunteering.  Have at it.  Don't imply any of us should.

I will not work on proprietary code, giving someone else copyright under 
a verbal agreement that they will release my changes under the GPL after 
they've profited by selling my code for a few months.  This is also not 
an option for the work any student is doing for Summer of Code since 
there's an agreement in place that any code they write be free/open.

_______________________________________________
Soya-user mailing list
Soya-user@gna.org
https://mail.gna.org/listinfo/soya-user

Reply via email to