Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Barn Door

Texture-blending operations.

This topic is 5764 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, Are there any intuitive explanations for what the different texture-blending operations do? For example, what is the difference between using D3DTOP_MODULATE & D3DTOP_ADD? The first of these multiplies the two arguments together whilst the second just adds them but do these operations have a higher level, graphics specific meaning? Cheers, BD.

Share this post


Link to post
Share on other sites
Advertisement
quote:
them but do these operations have a higher level, graphics specific meaning?


Not really. Just think of anything in the colour channel as (conceptually) being like a 3D vector with components (r,g,b aka x,y,z) which range from 0 to 1 and get clamped after any operation (1+1=1, 0-1=0). The alpha channel is the same except its a scalar.

What might be thought of as higher level meanings is seeing the operations as just maths operators in an equation - that''s how you find interesting ways to reorganise operations to make more effective use of blend operations you have available and how things like DOT3 bump mapping starts to make sense.

The best way to learn this stuff is to use something which lets you play around with the blends such as ATIs Multex, nVidias BlendView or the tool in the DX SDK. Also get used to writing out any operations you want on a pixel as an equation:

OUTrgb = (TEXTURErgb * DIFFUSErgb) + ENVMAPrgb

[* above is a componentwise vector multiply]

Using simple maths rules such as commutativity and bracket precedence etc you can reorganise stuff easily.


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
I don''t have the book with me, but the Focus on: 2D in Direct3D covers everyone in good detail. Just thought you should know.

Much greatness is achieved thru perseverance and faith.

Share this post


Link to post
Share on other sites
Thanks for the replies.

That book ''Focus On 2D in Direct3D'' looks quite comprehensive.

Pity I vowed to stop buying big expensive computer books.

BD.

Share this post


Link to post
Share on other sites
O.K. I tried running Nvidia's Blend View and it just quits and shows a message box which says...

DirectX Error: Can't create DDraw during enumeration!.
Error: DDERR_CANTCREATEDC


Apparently this program is for DirectX7. I tried installing this but it said I didn't need to because its earlier than the version already installed.

Any ideas? This program looks super cool.

BD.

[edited by - Barn Door on November 4, 2002 9:01:14 PM]

Share this post


Link to post
Share on other sites
The version of BlendView I have didn''t come with an installer IIRC. Though it may be an ancient one (v0.90). Although it is from the DX7 days, most of the fixed function pixel blending pipe hasn''t changed in newer versions.

Just tried it on my work machine (P4, Win2k, GeForce2 Ultra, DirectX 8.1) and it worked fine.

It''s probably worth contacting one of the nVidia devrel people (Doug, Cem etc) - they''re usually quite helpful with things like this.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!