Projection of a Planar Texture onto a Mesh

Projection of a Planar Texture onto a Mesh

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Projection of a Planar Texture onto a Mesh

Post by Argh »

Uh... medium-difficult OpenGL question... how do I go about applying a projection of a texture onto a collection of triangles? I.E., I want to do a planar projection onto a Unit... how do I do that? IIRC, jK wrote a cubemap projection for some thing in CA... I want to do a simple, one-plane projection. How do I get the positions of the texture coordinates right?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Projection of a Planar Texture onto a Mesh

Post by jK »

glTexGen
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Projection of a Planar Texture onto a Mesh

Post by Argh »

Looked at this... http://pyopengl.sourceforge.net/documen ... en.3G.html

I guess I'll have to go read through how this works a bit more to understand how the heck to apply this. Maybe a spheremap can fake what I want to do.
Post Reply

Return to “Lua Scripts”