Jump to content
  • Advertisement
Sign in to follow this  

Milkshape Materials

This topic is 4748 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

Well, seeing as how there are no really good Milkshape classes out there that are also up to date, I decided to write my own. A half hour later, I had the makings of a semi decent class going (sure, it didn't have skeletal animation yet, and could only load, draw, and save models (not even the textures)) but it was decent for a half hours work. So anyway, I tested it, and it ran just fine... well, almost For some reason, whereas an image with nothing but material properties looked like this in milkshape (color scheme and model was strictly for test purposes) it came out looking like this in my class i checked over the output code
for(i=0; i<meshes; i++){
    if(mesh.mati >= 0 && tempmi != mesh.mati){
        tempmi = mesh.mati;
        glMaterialfv(GL_FRONT, GL_AMBIENT, mat[tempmi].ambient);
        glMaterialfv(GL_FRONT, GL_DIFFUSE, mat[tempmi].diffuse);
        glMaterialfv(GL_FRONT, GL_SPECULAR, mat[tempmi].specular);
        glMaterialfv(GL_FRONT, GL_EMISSION, mat[tempmi].emissive);
        glMaterialfv(GL_FRONT, GL_SHININESS, mat[tempmi].shininess);
        for(l=0; l<mesh.numtris; l++){

and the variable values for materials (RGBA values, not code) GL_AMBIENT = 0.000000 0.117647 0.941177 1.000000 GL_DIFFUSE = 0.270588 0.674510 0.000000 1.000000 GL_SPECULAR = 0.796079 0.011765 0.035294 1.000000 GL_EMISSION = 0.400000 0.274510 0.274510 1.000000 GL_SHININESS = 0.000000 and found everything to be correct (to my eyes anyway). So, the only conclusion I can draw from the above, is that Milkshape handles material properties in some way unknown to me. Which brings about my question, How should I handle material properties so that they show up the same in both Milkshape and my program? Thank you, relpats_eht (The Anti-Stapler) *edit* Thnanks, happybara [Edited by - relpats_eht on May 21, 2005 4:18:50 PM]

Share this post

Link to post
Share on other sites
hrm... apparently the yellow turning to white was caused by full light intensity, so the only problem left is why the colors of the yellow and purpleish arent blending to make the redish.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!