XNA Game Development Forums
2012/05/22 14:14:06 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: How To: Render a model with a texture??  (Read 2325 times)
Quinn
Newbie
*
Offline Offline

Posts: 12


View Profile
« on: 2007/01/05 18:33:51 »

I have gone through the tutorials up to number 6 and they are awesome.  I am totally new to the 3D world of programming but would love to learn more.

I have a model and a texture that I would like to load and view in the HMDemo.  I actually have it loading and can see the model but it is completely black.  How do I render the model with its textures?  Also, if the model has animations, is it diffcult to render those?
Logged
Chr0n1x
Global Moderator
Sr. Member
*****
Offline Offline

Posts: 307


View Profile WWW
« Reply #1 on: 2007/01/05 19:50:45 »

If you are using the normal classes etc provided by the tutorials, it should render, unless the texture data is not being specified inside the model file, which models like tiger etc do. You can try modifying the rendering code to take a loaded Texture and putting that as a parameter. Would require a bit extra work, but not too much.
Logged

Quinn
Newbie
*
Offline Offline

Posts: 12


View Profile
« Reply #2 on: 2007/01/05 19:57:54 »

Is there anyway to tell if when I load the model that the texture is being loaded as well?  I put a break point in the code after loading the model but I don't see any properties on the model for textures etc.
Logged
mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #3 on: 2007/01/05 23:05:54 »

If you are using the basicshader in the tutorials, there will be no texture support, but if you used the modified version from here on the forums, then it should be working fine.
Logged
Quinn
Newbie
*
Offline Offline

Posts: 12


View Profile
« Reply #4 on: 2007/01/06 08:30:30 »

My brother used a new fbx exporter and it is working fine now.  Thanks for the help!

How difficult is it to render animations?  I believe you mentioned that was coming up in another tutorial...no eta? Smiley
Logged
Chr0n1x
Global Moderator
Sr. Member
*****
Offline Offline

Posts: 307


View Profile WWW
« Reply #5 on: 2007/01/07 00:13:45 »

Anitmations are not included in XNA at the moment. There are workarounds, it all depends on the complexity of them and if Mike wants to include them or wait for the official support, which will no doubt come soon enough, since there is a bit of pressure on MS to implement it.
Good things are coming (font support/animations), so I guess we will have to wait for now.
Logged

mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #6 on: 2007/01/07 00:33:58 »

There is an AnimationComponent project going on that you can try to get working over at: http://www.codeplex.com/Wiki/View.aspx?ProjectName=animationcomponents. I haven't played with it much, but like everything else in this area of programming it will undoubtedly take a bit of tweaking.
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Tut 6: Model Class Hazy Mind XNA Engine MicahN 2 2258 Last post 2006/11/15 09:43:47
by MicahN
Tutorial 6 :: Getting a Model on Screen Tutorial Discussion mikeschuld 11 5588 Last post 2007/02/18 10:35:28
by Iarus
Changing Sprite class texture coords? Hazy Mind XNA Engine Mithaearon 1 2029 Last post 2007/01/29 13:46:11
by h4rdc0m
Detecting Model Collision...? General Discussion « 1 2 » DaphydTheBard 15 4291 Last post 2007/03/27 01:29:52
by Nemo Krad
Model & Shader Problems Hazy Mind XNA Engine Themodem 5 2071 Last post 2007/03/26 11:12:53
by Tiago
Model exporters General Discussion EclipsE 13 3720 Last post 2007/04/26 12:25:03
by EclipsE
Loading a model in runtime? General Discussion XNASorcerer 10 3313 Last post 2007/05/06 21:22:42
by XNASorcerer
Tranforming a model's vertices Hazy Mind XNA Engine « 1 2 » DoomMarine 29 6881 Last post 2007/08/28 05:15:34
by DoomMarine
Game-ready model shops General Discussion Balosh 0 1610 Last post 2009/07/10 02:37:54
by Balosh
Game- ready model shops Hazy Mind 3D Engine Tinlau 0 1183 Last post 2010/02/03 20:23:12
by Tinlau
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 2.246 seconds with 18 queries.