Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: 3ds model library update and demo

Hybrid View

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    3ds model library update and demo

    I'm still working on my model library. It now supports collision detection.

    I was originaly planning to only let people use the library for commercial use if they gave me royalties for it, but I changed my mind and decided to sell 2 versions instead, and the third one is for free so you can mess with it before you decide if you want to buy it.

    Here they are:
    -Free
    no textures
    no weighted vertices
    only point collision

    -Standard($25)
    no weighted vertices
    only point collision

    -Professional(Not sure yet...but pretty high)
    everything

    These packages might change.

    I'll have a website sometime when I'm ready to advertise more. The web page will have all the information you need to use the library...including samples.

    Here's a demo that I made that shows off point collision detection. It's not quite optomized yet; it checks all 1168 polygons for every frame and polygon grouping can fix that problem.

    Bounce Demo
    Screen Shot

    Tell me what you think.

    [This message has been edited by WhatEver (edited 04-11-2001).]

  2. #2
    Intern Newbie
    Join Date
    Mar 2001
    Location
    Italy
    Posts
    32

    Re: 3ds model library update and demo

    Please, Can you tell me where can I find info about Pivot, Hierchies, Animations and how they're exported in a 3ds File???

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2001
    Location
    USA
    Posts
    114

    Re: 3ds model library update and demo

    Once it loads the models, how does a program use them?

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: 3ds model library update and demo

    clucches, I'll be working to find the pivot points this weekend. My buddy sent me a model with their pivot set to the centers, and now all I have to do is find some resources to get the pivot. I'm pretty sure I know where it is already though.

    HFAFiend, here's a sample of what it looks like, but the prefix will change before release.

    Code :
    rm_model Model;
    Model.Load3ds("boxes.3ds");
    //smooth the normals first so it will optomize better
    Model.MakeSmooth();
    //this function will optomize the elements
    Model.PackAlign();
    //set up which elements are to be used
    //normals are on by default
    Model.Enable(RM_COLOR_ARRAY |  RM_TEXTURE_COORD_ARRAY);
    //Enable CVAs
    rmEnableCVA();
    //you need to do this step if you have textures aplied to the model
    TextureNames=Model.CreateTextureNames(&nTextureNames);
    //do some matrix stuff and then draw
    Model.Draw(TextureNames);
    //if you don't use any textures, then do this
    Model.Draw(NULL);
    That's basicly all you need to do.

    [This message has been edited by WhatEver (edited 04-12-2001).]

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: 3ds model library update and demo

    clucches, for now you can go to wotsit.org for the 3ds file format. It has quite a bit of info in it. It contains the hierarchy information and key frames.

  6. #6
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Location
    FRANCE
    Posts
    127

    Re: 3ds model library update and demo

    If you happen to find or understand in what frame the pivot point, the local matrix and the keyframes are written, I'd sure be glad to know. I got all my info from the 3DS FTK from Autodesk but nothing about these issues in there. I browsed through the docs at Wotsit but apart from stating that the local matrix is defined in the world frame, nothing. I've tried all sorts of combinations, from the most obvious to some very tortured computations but nothing works all the time. By the way, have you ever noticed with 3DS Max on some models you save in 3DS, when you load them back some positions and orientations are all wrong ? If even 3DS Max can read back some files, I'm not very optimistic...

  7. #7
    Junior Member Newbie
    Join Date
    Dec 2000
    Location
    Belgium
    Posts
    17

    Re: 3ds model library update and demo

    Unfortunately, 3dsmax doensn't support 3ds files very well.
    The format hasn't changed for many years, and lots of info is lost when saving to 3ds files (especially in 3dsmax 4).
    The source-code of the plugin to export 3ds files in 3dsmax4 is provided with the sdk. If someone is interested, let me know.

    It would be much better if we could use .MAX files, which contain all the info you could ever need, but if haven't found the spec yet.
    Does anyone know how to use those files?

    [This message has been edited by Sven Clauw (edited 04-13-2001).]

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: 3ds model library update and demo

    when you load them back some positions and orientations are all wrong?
    I just found that out last night. It seems the mesh was saved in the wrong position, and the only way I could translate the vertices to their local origin was to subtract the pivot position twice from the vertices.

    I can access the key frames, but I haven't the time to experiment with them. I'll try to post something here as soon as I can about where the kf data is. Basicly you read in the name of the object in the current kf, then all it's data will follow under the corisponding chunks.

    Be aware that the key frames are only going to contain the positions at each changed frame. If you have a ball that moves from point a to point b, and you position the ball to point b at the 30th frame; frames 1-29 are not in the 3ds file, only frame 0 and 30.

  9. #9
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,258

    Re: 3ds model library update and demo

    Sven Clauw!
    Rather write a exporter plugin with your own format. The max format is not really good to be read...
    There are tutorials out there how to create an export plugin.
    - Michael Steinberg

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: 3ds model library update and demo

    Michael,

    This thread actually dates back from April and has only been revived because ppinter1 is doing some advertisement !

    Regards.

    Eric

    P.S.: well, perhaps Sven Clauw is still around anyway !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •