CGTalk > Technical > Graphics Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-09-2006, 07:35 PM   #1
staigerman
Veteran
portfolio
Philip Staiger
USA
 
Join Date: Nov 2004
Posts: 68
Lua script for Polar mapping correction of seamless textures

If you texture a sphere you know how it can pinch the poles and show seams. There are tools for Photoshop to remap with a polar transform so that a spherical projection won't show these.

Paul Bourke has described the algorithm in 2001. Here's a Lua script version:

http://www.thebest3d.com/dogwaffle/lua/polar

This should work in any of the Project Dogwaffle versions supporting plugins (PD Artist, PD Pro, PD 2 and PD 1.2 freeware version), as well as the GIMP and ArtWeaver, since this script does not make use of any Dogwaffle-only or Artweaver-only GUI features, it is in fact gui-less.

I hope it is useful. It was created in about 2 hours late last night - and I don't have uch scripting experience day to day with Lua, just the occasional dabble. So it was very interesting for me to see the well written code from Paul turn into a great Lua experiment.

If you use the GIMP, ArtWeaver or any Dogwaffle, I'd love to hear feedback. If you use other imaging tools that can run this script you absolutely must share your information and experience for the benefit of all starving artits :-)
 
Old 11-11-2006, 06:51 AM   #2
billrobertson42
Frequenter
portfolio
Bill Robertson
Ohio, USA
 
Join Date: Jan 2005
Posts: 257
How would you use it in the gimp?
__________________
Typical FOV Angles
 
Old 11-11-2006, 07:22 AM   #3
staigerman
Veteran
portfolio
Philip Staiger
USA
 
Join Date: Nov 2004
Posts: 68
Quote:
Originally Posted by billrobertson42
How would you use it in the gimp?


There's a plugin available for the GIMP called gluas, it's what served as the basis also for the DogLua plugin in Dogwaffle and the Lua plugin in ArtWeaver. I forget who created it, but it's prominently visible and accessible at the gimp's website. I have a not-so-recent installation of Gimp on this system, not sure if gluas came installed with it automatically, I think not.

When you have the Lua capability installed, whether in Gimp or Artweaver or Dogwaffle or elsewhere, you should be able to browse for files ending in .lua, select one and execute that script. It will apply to the current image, perhaps the current layer (I'll have to re-visit that on the Gimp's side)
 
Old 11-11-2006, 07:29 AM   #4
staigerman
Veteran
portfolio
Philip Staiger
USA
 
Join Date: Nov 2004
Posts: 68
Here is one of the pages on gluas/Lua at the gimp:
http://pippin.gimp.org/image_proces...ndix_gluas.html

I probably have more at
www.thebest3d.com/dogwaffle/lua
 
Old 11-11-2006, 07:42 AM   #5
staigerman
Veteran
portfolio
Philip Staiger
USA
 
Join Date: Nov 2004
Posts: 68
I installed gluas, and it's now in the Filter menu:

Filters > Generic > gluas...
 
Old 11-11-2006, 02:34 PM   #6
staigerman
Veteran
portfolio
Philip Staiger
USA
 
Join Date: Nov 2004
Posts: 68
Quote:
Originally Posted by staigerman
I installed gluas, and it's now in the Filter menu:

Filters > Generic > gluas...


oh and I forgot to mention... works like a charm on Gimp (I have v2.2) though quite a bit faster in Dogwaffle. But hey it works.
 
Old 11-11-2006, 02:34 PM   #7
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:44 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.