FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Responsive Form, Games
(Moderator: REAS)
   RenderToTexture
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: RenderToTexture  (Read 417 times)
v3ga

WWW Email
RenderToTexture
« on: Oct 7th, 2003, 11:11pm »

Hello,
 
http://www.2roqsmuseum.net/Members/V3ga/P5/RenderToTexture/ is showing a RGB cube drawn on screen, then copied into a texture and then mapped onto a mouse controlled cube. Strange distortions appear...
« Last Edit: Oct 8th, 2003, 4:00pm by v3ga »  

http://v3ga.net
JohnG

WWW
Re: RenderToTexture
« Reply #1 on: Oct 8th, 2003, 12:42am »

Oooh. I remember being taught about this at Uni when we did a course on 3D graphics.
It happens because of the way the two triangles that make up each face of the cube are drawn, not being the same.  
 
Even though you're using QUADS I think they'll still get translated to triangles at some point, and at the boundary between the two you can get an effect that looks like the two tris aren't actually flat, and that they're slightly convex. But I can't for the life of me remember what it's called, or how to avoid it.
 
It's probably to do with the centre-point of each triangle being at a different distance, so the innacuracies in the sin/cos implementation cause the maths of squashing the texture more with distance to be slightly different for each , causing the distortion.
 
Or I could be completely mis-remembering a course I did 4 years ago.
 
Pages: 1 

« Previous topic | Next topic »