[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Simple Non-Repeating Texture Generation Method (GLSL)

Simple Non-Repeating Texture Generation Method (GLSL)

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Simple Non-Repeating Texture Generation Method (GLSL)

Postby KrimZon » Sun Mar 29, 2009 5:55 pm

On Saturday I coded this up, it basically takes a repeating texture and makes it look less repetitive, or at least makes it repeat in a random non-grid way. Bits are the same but the output is not tiled.



Here are some screenshots of what it does with some Quake textures:

I'm wondering how easy it would be to implement in a Quake engine now. I know Darkplaces uses GLSL already, but I'm not sure if everything's set up for using it to render world polygons as it stands.

Anyway, there's a code demo in the link if anybody wants to look at that or have a go at adding it to their own engine. I'll be poking around in DP I think.
KrimZon
 
Posts: 11
Joined: Fri Nov 05, 2004 6:18 pm

Postby MeTcHsteekle » Sun Mar 29, 2009 7:14 pm

ooh man, looks so sweet :D
bah
MeTcHsteekle
 
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Postby MauveBib » Sun Mar 29, 2009 7:23 pm

That's freaking awesome! I would love to have something like that in DiD2. Repetitive ground textures are a real pain.

Come to think of it, could this not be done with q3 shaders anyway? Have the blend in the alpha channel, and use two layers ala terrain texture blending?
Last edited by MauveBib on Sun Mar 29, 2009 8:13 pm, edited 1 time in total.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Postby GiffE » Sun Mar 29, 2009 7:54 pm

Very cool!
If this could be implemented into DP :) I would definately need to use it.
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby r00k » Sun Mar 29, 2009 9:06 pm

Very nice!

Most Quake engines are old-school openGL projects using intermediate mode. This, helps programmers pull their head out of the sand and see what's possible on newer oGL versions, ~2.0 etc...

Dp and FTE are the most "up-to-date" savvy engines out there. I think it's a safe bet that DP would support such a feature, straight up.

But using your method, can't this be done by the artist instead of in real-time? You are manipulating textures, but those textures are STILL confined to the actual dimensions of the polygon. It looks perfectly cool for gravel, rocks etc. Wait i take that pre-previous statement back. Doing it realtime on the gpu might cost a few cycles but would save hours of effort by hand manipulation, and thus the random angle etc makes each "new" texture unique thus nonrepeating! Ah-ha! :D

I would like to thank you for your interest in Quake, as not many MIT students peer into this glass. Fresh talent is very welcome !
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Postby scar3crow » Sun Mar 29, 2009 9:23 pm

I think MIT is in reference to a style of licensing, I doubt KrimZon goes to MIT being British, and hes not new to inside3d, hes just quiet on the forums - hes more active in #qc

KrimZon - How do you think this could impact animated textures, namely the liquids? I'd be curious to see that one...
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby MauveBib » Sun Mar 29, 2009 9:38 pm

I can't emphasise enough how awesome it would be to have this in DP!
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Postby metlslime » Sun Mar 29, 2009 9:52 pm

This is cool, but I just wanted to point out that it is possible to make tiling textures where the repetition isn't obvious in an ugly way.

Generally you do it by making sure that there are no prominent and unique features on the texture, such as one obvious crack on a concrete texture. You can either remove such features, making for fairly plain-looking artwork, or you can include multiple similar features scattered across the texture. If there are 3-4 cracks of similar character but not identical, the repetition of those cracks will be much less noticable. Or a texture which is a bunch of grey pebbles, with one brown one. You can either remove the brown one or add more brown ones to the mix.

Sometimes it's not actually a feature but a coloration problem -- a high-pass filter is a good way to remove large shifts in color across an image.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby Spike » Mon Mar 30, 2009 12:23 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby leileilol » Mon Mar 30, 2009 3:38 am

you could also alternatively pull off a .shader, having multiple layers blended with varying tcMod scales. Serious Sam sorta does that with a layer of pre-painted shading stretched over terrain to break up the visual. Zelda 64 even has a similar technique.

THIS IS NOT DETAIL TEXTURES I AM TALKING ABOUT FYI!
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby KrimZon » Mon Mar 30, 2009 11:20 am

KrimZon
 
Posts: 11
Joined: Fri Nov 05, 2004 6:18 pm

Postby mh » Mon Mar 30, 2009 1:07 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby mh » Thu Sep 10, 2009 11:25 am

Looking at the formula again, this can be done using a GL_INTERPOLATE combine function where normalTexture is Arg0, scaledTexture is Arg1 and modulationTexture is Arg2. Doesn't need shaders at all.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 2 guests