Sign in to follow this  
fguihen

can only see part of charachter when x file from panda is used

Recommended Posts

fguihen    100
i used panda to export a charachter from 3DS max and i can only see the buggers hair, but the rest of him is invisible.when i turn off all lights, his hair is white, but when lights are on, his hair is pitch black . what settings do i need? i got a mesh that worked lastnight ( by fluke) but id like to know what i need to do so as i can do it anytime. [Edited by - fguihen on November 23, 2004 12:30:35 PM]

Share this post


Link to post
Share on other sites
fguihen    100
ok, ive been doing expirements, and using different meshes, i can see different parts of them. the second mesh i created, i export groups for each body part( in poser) and then i just import to 3dS Max and export as a .x. i can see the guys legs and shoes, but no other part.is it something to do with normals?

Share this post


Link to post
Share on other sites
fguihen    100
yes. here is the loop that goes though the mesh. from what i know, it goes though everything. anyway, it displayed a full charachter yesterday


private void LoadMesh(string file)
{
ExtendedMaterial [] mtrl;
mesh = Mesh.FromFile(file,MeshFlags.Managed,device,out mtrl);

if((mtrl != null) && (mtrl.Length > 0))
{
meshMaterials = new Material[mtrl.Length];
meshTextures = new Texture[mtrl.Length];

//store each material and texture
for(int i = 0; i < mtrl.Length ; i++)
{
meshMaterials[i] = mtrl[i].Material3D;

if((mtrl[i].TextureFilename != null)&&(mtrl[i].TextureFilename != string.Empty))
{
meshTextures[i] = TextureLoader.FromFile(device,@"F:\project research\Begining Meshes\Meshes\" +mtrl[i].TextureFilename);
}
}
}
}





public void DrawMesh(float x)
{
//device.Transform.World = Matrix.Translation(0,0,0)*Matrix.Scaling(1,1,1) ;
device.Transform.World = Matrix.Translation(angle,0,-angle);
for (int i = 0; i < meshMaterials.Length;i++)
{
device.Material = meshMaterials[i];
device.SetTexture(0,meshTextures[i]);
mesh.DrawSubset(i);
}

if( x >=100)
{
device.Transform.World = Matrix.Translation(-50,0,0);
x = 0;
angle = 0;
}
}


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this