Need Help With XNA C# programming and 3D Models

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • customstuff
    ♥C.S. + A.M.♥
    • Nov 2006
    • 4892

    #1

    Need Help With XNA C# programming and 3D Models

    Right now I'm in something that's somewhat of an extension of normal school, where we're doing XNA programming for 5 weeks. Basically, my situation is that I got a couple free-to-use 3D models of cars (Exported to .fbx with Blender) and they include a bunch of textures in .tga format. I'm looking to use the models inside an XNA project to rotate around and look at for now, and eventually work on some sort of networked racing game. I got the models in and mostly everything is fine, but the problem is, I can't get the textures to work. I did what I thought was right according to some examples online but when I run the project the textures aren't shown. The textures should all work fine right from the downloads and the textures look fine, so those aren't the causes.

    Anyone have an idea as to how I could get the textures to load onto the model in my XNA program? (Bonus points if you also know a way to have multiple colour options using one model in a program, since I know I'll be looking for that too).

    I'll offer 10k credits if someone wants them and you result in everything working! Thanks.

    (tl;dr version: .tga textures don't display on a .fbx model in my XNA C# program.)

    Originally posted by MrMagic5239
    Placements are final, custom will not be moved to D6, just because he is good at jacks, and mediocre at just about every other FMO in the game.
    Originally posted by customstuff
    Originally posted by MrMagic5239
    welcome to D6

    start playing
  • UserNameGoesHere
    FFR Veteran
    • May 2008
    • 1114

    #2
    Re: Need Help With XNA C# programming and 3D Models

    I'm sorry I can't offer help on this particular thing as I've not done any XNA programming nor have I worked with texture mapping in general. So, why am I replying then, you might ask?

    I want to encourage you to continue trying to work on this. You are entering some quite advanced territory (3D modelling and textures) and so you might not get a lot of feedback and I didn't want you to get discouraged, thinking people just didn't care or something like that.

    In reality, if you manage to get this working, I and I believe many others, would much enjoy (if you would) working source code snippets or such (or the whole thing if you're cool with that) as I think many people could benefit from it.

    The only advice I can give is try to find some XNA-specific forum or message board or, failing that, a C# one and/or to literally pour through all the available Microsoft documentation. The one good thing is Microsoft tends to have pretty good documentation for most stuff (unless it's really experimental or severely outdated).

    If someone does manage to help, I don't think they'll do it for the 10K credits reward though. It just seems too small an amount for something more involved like this.
    Originally posted by Crashfan3
    Man, what would we do without bored rednecks?

    Comment

    • customstuff
      ♥C.S. + A.M.♥
      • Nov 2006
      • 4892

      #3
      Re: Need Help With XNA C# programming and 3D Models

      Thanks for the reply anyway. I might wait a while before attempting this again since I don't really need it for what I'm doing, but it would be a nice touch and a good thing to know for the future. If I manage to figure it out sometime, parts of the code could probably be available, or at least an explanation of how it ended up working.

      It's kind of interesting to hear it's advanced territory in your opinion, since I'm just in my first year right now. It gives me a little more hope, hahaha.
      Last edited by customstuff; 05-8-2013, 03:11 PM.

      Originally posted by MrMagic5239
      Placements are final, custom will not be moved to D6, just because he is good at jacks, and mediocre at just about every other FMO in the game.
      Originally posted by customstuff
      Originally posted by MrMagic5239
      welcome to D6

      start playing

      Comment

      • Izzy
        Snek
        FFR Simfile Author
        • Jan 2003
        • 9195

        #4
        Re: Need Help With XNA C# programming and 3D Models

        I used to know a lot about this when I worked on a 3D game using XNA / Visual studio with a class.

        At the very least I know to change colors you have to change the color of the light hitting the model. I still have the project so I guess I could go through it and see what we did to import everything and add textures. Or I could send you the whole game.

        Comment

        • customstuff
          ♥C.S. + A.M.♥
          • Nov 2006
          • 4892

          #5
          Re: Need Help With XNA C# programming and 3D Models

          That would be amazing if you're willing to send me any of the code you have of it! If you want to, either upload it somewhere and PM me or just PM me if you want my e-mail. It's just hard to find online for some reason and it would be so useful for me to learn. Thanks :D

          Originally posted by MrMagic5239
          Placements are final, custom will not be moved to D6, just because he is good at jacks, and mediocre at just about every other FMO in the game.
          Originally posted by customstuff
          Originally posted by MrMagic5239
          welcome to D6

          start playing

          Comment

          • Izzy
            Snek
            FFR Simfile Author
            • Jan 2003
            • 9195

            #6
            Re: Need Help With XNA C# programming and 3D Models

            MEGA provides free cloud storage with convenient and powerful always-on privacy. Claim your free 50GB now!


            It uses a ton of different things, it isn't just a model and lighting. Now that I look through the content files I noticed all of the model textures are .dds files and not .tga.

            Comment

            • customstuff
              ♥C.S. + A.M.♥
              • Nov 2006
              • 4892

              #7
              Re: Need Help With XNA C# programming and 3D Models

              Well I imagine it would still be useful to know and quite possibly done the same way as .tga anyway. Downloading now, thank you so much!

              Originally posted by MrMagic5239
              Placements are final, custom will not be moved to D6, just because he is good at jacks, and mediocre at just about every other FMO in the game.
              Originally posted by customstuff
              Originally posted by MrMagic5239
              welcome to D6

              start playing

              Comment

              • UserNameGoesHere
                FFR Veteran
                • May 2008
                • 1114

                #8
                Re: Need Help With XNA C# programming and 3D Models

                Originally posted by customstuff
                Thanks for the reply anyway. I might wait a while before attempting this again since I don't really need it for what I'm doing, but it would be a nice touch and a good thing to know for the future. If I manage to figure it out sometime, parts of the code could probably be available, or at least an explanation of how it ended up working.

                It's kind of interesting to hear it's advanced territory in your opinion, since I'm just in my first year right now. It gives me a little more hope, hahaha.
                Well yeah I'd say it's advanced but it's really pretty subjective. If we consider "normal" kinds of programs things like typical command-line, GUI, database, server-side, client-side programs, and so forth, then anything outside of that is a bit on the advanced side, which would include things like 3D graphics, music software, AI, firmware, OSes, antivirus, emulators, as well as any of the former "typical" types if it's complex enough, and more.

                You ask two different people and you'll likely get two different metrics here, for what it's worth.

                And thank you Izzy for contributing some XNA code. I might have a look later. It's just not something I've used.
                Originally posted by Crashfan3
                Man, what would we do without bored rednecks?

                Comment

                Working...