Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have been working through the Tutorial6 that comes with the SDK.

 

I created a mesh in anim8or, converted it to an .X file and loaded it successfully in VB.NET using the code from Tutorial6.

 

The problem I have is that the SDK sample has the texture in the file tiger.bmp which the program loads.

 

My .X file must have the textures in it as it appears the same using meshview as it does in anim8or.

 

Does anyone know how to get at the texture detail in the .X file so my mesh looks correct when displayed in the VB program?

 

Thnx

My website
Posted

Yes. The pig mesh I'm using is displayed pink in anim8or and meshviewer along with the nice hue, ambience etc.

 

But in VB.NET when I load it into DX9 it is just plain with just a solid colour, not matching the true colour

My website
Posted

Not sure if this is the answer but I'll look into to it and report back.

 

I got this feedback from the anim8or forum...

 

Using a texture requires an image file like

a bmp,jpg,etc...What you want,I think, is

to add a material to your mesh.

My website
  • *Experts*
Posted

Did you apply a texture to your mesh in the program? Im not familiar with anim8tor so can't help you there. If you did apply it and it exported correctly it should be there, if you store the texture in the right path. If not, then if you have the X file generated in Text mode, scroll through the file and see if you can find some kind of a path under the list of vertices.

 

One more thing, if you don't wish to spend much money on a 3d modeller, but can spend a decently low sum of $25 then get Milkshape3D. It contains a GREAT DirectX mesh exporter, and some good features. It is worth every dollar spent on it.

Posted

Hi, thanks I did look at Milkshape but I think anim8or is far better, even more so as it's free:)

 

Right thinking thru this whilst dropping off to sleep last night I came to this conclusion.

 

Lets say I have created a sphere and applied a material to it then convert to .X

 

Therefore I have the material info I should think in the .X file along with all the other detail. I suspect what I have done is got confused with textures and materials and hacked the SDK sample to open my mesh. But the SDK sample is geared to use a texture so I think that is where my problem lies.

 

I need to revisit the code and modify to handle material not texture......I think?

My website
Posted

OK I got it to load OK and the colours seem OK but it does not have the 'metalic' look with specular light etc as seen in meshviewer etc?

 

I have used these two lines to try to help but no joy:(

 

m_obj3DDevice.RenderState.Ambient = System.Drawing.Color.Pink
m_obj3DDevice.RenderState.SpecularEnable = True

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...