Re: [pygame] how to remove spam comments in pygame wiki

2009-07-27 Thread René Dudfield
Hi,

it's on my todo list to clean them up.  I've got some scripts to do it...

cheers,



On Tue, Jul 28, 2009 at 7:50 AM, Paulo Silva  wrote:

> i don't know... maybe Pete Shinners?
>
> On 7/27/09, Horst JENS  wrote:
> > Am Sonntag, den 26.07.2009, 22:06 +0100 schrieb Paulo Silva:
> >> would be great if we can notify them for the administrator removing
> >> them - if we allow anyone to remove everything, the same spammers may
> >> wish to remove very useful information we waste our precious time on
> >> posting them...
> >
> > who is the official wiki admin to notify ?
> >
> > -Horst
> >
> >
> > --
> > Horst JENS
> > horst.j...@chello.at
> > http://members.chello.at/horst.jens
> >
> >
>


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Casey Duncan

You can draw wireframes instead of fills by setting:

glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)

Then draw your geometry as desired.

Note this has the same limitations and drawbacks as GL_LINE, but for  
simulating old-school vector graphics it works pretty good. You can  
control whether or not a particular edge is drawn using edge flags.  
That way interior edges that exist just for tessellation, don't  
clutter up the rendering.


What typically looks good is to do a first pass at low alpha with a  
wide glLineWidth, then render again with a higher alpha and a lower  
width. Last draw with line width set to 1 (or whatever) and full  
alpha. Gives a decent glowing vector line effect. Also be sure to  
enable multisampling to combat aliasing.


I attached a screenshot of a model rendered using this technique. The  
code that produced it can be found here:


http://code.google.com/p/caseman/source/browse/trunk/eos/tools/show_obj.py

<>




The libraries it uses to load the model and draw it are there as well.

hth,

-Casey


On Jul 27, 2009, at 2:06 PM, Paulo Silva wrote:


no, my idea is doing simple poly games, a bit like those 3d games from
Amiga time (such as Robocop3 and many others) - very flatcoloured -
but i really wanted so have the meshes wireframed - thanks for all
useful info! :)

On 7/27/09, Ian Mallett  wrote:
Yes, unfortunately.  That may be a problem, especially if the  
object is high
poly.  There are more complex methods that use shaders.  One of the  
better

ones I've found is:

Render the scene to two textures, one RGB and the other depth
Apply an edge-detection filter to the depth texture (no edge =  
white, edge =

black)
Multiply the two textures together on a fullscreen quad.

The problem here is you'd need shaders if you want to only have one  
pass,
which may be overkill.  (MRT to render to both textures  
simultaneously or
storing the depth in the alpha channel of the texture).  If you  
want to use
fixed function, you'd need two render-to-textures; one for each  
texture--and
so there wouldn't really be an advantage to this method over the  
original

one.

There's also normal-based edge detection, which I have tried as  
well.  It's
simpler, though you'll probably need a shader here too.  This  
unfortunately
suffers from line-thickness, which may or may not be a problem.   
You'd only

need one pass though.

HTH,
Ian





Re: [pygame] how to remove spam comments in pygame wiki

2009-07-27 Thread Paulo Silva
otherwise, it's extremelly important Pygame being plenty of small
snippets, and having them on places like wiki or www.pygame.org/docs/
is extremelly important, specially for newbies like me

On 7/27/09, Paulo Silva  wrote:
> i don't know... maybe Pete Shinners?
>
> On 7/27/09, Horst JENS  wrote:
>> Am Sonntag, den 26.07.2009, 22:06 +0100 schrieb Paulo Silva:
>>> would be great if we can notify them for the administrator removing
>>> them - if we allow anyone to remove everything, the same spammers may
>>> wish to remove very useful information we waste our precious time on
>>> posting them...
>>
>> who is the official wiki admin to notify ?
>>
>> -Horst
>>
>>
>> --
>> Horst JENS
>> horst.j...@chello.at
>> http://members.chello.at/horst.jens
>>
>>
>


Re: [pygame] how to remove spam comments in pygame wiki

2009-07-27 Thread Paulo Silva
i don't know... maybe Pete Shinners?

On 7/27/09, Horst JENS  wrote:
> Am Sonntag, den 26.07.2009, 22:06 +0100 schrieb Paulo Silva:
>> would be great if we can notify them for the administrator removing
>> them - if we allow anyone to remove everything, the same spammers may
>> wish to remove very useful information we waste our precious time on
>> posting them...
>
> who is the official wiki admin to notify ?
>
> -Horst
>
>
> --
> Horst JENS
> horst.j...@chello.at
> http://members.chello.at/horst.jens
>
>


Re: [pygame] how to remove spam comments in pygame wiki

2009-07-27 Thread Horst JENS
Am Sonntag, den 26.07.2009, 22:06 +0100 schrieb Paulo Silva:
> would be great if we can notify them for the administrator removing
> them - if we allow anyone to remove everything, the same spammers may
> wish to remove very useful information we waste our precious time on
> posting them...

who is the official wiki admin to notify ?

-Horst 


-- 
Horst JENS
horst.j...@chello.at
http://members.chello.at/horst.jens



signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Ian Mallett
Sure :-)


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Paulo Silva
no, my idea is doing simple poly games, a bit like those 3d games from
Amiga time (such as Robocop3 and many others) - very flatcoloured -
but i really wanted so have the meshes wireframed - thanks for all
useful info! :)

