Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 04-Jun-2004, 07:55   #1
bloodbob
Trollipop
 
Join Date: May 2003
Location: Australia
Posts: 1,630
Default How can you assign a material on a pex pixel basis.

Reading an interview on stalker I noticed this ( http://www.beyond3d.com/forum/viewtopic.php?t=12891 )
Quote:
Natural render of complex materials with proper light interaction, such as rusted metal, natural flora, glass, skin, and so on. In addition, every pixel (not texel) can have its own material with several coefficients.
The only way I can think of doing this is either to tesselate everything so that the triangles are no bigger then a pixel. Or to pixel shaders with basicly a case statement which calculates the screen space does a look up on an array ( texture ) with which material to apply to that pixel which you couldn't do on PS2.0 ( without 50 passes or so ) and would still die on ps3.0.

Does anyone have any other clue on how this could be done?
__________________
Trolls find me soo tastey :P
bloodbob is offline   Reply With Quote
Old 04-Jun-2004, 08:07   #2
Simon F
Tea maker
 
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,382
Default

Much easier - you have a texture that determines the material type, say 0=>shiny metal, 1=>corroded metal (or wood or grass), and use that to interpolate between two material calculations.

Extensions are left as an exercise to the reader.
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson

"I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay
Simon F is online now   Reply With Quote
Old 04-Jun-2004, 08:16   #3
bloodbob
Trollipop
 
Join Date: May 2003
Location: Australia
Posts: 1,630
Default

Quote:
Originally Posted by Simon F
Much easier - you have a texture that determines the material type, say 0=>shiny metal, 1=>corroded metal (or wood or grass), and use that to interpolate between two material calculations.

Extensions are left as an exercise to the reader.
The look up is then on a per texel basis which they explictly state is not the case. Well per 4 texels. Anyway that still doesn't help with an execisvely long shader.
__________________
Trolls find me soo tastey :P
bloodbob is offline   Reply With Quote
Old 04-Jun-2004, 08:57   #4
Simon F
Tea maker
 
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,382
Default

Quote:
Originally Posted by bloodbob
Quote:
Originally Posted by Simon F
Much easier - you have a texture that determines the material type, say 0=>shiny metal, 1=>corroded metal (or wood or grass), and use that to interpolate between two material calculations.

Extensions are left as an exercise to the reader.
The look up is then on a per texel basis which they explictly state is not the case.
What they say and what they mean are probably different things.

Have a think what it would actually mean to have the material change per screen pixel as opposed to something locked to the surfaces of objects. It'd be chaotic.

Oh! I wonder if they are trying to do some of the effects that modifier volumes in CLX2 (DC) could provide? That could choose between 2 different materials on a pixel by pixel basis depending on whether an object was inside or outside volumes <shrug>
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson

"I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay
Simon F is online now   Reply With Quote
Old 04-Jun-2004, 09:37   #5
DeanoC
Senior Member
 
Join Date: Feb 2003
Location: Sheppey, UK
Posts: 1,439
Default

You could just use a deferred lighting system with a stencil modifier volume.

Render the scene with screen per-pixel material (though presumebly comeing from a per-texel or per-vertex material channel).

Then render a stencil volume ala shadow system, then change the material index inside the volume (you would need to organise your material so a simple add changed them in the same mannor, i.e. +100 makes things old and rusted).

Then do the lighting calcs, I had a demo which mixed realistic and a basic toon shader in this manner...
DeanoC is offline   Reply With Quote
Old 05-Jun-2004, 17:56   #6
Chalnoth
 
Join Date: May 2002
Location: New York, NY
Posts: 12,678
Default

Quote:
Originally Posted by bloodbob
The look up is then on a per texel basis which they explictly state is not the case. Well per 4 texels. Anyway that still doesn't help with an execisvely long shader.
Well, you can obviously interpolate between texels to get a unique number per-texel.
Chalnoth is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3dfx Rampage ;) Ante P 3D Architectures & Chips 219 26-Feb-2012 19:48
shadermark 2.1 released tEd 3D Architectures & Chips 88 17-Oct-2004 02:06
NV40 poll Geeforcer 3D Architectures & Chips 56 24-Mar-2004 18:34
nV40 info w/ benchmarks nelg 3D Architectures & Chips 332 12-Feb-2004 21:09
Guru3d: 5700XT & 5900 have "8 (2x4) pixel pipelines WaltC 3D & Semiconductor Industry 46 21-Jan-2004 23:18


All times are GMT +1. The time now is 11:03.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.