Texture bombing
Posted: Fri Oct 02, 2020 3:23 pm
I have added the support for new texture "bombing" from GPU Gems (https://developer.download.nvidia.com/b ... _ch20.html) as discussed in viewtopic.php?f=4&t=2638.
Texture Bombing
The new texture uses a background and a "bullet" (RGB + mask) to create the result:
Starting from this background (with randomized tiling):
and using this "bullet":
You obtain:
Note: as the leafs have only a single shape (i.e. orientation, they are pointing upward).
Texture Bombing with multiple bullets
It is possible to use multiple "bullet" shapes instead of single one:
and telling to the texture the bullet has 4 shapes:
You obtain:
Note: as the leafs have now 4 different shapes (i.e. orientation).
Daisy chained Texture Bombing with multiple bullets
It is possible to daisy chain multiple bombing textures to increase the density and randomness of bullets. This is an example with 3 layered texture bomming:
and the result is:
Note: I have yet to write GPU code.
Texture Bombing
The new texture uses a background and a "bullet" (RGB + mask) to create the result:
Code: Select all
scene.textures.backgroundtex.file = scenes/randomizedtiling/pattern-7.jpg
scene.textures.backgroundtex.gamma = 1.0
scene.textures.backgroundtex.randomizedtiling.enable = 1
scene.textures.backgroundtex.mapping.uvscale = 2 2
##
scene.textures.bullettex.file = autumn-leaf.jpg
scene.textures.bullettex.gamma = 1.0
##
scene.textures.bulletmasktex.file = autumn-leaf.jpg
scene.textures.bulletmasktex.gamma = 1.0
scene.textures.bulletmasktex.channel = alpha
##
scene.textures.bombtex.type = bombing
scene.textures.bombtex.background = backgroundtex
scene.textures.bombtex.bullet = bullettex
scene.textures.bombtex.bullet.mask = bulletmasktex
scene.textures.bombtex.bullet.count = 1
scene.textures.bombtex.mapping.uvscale = 12 12
and using this "bullet":
You obtain:
Note: as the leafs have only a single shape (i.e. orientation, they are pointing upward).
Texture Bombing with multiple bullets
It is possible to use multiple "bullet" shapes instead of single one:
and telling to the texture the bullet has 4 shapes:
Code: Select all
scene.textures.bombtex.bulletcount = 4
Note: as the leafs have now 4 different shapes (i.e. orientation).
Daisy chained Texture Bombing with multiple bullets
It is possible to daisy chain multiple bombing textures to increase the density and randomness of bullets. This is an example with 3 layered texture bomming:
Code: Select all
scene.textures.backgroundtex.file = scenes/randomizedtiling/pattern-7.jpg
scene.textures.backgroundtex.gamma = 1.0
scene.textures.backgroundtex.randomizedtiling.enable = 1
scene.textures.backgroundtex.mapping.uvscale = 2 2
##
#scene.textures.bullettex.file = autumn-leaf.jpg
scene.textures.bullettex.file = multi-autumn-leaf.jpg
scene.textures.bullettex.gamma = 1.0
##
#scene.textures.bulletmasktex.file = autumn-leaf.jpg
scene.textures.bulletmasktex.file = multi-autumn-leaf.jpg
scene.textures.bulletmasktex.gamma = 1.0
scene.textures.bulletmasktex.channel = alpha
##
scene.textures.bombtex1.type = bombing
scene.textures.bombtex1.background = backgroundtex
scene.textures.bombtex1.bullet = bullettex
scene.textures.bombtex1.bullet.mask = bulletmasktex
scene.textures.bombtex1.bullet.count = 4
scene.textures.bombtex1.mapping.uvscale = 12 12
##
scene.textures.bombtex2.type = bombing
scene.textures.bombtex2.background = bombtex1
scene.textures.bombtex2.bullet = bullettex
scene.textures.bombtex2.bullet.mask = bulletmasktex
scene.textures.bombtex2.bullet.count = 4
scene.textures.bombtex2.mapping.uvscale = 9 9
##
scene.textures.bombtex3.type = bombing
scene.textures.bombtex3.background = bombtex2
scene.textures.bombtex3.bullet = bullettex
scene.textures.bombtex3.bullet.mask = bulletmasktex
scene.textures.bombtex3.bullet.count = 4
scene.textures.bombtex3.mapping.uvscale = 15 15
Note: I have yet to write GPU code.