Thread: Updating an outdated MS3D Model Loader...

  1. #1
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968

    Updating an outdated MS3D Model Loader...

    Alright, so I spend a week and a half on a Model Loader that actually works, but, not with the most up to date versions of MS3D....

    The problem lies in the Materials somewhere, because when I do load a version 1.7 model the textures don't load correctly... How do I fix my code so it works with the latest versions of MS3D? Any experts in this field of programming? I can post my MS3D code if needed...
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Iv'e had the exact same trouble. I think the problem lies in the texture file paths stored in the MS3D files. I ended up just loading the textures myself with a texture loader seperate from the MS3D loader.

    -psychopath
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  3. #3
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    Someone on gamedev said this

    "Texture paths are now relative"

    This means?
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  4. #4
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    yes they are!
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  5. #5
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    Well thanks, but what exactly does that mean in terms of coding?
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  6. #6
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    Well i'm not sure, but i know they are, heres why:
    Since eternity Milkshape was full of bugs,
    i always tryed to do some modeling with it, and i always got
    problems with materials. Sometimes it worked, sometimes not.
    It also depended on location and stuff. no metter what loader i used.
    So i quit using Milkshape.
    Use Wings 3D.
    Milkshape really sucks.
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  7. #7
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Relative means relative to your current working directory.

    if im in "/home/me/somefolder"
    and i look for "images/foo.gif"
    then the complete relative path is "/home/me/somefolder/images/foo.gif"
    if the path was interpreted as an absolute path, it would be "/images/foo.gif"

  8. #8
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    so essentially all i have to do is have the ms3d texture in the same file as my MS3D model, wrong...

    Doesn't work, tried it... 1.3/1.4 works this way, but anything above that doesn't :\
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  9. #9
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    Figured it out, no code changes at all....

    It seems that my loader function and the save function of the MS3D program have different relative paths to the Texture...

    To fix this problem:

    Step1 - Apply the texture to your MS3D model in MS3D, while the texture is WHERE YOU WANT IT ultimately (if you're using binaries I don't know what to tell you)..

    Step2 - Save the MS3D File to your MAIN PROGRAM DIRECTORY

    Step3 - Compile

    Step4 - Move the MS3D Model file wherever you please (usually couple right with the texture in the data file)

    Fixed, Mine works
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 14
    Last Post: 06-28-2006, 01:58 AM
  2. Model not showing up on screen...
    By Shamino in forum Game Programming
    Replies: 14
    Last Post: 03-09-2006, 08:00 PM
  3. Switch from .ms3d to the ASCII format?
    By Shamino in forum Game Programming
    Replies: 18
    Last Post: 01-23-2006, 09:28 PM
  4. multiple file loading. so fruturated! help!
    By psychopath in forum Game Programming
    Replies: 5
    Last Post: 05-09-2005, 05:13 PM
  5. Help with file reading/dynamic memory allocation
    By Quasar in forum C++ Programming
    Replies: 4
    Last Post: 05-17-2004, 03:36 PM