• Advertisement


This topic is now archived and is closed to further replies.

Guest Anonymous Poster


This topic is 6716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Hmmm.. intresting, ive played around with RM too, not much with mesh manipulation on your scale but from my experience there could be several possiblitites:

-UV coordinates are being messed up by moving verticies. This is unlikly since you dont have any textures from your description.

-You have to recalculate normals for faces when you manipulate a mesh (not sure about this but you can check) I think RM uses normals to calcualte visiblity and lighting, which would fit the effects your describing of disappering faces and strange lighting.

So the struct for D3DRMVERTEX is as follows :

typedef struct _D3DRMVERTEX{
D3DVECTOR position;
D3DVECTOR normal;
D3DVALUE tu, tv;
D3DCOLOR color;

As you can see if you dont init the normal, tu, tv, or color you'll proably experiecne that affect your describing. Yes thats proably it. Youll have to explicitly set those values.

Good Luck!


Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I converted a Meshbuilder which had already loaded a file in to a Mesh.

meshbuilder->CreateMesh( &mesh );

I added it to the scene and I tried to change the vertices using the SetVertices function. The problem is after doing so, everything works as it should, except the mesh is pitch black, even with the lights and everything. You can just see the silhoutte of the mesh.

what I did was:

D3DRMVERTEX vertices[3000];

. . . //put vertex positions in vertices[]

mesh->SetVertices(0, 0, vertnum, vertices);

But when I change the

D3DRMVERTEX vertices[3000];
D3DRMVERTEX *vertices = (D3DRMVERTEX *)malloc(sizeof(D3DRMVERTEX) * vertnum);

and then do the SetVertex call, it works better, but now it has flashy black and white alternating colours swirling around the mesh.

I have no idea what's wrong, the mesh should be white, and it is if I don't call the SetVertices function, but I need to change vertex positions often so I used D3DRMMESH instead of Meshbuilder.

When I set only a portion of the mesh vetices with the SetVertices function, those vertices are turned black, but the rest is white.

Please help, I don't know why the mesh turns pitch black or swirls with alternating black and white colours when I call the SetVertices function.

Thanks very much,

Share this post

Link to post
Share on other sites

  • Advertisement