Results 1 to 15 of 15

Thread: Omg, Textures Need To Be Shot!!!!!!

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Omg, Textures Need To Be Shot!!!!!!

    I have tried to freakin hard to get textures to work, i've tried EVERYTHING. I've looked at different tutorials for things that were different than my code and done some changes, but still no textures. All i have is 2 stupid plain triangles. I want them to have a texture. How can it be this freakin hard to get textures to work?! I need someone that actually knows directx 7 3d to give me the steps of adding a texture to something. TUTORIALS ARE NO HELP IN THIS SUBJECT, I HAVE A TON OF THEM AND THEY ALL SUCK! THEY HAVE TOO MUCH EXTRA CRAP IN THE WAY.
    My monkey wearing the fedora points and laughs at you.

  2. #2

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423
    Here's the code if you want it...........
    Attached Files Attached Files
    My monkey wearing the fedora points and laughs at you.

  3. #3
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    well if you need a better tutorial go to www.directx4vb.com

    There have been many people complaining about this too, but it would really help you would post where your problem is... doesn't it show textures at all? Or does it give you some color change that does not look like the texture to you?

    And some note: Older graphics boards sometimes can't handle textures of all formats... There are boards that don't support wide textures (textures bigger than the actual screen resolution) and there are even older boards (I think it's also a problem with dx7) that only want to take sqared textures...

    And have you tried to load your textures into the texture tool and save them as texture and load them with the loadtextureEx command (or similar)...
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423
    I found the problem, I had been working with just single triangles, you can't have textures unless you divide your polygons into squares instead of trianlges.
    My monkey wearing the fedora points and laughs at you.

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    that is not true I believe
    all you need to do is set the U,V mapping right...
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6
    Member Yhoko's Avatar
    Join Date
    May 2002
    Posts
    47
    Of course you can have one single triangle with texture. Well I think Misan's right, you just have to setup everything correctly. Why not using DirectX8 by the way? I think it's much easier to use than DX7.
    - Yhoko


    Try my Games
    * [VB6] YDK - Yhoko's Development Kit
    * [VB6] HackV1 - two-player puzzle/strategy
    * [VB6] Xen - extended Gen

  7. #7
    Zaei
    Guest
    I agree, DX8 is easier, in my opinion.

    You can map a texture to a triangle. You just have to know what the UV values must be to get it to show up right. Basically, when you map across a quad, you are simply mapping across two triangles.

    Z.

  8. #8
    Member Yhoko's Avatar
    Join Date
    May 2002
    Posts
    47
    Hi Zaei! You always agree to my posts, is that good?
    - Yhoko


    Try my Games
    * [VB6] YDK - Yhoko's Development Kit
    * [VB6] HackV1 - two-player puzzle/strategy
    * [VB6] Xen - extended Gen

  9. #9
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    of course I was right who thought I wasn't

    well a little explanation about the uv mapping, since it is really easy:
    for each vertex you specify the uv mapping. Now you can put decimal numbers from 0 to 1 (you can put more with some additional flags set, but let's first get the basics)
    u is the x axis and v the y axis (it does not really matter in 3d, just for easier explanation)
    1 is 100%.
    So if you have a triangle set up over those three points:
    Code:
                 X
                / \
               /   \
               X___X
    and you would want to put a texture on it without any distortion the u v mapping would be:
    point1 : u=0.5 v = 0
    point2: u=0,v=1
    point3: u=1,v=1

    I hope this helps a little bit
    Sanity is a full time job

    Puh das war harter Stoff!

  10. #10
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    well I need to add something because this way it was not clear which point I gave which number so it would be:
    1
    2 3
    ...
    Sanity is a full time job

    Puh das war harter Stoff!

  11. #11
    Zaei
    Guest
    Originally posted by Yhoko
    Hi Zaei! You always agree to my posts, is that good?
    Usually, when its DX related =).

    In DX8, you can specify a U or V value that is anywhere from 0.0f..maxTextureRepeat (this is a card CAPS value, so youll have to query the card for it). You could also probably specify a negative value, though I have never tried it. When you give a U or V value greater then one, it simply wraps the texture. For instance:
    Code:
    1---------------2
    |               |
    |               |
    |               |
    |               |
    3---------------4
    1: U=0.0f V=0.0f;
    2: U=10.0f V=0.0f;
    3: U=0.0f V=10.0f;
    4: U=10.0f V=10.0f;
    You should then have your texture repeated 100 times over the quad.

    Z.

  12. #12
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Hey Z
    I haven't done this for a while, but I believe you need to set extra flags since it can just repeat textures or draw them fliped over the y axis and so on....
    Sanity is a full time job

    Puh das war harter Stoff!

  13. #13
    Zaei
    Guest
    The above was all DX8 specific. You dont need to set flags in 8, dont know when it comes to 7 =).

    Z.

  14. #14
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    yeah possible... I can only remember having set those flags in Dx7
    Sanity is a full time job

    Puh das war harter Stoff!

  15. #15

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423
    I would use dx8 but my computer has some crappy video card. Dx8 goes at like less than 1 frame per sec. dx7 is like 200 times faster, so if i'm going to make anything that 3d why not use something that atcually can run on my computer.
    My monkey wearing the fedora points and laughs at you.

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