  | 
  | 
 
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Hi,
  I just made my first OpenGL game, I called it InfinityTron and I haven't
released it yet (still got some bugs to fix), but it is mostly a remake of the
Classic Tron, and I have a few textures I made with povray, but I had some
difficulties:
  For rendering textures, I like to use an ambient lighting so the texture can
be repeated without problems.  I also like to use an orthographic camera, so the
image on the borders is not angled and can be repeated again with no problems,
however, I have some trouble figuring how to use the orthographic camera...
  Say I want to draw a 128x128 image, I will tell that to povray when rendering.
  Say I want the image to go from xy:(-1, -1) to xy:(1,1) I would use:
camera { 
  orthographic
  right 1 // or 2? or what?
  up 1    // or 2/ or what?
  location theLoc
  look_at theLookat
}
If I try rendering a box { -1, 1 }, it is full screen, however to have the full
box in the image I have to set the box to something like scale 0.56 or something
like that...
I think something is not right...
Have any ideas?
  Thanks,
	Simon
-- 
+-------------------------+----------------------------------+
| Simon Lemieux           | http://www.666Mhz.net            |
| Email : Sin### [at] 666Mhz net |        Povray and OpenGL Gallery |
+-------------------------+----------------------------------+
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
up and right need to be vectors, not just numbers. I use this:
camera {
 orthographic
 direction -y
 right     x
 up        z
 location <0,1000,0>
}
// plane for textures:
plane{
    y, 0
    texture {
        // whatever, from -1 to +1
    }
}
--
Tek
http://www.evilsuperbrain.com
Simon Lemieux <lem### [at] yahoo com> wrote in message
news:3AAFF1EB.E4BD0460@yahoo.com...
> Hi,
>   I just made my first OpenGL game, I called it InfinityTron and I haven't
> released it yet (still got some bugs to fix), but it is mostly a remake of
the
> Classic Tron, and I have a few textures I made with povray, but I had some
> difficulties:
>
>   For rendering textures, I like to use an ambient lighting so the texture
can
> be repeated without problems.  I also like to use an orthographic camera,
so the
> image on the borders is not angled and can be repeated again with no
problems,
> however, I have some trouble figuring how to use the orthographic
camera...
>
>   Say I want to draw a 128x128 image, I will tell that to povray when
rendering.
>   Say I want the image to go from xy:(-1, -1) to xy:(1,1) I would use:
> camera
>   orthographic
>   right 1 // or 2? or what?
>   up 1    // or 2/ or what?
>   location theLoc
>   look_at theLookat
> }
>
> If I try rendering a box { -1, 1 }, it is full screen, however to have the
full
> box in the image I have to set the box to something like scale 0.56 or
something
> like that...
>
> I think something is not right...
>
> Have any ideas?
>   Thanks,
> Simon
> --
> +-------------------------+----------------------------------+
> | Simon Lemieux           | http://www.666Mhz.net            |
> | Email : Sin### [at] 666Mhz net |        Povray and OpenGL Gallery |
> +-------------------------+----------------------------------+
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Tekno Frannansa wrote:
> up and right need to be vectors, not just numbers. I use this:
>
> camera {
>  orthographic
>
>  direction -y
>  right     x
>  up        z
>
>  location <0,1000,0>
> }
This camera looks like it should crash, since the default look_at is <0,0,0>.
I would use location <0,0,-4> direction z right x up y myself, and have a plane
z 0 for my texture.
Josh
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 
 | 
  |