Sunday, September 18, 2016

#JOGL Various Textures to Polygons

Some textures of size 10 x 10 have been created from scratch using formulas such as

//Use this formula to create texture in the program- Tex1
int red=(0xff)*(x%2);
int green=(0xff)*(y%2);
int blue=(0xff);//*(x^y);

Resulting Snapshot:

//Use this formula to create texture in the program- Tex2
int red=(int)((0xff)*Math.sin(10*x*Math.PI/180));
int green=(0xff);
int blue=(0xff);
Resulting Snapshot:                       
Going any further I feel would kill your drive to do something yourself and get exhilarating textures. So I hope I have shown the way to create beautiful patterns with sin,cos,modulus and other mathematical operations.

If you are knowledgeable about MipMaps and filtering in jogl then you may note that I have used following Magnification filter.

gl2.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MAG_FILTER,GL2.GL_NEAREST);

Here is the source which you can modify and tinker.

Next goal is to  use procedural methods to generate textures as mentioned in the site here.

A textile manufacture in my area Apsara silks is featured here in this article on https://www.indiantextilemagazine.in/apsara-silks-exploring-new-frontiers-to-stay-ahead/
I infact had an appointment with Mr goenka that I didn't keep up with. It was supposed to be a website that this manufacturer wanted to setup. All talk of industry academia tieup is hocus pocus as academia is a lot poorer and industry indifferent. So if you want more stupidity than skipping appointments you could always conjure up websites that let you design a pattern and get the digital print on fabric of your choice within days if not weeks.

No comments:

Post a Comment