Feature #1139
More variations within repeated texture patterns with alternative textures (for detail textures)
0%
Description
doom/ hexen/ heretix worlds are quire... repetitive. I
mean, all wall of type WALLxx always look the same.
one possible enhancement would be to define alternate
hires textures as common/ uncommon/ rare
(common=regular texture, uncommon=sometimes, rare=a few
times a level).
of course, the alternated wall should remains the same
during one session.
Pierre.
Labels: Graphics
History
#1 Updated by pbru over 21 years ago
Logged In: YES
user_id=602719
to be honest, when I proposed it, I had no idea of the
feasibility of the repeatable-pseudo-random choise of the
alternative hires textures. I found one in an post on
perlin-noise generation.
here is the idea:
1) generate a large (say MAX=10,000 cells) array of random
numbers, once every new session game (or new game, as you
want, but doing so, you have to save the seed of the RND).
2) for each hires texture to display, compute a unique
fingerprint for ex. fp=(x+y*P+z*P*P) mod MAX, with (x,y,z)
being the coordinate of the "lower-left" corner of the piece
of wall and P beeing an adequate prime number. if fp in
[0..threshold1] the texture is 'common', in
[threshold1..thresholt2] 'uncommon' and in [threshold2..1]
'rare'. the same method can be used to select among multiple
common, uncommon or rare texture variant.
using this method, the pseudo-random choise is repeatable
and fast to compute.
Pierre.
#2 Updated by pbru over 21 years ago
Logged In: YES
user_id=602719
one possible enhancement^2 would be to define alternate
hires textures list. for example something like:
WALLxxC01.PNG,WALLxxC02.PNG,WALLxxC03.PNG
WALLxxU01.PNG,WALLxxU02.PNG
WALLxxR01.PNG,WALLxxR02.PNG,WALLxxR03.PNG,WALLxxR04.PNG
with C=common,U=uncommon,R=rare textures, and each time a
texture of some type is needed, one of the corresponding
list is (pseudo-)randomly fetched.
of course, the more textures, the more difficult for the
texture-maker to have textures which all tile well together...
Pierre.
#3 Updated by pbru over 20 years ago
Logged In: YES
user_id=602719
one possible enhancement^2 would be to define alternate
hires textures list. for example something like:
WALLxxC01.PNG,WALLxxC02.PNG,WALLxxC03.PNG
WALLxxU01.PNG,WALLxxU02.PNG
WALLxxR01.PNG,WALLxxR02.PNG,WALLxxR03.PNG,WALLxxR04.PNG
with C=common,U=uncommon,R=rare textures, and each time a
texture of some type is needed, one of the corresponding
list is (pseudo-)randomly fetched.
of course, the more textures, the more difficult for the
texture-maker to have textures which all tile well together...
Pierre.
#4 Updated by skyjake over 8 years ago
- Tags set to Renderer, Definitions, Textures
- Subject changed from Alternate hires textures to More variations within repeated texture patterns with alternative textures
- Category set to Enhancement
#5 Updated by skyjake almost 5 years ago
- Subject changed from More variations within repeated texture patterns with alternative textures to More variations within repeated texture patterns with alternative textures (for detail textures)
- Target version set to Rendering II
- Have a pattern texture where each pixel determines which variant of the detail texture to use.
- Use a shader to first sample the pattern texture, then sample the determined variant detail texture.