On Nov 1, 2:51 pm, B W <[email protected]> wrote:
> On Sun, Oct 31, 2010 at 4:50 PM, Jonathan Hartley <[email protected]>wrote:
>
> > For the record, I'm working through these pyopengl tutorials right
> > now. In case anyone else with old hardware is considering it, you
> > should know:
>
> > It's all been plain sailing up until the seventh tutorial, which adds
> > multiple light sources:
> >http://pyopengl.sourceforge.net/context/tutorials/shader_7.xhtml
>
> > I'm stuck on number 4. My problem is with the shader code, which operates
>
> on the same color buffer for both sets of vertices. This doesn't fit in a
> consolidated batch paradigm. Not entirely stuck; I'm thinking now two
> batches will be needed, or two shaders. (Or maybe I'll just skip this one,
> which appears would be best solved as it is. It is conceptual, not something
> I envision doing in a real application.)
>
> Did you convert these examples to Pyglet batches, Jonathon? I'm curious to
> see what you've accomplished.
>
> Gumm

Hey.

No, I haven't converted them to pyglet batches. I'm just using pyglet
to provide a window. I've stuck pretty close to the source code
directly from the pyopengl tutorials.

My source is here:
https://bitbucket.org/tartley/tutorials/src/71791893891b/pyopengl/
(except somehow I managed to lose my version of tutorial 4, I think I
saved over it with tutorial 5.)

The only significant deviations I've made from the original tutorial
source are:

a) remove all use of uniform arrays, as I mentioned before.
b) From tutorial 6 onwards, the RGBA values for lighting & materials
seem strangely chosen, to me. The specular highlights are so large
that they cover fully half of the sphere, and the other components are
so dark that the circle is pretty much black if you comment out
specular highlights. Is this just me, or do other people see the same?
To fix it, I turned up the ambient and diffuse brightnesses (both
light and material) to about 0.6, made the material colored and
changed the lights to be nearer to white, and I increased the material
shininess from 0.995 to about 50, much reducing the specular
highlights in size. This generates images more in keeping with how I
expected it to look. The three components (ambient, diffuse and
specular) can now be all be clearly seen and visually distinguished.

When I'm done I'm going to return to this other tutorial:
http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-1:-The-Graphics-Pipeline.html
which I started yesterday, but abandoned because in my translation
from C to Python, I've failed to get anything visible to show up.
Maybe I can figure how I broke it with fresh eyes later tonight.

  Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to