I just wanted to share with you what textured polygons might look like prior to completion (correct math). My 3D Rendering engine went through something like this
In this version, the quadrilateral appears to have a correct representation of the image about half the time, so it must only work for the front of the quad.
Textured Polygon Module: [Obsolete]
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Textured Polygon Module: [Obsolete]
- Attachments
-
- Textured Polygons.love
- Sometimes it works, sometimes you see the vanishing point. :D
- (25.69 KiB) Downloaded 121 times
Last edited by xXxMoNkEyMaNxXx on Sun Jan 20, 2013 7:44 am, edited 1 time in total.
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Textured Polygon Module: Test
I just want a function that I can pass an image (Or image and quad) and some 3D rotation values to that will draw the image/quad at that perspective. Since we can only skew, but we can't perspective distort yet. If I had this ability, and it didn't suck up too much processor time, my game would be so much cooler and impressive when I reveal it.
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: Textured Polygon Module: Test
My module requires:
Camera position
Camera rotation
Surface position
Surface rotation
Surface size
Image
Repeat every
However, it may not be functioning properly yet. When I look at the main.lua, I think "compact". I still don't know what your rotation system is, but I'm willing to bet it's not quaternions . Really the only other option is matrices... did I answer my own question?
Perhaps I'll just make an acceptable vertex system interpolater, because I just had an ultimately simple idea. Yeah, everyone will enjoy this. Tommorow. Possibly not because of life...
Camera position
Camera rotation
Surface position
Surface rotation
Surface size
Image
Repeat every
However, it may not be functioning properly yet. When I look at the main.lua, I think "compact". I still don't know what your rotation system is, but I'm willing to bet it's not quaternions . Really the only other option is matrices... did I answer my own question?
Perhaps I'll just make an acceptable vertex system interpolater, because I just had an ultimately simple idea. Yeah, everyone will enjoy this. Tommorow. Possibly not because of life...
Re: Textured Polygon Module: Test
I'm with Jasoco on this except I only want to efficiently texturize a polygon (would settle for distorted quad or triangle).
Your script seems to be acting more like a stencil than texturing as the texture on the surface changes as the surface moves.
Still having trouble with understanding GISL.
Looks like you're on the right track (almost).
Your script seems to be acting more like a stencil than texturing as the texture on the surface changes as the surface moves.
Still having trouble with understanding GISL.
Looks like you're on the right track (almost).
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: Textured Polygon Module: Test
Nevermind the acceptable one, this will be correct and will only require:
Code: Select all
local texture=require'Perspective'
texture.preload(true) --Sets pixel effect
texture.quad(image,v1,v2,v3,v4) --draws quad
Who is online
Users browsing this forum: No registered users and 46 guests