On 7/27/09, Ian Mallett  wrote:
> Yes, unfortunately.  That may be a problem, especially if the object is high
> poly.  There are more complex methods that use shaders.  One of the better
> ones I've found is:
>
> Render the scene to two textures, one RGB and the other depth
> Apply an edge-detection filter to the depth texture (no edge = white, edge =
> black)
> Multiply the two textures together on a fullscreen quad.
>
> The problem here is you'd need shaders if you want to only have one pass,
> which may be overkill.  (MRT to render to both textures simultaneously or
> storing the depth in the alpha channel of the texture).  If you want to use
> fixed function, you'd need two render-to-textures; one for each texture--and
> so there wouldn't really be an advantage to this method over the original
> one.
>
> There's also normal-based edge detection, which I have tried as well.  It's
> simpler, though you'll probably need a shader here too.  This unfortunately
> suffers from line-thickness, which may or may not be a problem.  You'd only
> need one pass though.
>
> HTH,
> Ian
>


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Ian Mallett
Yes, unfortunately.  That may be a problem, especially if the object is high
poly.  There are more complex methods that use shaders.  One of the better
ones I've found is:

Render the scene to two textures, one RGB and the other depth
Apply an edge-detection filter to the depth texture (no edge = white, edge =
black)
Multiply the two textures together on a fullscreen quad.

The problem here is you'd need shaders if you want to only have one pass,
which may be overkill.  (MRT to render to both textures simultaneously or
storing the depth in the alpha channel of the texture).  If you want to use
fixed function, you'd need two render-to-textures; one for each texture--and
so there wouldn't really be an advantage to this method over the original
one.

There's also normal-based edge detection, which I have tried as well.  It's
simpler, though you'll probably need a shader here too.  This unfortunately
suffers from line-thickness, which may or may not be a problem.  You'd only
need one pass though.

HTH,
Ian


Re: [pygame] write gif animation?

2009-07-27 Thread Alexandre Quessy
Here is how I have done it using mencoder in Twisted :
http://code.google.com/p/toonloop/source/browse/trunk/py/toon/mencoder.py

a

2009/7/27 Ian Mallett :
> I used to make movies from my PyGame applications by using
> pygame.image.save(...)--or sometimes the OpenGL equivalent--to save to a
> file.  I then imported these into Animation Shop Pro (an old version ~1999)
> and saved as a .gif or .avi.  I definitely think a .gif animation file
> creator would be an excellent addition to PyGame...
>



-- 
Alexandre Quessy
http://alexandre.quessy.net/


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Paulo Silva
thanks! (pressuposed i understood the same object must be drawn twice,
as shape and as wireframe?)

On 7/27/09, Ian Mallett  wrote:
> #Draw the object here
> #Disable texturing, lighting, etc. here
> glColor3f(0,0,0)
> glLineWidth(4) #or whatever
> glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
> #Draw the object here
> glPolygonMode(GL_FRONT_AND_BACK,GL_FILL)
> glLineWidth(1) #also or whatever
> glColor3f(1,1,1)
> #Enable texturing, lighting, etc. here
>


Re: [pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Ian Mallett
#Draw the object here
#Disable texturing, lighting, etc. here
glColor3f(0,0,0)
glLineWidth(4) #or whatever
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
#Draw the object here
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL)
glLineWidth(1) #also or whatever
glColor3f(1,1,1)
#Enable texturing, lighting, etc. here


[pygame] opengl from python - drawing wireframe shape colours and contour in the same time

2009-07-27 Thread Paulo Silva
hi!

do someone know how can we draw opengl shapes with plain colour fill
and outline, with different colours, at same time?
a good example is what were used on the Area 4 of Rez:
http://www.youtube.com/watch?v=aAncDNDsv7s , and some games from Kenta
Cho (which also uses OpenGL)

(sorry posting this message at pygame mailing list as well, maybe
there are good audience can answer, and thanks in advance too)

thanks!


Re: [pygame] write gif animation?

2009-07-27 Thread Ian Mallett
I used to make movies from my PyGame applications by using
pygame.image.save(...)--or sometimes the OpenGL equivalent--to save to a
file.  I then imported these into Animation Shop Pro (an old version ~1999)
and saved as a .gif or .avi.  I definitely think a .gif animation file
creator would be an excellent addition to PyGame...


Re: [pygame] write gif animation?

2009-07-27 Thread Paulo Silva
would be a good idea capturing each frame into a file, and joining all
externally with gifsicle from a command line shell call? i used to do
it a lot on sdlBasic, and surelly it will work on pygame...

On 7/27/09, Jake b  wrote:
> What's the best way to convert to a gif animation? I have a list of
> Surfaces, that I will use as each frame.
> Searching, it looked like PIL is the answer, but the installer requires
> python 2.2, while I have 2.5.
>
> --
> Jake
>


Re: [pygame] write gif animation?

2009-07-27 Thread Alexandre Quessy
Hi Jake,
Either install PIL for Python2.5, if possible, or use an other
external software.
I use imageMagick a lot. The command-line executable is called "convert".
See the online doc for how to use it.
I personnally use Twisted for handled subprocesses... but you could
use subprocess or os.system.

a

2009/7/27 Jake b :
> What's the best way to convert to a gif animation? I have a list of
> Surfaces, that I will use as each frame.
> Searching, it looked like PIL is the answer, but the installer requires
> python 2.2, while I have 2.5.
> --
> Jake
>



-- 
Alexandre Quessy
http://alexandre.quessy.net/


[pygame] write gif animation?

2009-07-27 Thread Jake b
What's the best way to convert to a gif animation? I have a list of
Surfaces, that I will use as each frame.
Searching, it looked like PIL is the answer, but the installer requires
python 2.2, while I have 2.5.

-- 
Jake