Procedural Textures

aths

Newcomer
Please take a look at this image:

2112-4810.jpg


edit: Due ATIs website reorganisation, the picutre seems to be removed.

ATI claims this texture was generated by PixelShader 1.4. Does anybody have an idea, how to make such (or similar) procedural textures? (It could be in PixelShader 1.0, 1.1 or 1.3 language, too.)

If I should programm such effects, I even dont know how to start.

<font size=-1>[ This Message was edited by: aths on 2002-03-05 17:16 ]</font>
 
Procedural textures with all current pixel shader versions are the results of blending multiple 3D textures, rather than being truly procedural.

Essentially, you place the noise function into a 3D texture, read from it multiple times, and blend between two colors (i.e., marble base and marble vein color) to determine the output.
 
You don't need any "pixel" shaders to do convincing procedural textures. The screenshots below are from a demo I hope to launch on PVRDEV.com very soon :

Marble.jpg

Base Marble Effect

Fire.jpg

Demo Overview

The demo shows a temple, all textures are procedural meaning that no surface has the same texture on it. There is a Marble floor, in the demo, with 100 tiles (10 by 10) using fully HW generated 256x256 textures all different. Sky and Fire effect are procedural as well (animated). There are no texture uploads or special additional CPU work. The whole demo uses only 8 textures (so about 2MB of video memory). The possibilities of the technique are huge. Aim is to launch this demo soon. I don't want to explain how it all works since some other company is doing a presentation on this topic during GDC.
_________________
Kristof

Developer Relations Engineer PowerVR Technologies
Technical Editor Beyond3D

<font size=-1>[ This Message was edited by: Kristof on 2002-02-19 16:00 ]</font>
 
It's probably been done before. :smile: I've seen programmers reinvent the same techniques over and over. Someone comes up with what they thought was a genius hack using the rasterizer only to find out it was already done years ago. I doubt it was "stolen"
 
Obviously the technique is not new, its just using the hardware you have to create the same old Perlin Effect :smile:

<font size=-1>[ This Message was edited by: Kristof on 2002-02-19 16:00 ]</font>
 
Kristof,

Can you tell us what kind of performance hit this technique gives? Obviously it'll depend on what the programmer wants to do, but is this at all practical in game environments on mainstream cards?

Also, can you tell us whether this requires many multitexturing layers (as in ST's hatching demo, which only ran on Kyro)? Will it run on a GeForce 2? Multitexturing alternatives to pixel shader effects are all well and good, but if Kyro is the only chipset to support large numbers of multitexture layers but not pixel shaders, I doubt anyone will bother, unless there's a big performance advantage (or perhaps if they're using OpenGL extensions).

You've shown us a couple of images of this before. Your artwork seems to have improved since then :smile: Let us know when your demo's up on pvrdev.
 
I wrote a little program in delphi to create similar textures:

http://www.aths.net/files/!ptex.exe

This proggy allows to make such textures:

pt1.jpg
 
The effect uses 2 layers and runs on any card supporting basic DX6 functionality :smile:

My scene has 40k polies, uses the effect on every pixel and runs at 40+ fps and my code is not nice and clean or super-optimised.

In a game I would use this effect on some percentage of the geometry, but not 100% of the on-screen pixels as currently done in my demo. I do believe this effect could work very well in a game.

Take for example the old UNreal engine, they supported procedural textures in software (CPU then AGP upload) they used it on fire, lava, water... this would all work fine in hardware now.

When I created this my aim was low texture memory use (2 textures per effect, and one of them can potentially be re-used in other effects), low AGP bandwidth (no texture uploads), low CPU load (nothing more than basic TnL and TexGen).

The principle is really simple, just odd that hardly any game is using this so far (there are some racing games that use it but even those can be counted on one hand). Sad really, this effect seems to be taking even longer than S3TC to gain support :cry:
 
Aths, cool demo program. Seems to be based around similar principles as my demo. Mine is much faster though (I assume you do all the work in software on the CPU). I have an overview mode that shows those exact three images, mine just runs at 100+ fps :smile:

Your marble base map image is very similar to what I used in my demo, could even use a 1D texture for that.
 
On 2002-02-18 19:41, Kristof wrote:
The effect uses 2 layers and runs on any card supporting basic DX6 functionality :smile:
LOL, so this doesn't run on GF2/4MX cards, does it? ;)
 
Can you give an example or two?

UGH... ermmm... F1 World Grand Prix, and I believe Warm Up uses it as well... not sure... :smile:

GF2 &amp; GF4 MX... now you would think they support the basics of DX6, not?
 
Kristof,

this Programm does everything in software, its simple Delhi-code without optimizations. I learned that it's a bit tricky to find out some "good" parameters to make "real" textures.

With dual pass (load an output image for input) there are some new effects possible...

Nevertheless, this is only one of many, many possibilies to use the pixelshader; and it can render a wide variaty of effects.

I guess, pixelshaders are really underestimated.


Kristof, runs your demo on a Voodoo4 and if so, it is possible to download it?

<font size=-1>[ This Message was edited by: aths on 2002-02-19 00:35 ]</font>
 
On 2002-02-18 23:18, Kristof wrote:
:rollseyes:
Is this to be understood as an answer? If so, I don't know which one... ;)

If it runs on GF2/4MX, I really can't imagine how you did this.
 
On 2002-02-18 22:59, DaveBaumann wrote:

All bar EMBM, eh...?

Looks like very much EMBM, reminds me of some old demo effect that I was partly doing.
If you want fire to be more "groovy", wild or lifelike try: Base + EMBM -> texture1, texture1 + EMBM -> final output texture.
(please use proper character instead '+' ;) dot, * etc. )

(edit)
If there is still someone with Amiga 1200 (or better) find old MellowChips demo... uh, can't remember the name... uhh.. well get all MellowChips demos :smile:

<font size=-1>[ This Message was edited by: Jogi on 2002-02-19 12:15 ]</font>

<font size=-1>[ This Message was edited by: Jogi on 2002-02-19 12:31 ]</font>
 
Back
Top