Textured Polygon Module: [Obsolete]

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Textured Polygon Module: [Obsolete]

Post by xXxMoNkEyMaNxXx »

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 :P

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.
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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygon Module: Test

Post by Jasoco »

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.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Textured Polygon Module: Test

Post by xXxMoNkEyMaNxXx »

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 :P. 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...
User avatar
IndieKid
Citizen
Posts: 80
Joined: Sat Dec 22, 2012 7:05 pm
Contact:

Re: Textured Polygon Module: Test

Post by IndieKid »

That is freaking good. :crazy:
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygon Module: Test

Post by Ref »

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).
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Textured Polygon Module: Test

Post by xXxMoNkEyMaNxXx »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests