Results 1 to 11 of 11

Thread: VB: DirectX, "Bleeding" from one texture to another

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    294

    VB: DirectX, "Bleeding" from one texture to another

    Lets say I have 2 textures as shown in the attached position. How can I get the red texture to "bleed"(Sort of like blur) its color onto the green texture?
    Attached Images Attached Images  

  2. #2
    Member
    Join Date
    Oct 2002
    Posts
    41

    Re: VB: DirectX, "Bleeding" from one texture to another

    I am curious on this as well, I do not know the answer, but which version of Directx are you using?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    294

    Re: VB: DirectX, "Bleeding" from one texture to another

    DirectX 8.1

  4. #4
    Junior Member
    Join Date
    Mar 2005
    Posts
    16

    Re: VB: DirectX, "Bleeding" from one texture to another

    Not sure exactly how to do it, but sounds like you'd want to get a "snapshot" of the surrounding area in a buffer, apply some kind of Blur Filter, then re-paint it onto your BackBuffer.

    Now that I've pointed out the obvious workaround answer, you can move on.

  5. #5
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: VB: DirectX, "Bleeding" from one texture to another

    Are you using MultiTexturing? Do you have Antialiasing enabled? Using these two should help get what you are looking for.

    Also the Green polygon would work better for your blur effect if you were using a light map rather than that green polygon. You oughta Google lightmaps. I have some if ya want any too.

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Re: VB: DirectX, "Bleeding" from one texture to another

    What you're asking for is advanced, involving concepts such as gaussian blurring and, if you want it at any decent speed, maybe even pixel shading. I'm not sure why you wouldn't just load up an image editor...
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: VB: DirectX, "Bleeding" from one texture to another

    Actually a lightmap would produce what hes looking for.

    For example, when you multitexture

    +=

    Only depending on what the lightmap looks like will depend on the result. In his case, hes looking for a green glob, which a simple blured circle in the center can do.

    To avoid the blackness that would make part of the image dark though, you change the ambient lighting settings for that polygon. Best to make the ambient settings white so your red polygon is totally red, rather than black.

    Here you go, I created one for you in like less than a minute. If you want it to be green, you simply change the color of the 4 vertex corners to green.
    Attached Images Attached Images  

  8. #8
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: VB: DirectX, "Bleeding" from one texture to another

    Here is what your result should look like. If you don't like the lightmap, or think it needs changes, I'd be glad to help.
    Attached Images Attached Images  

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    294

    Re: VB: DirectX, "Bleeding" from one texture to another

    Sastraxi is right, what im looking for is an effect sort of like blur.

  10. #10
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: VB: DirectX, "Bleeding" from one texture to another

    That's what lightmaps are. Gaussian blurred black and white images. Just apply multitexturing, change some ambient settings, and vwola

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    294

    Re: VB: DirectX, "Bleeding" from one texture to another

    No, I want it blur. Open the pic I made, 2 boxes, in photoshop, filter>blur and youll see what I mean.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width