[Development] WoW Model Lib menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Development] WoW Model Lib

    Hello everybody!

    At the moment im creating a .NET Interface for everyone of you capable using C#, VB.NET, J# or CLI/C++. It will give you very simple classes und functions to render wow models, change the models (e.g. the vertices) and save the models. Also it will contain a directX renderer that creates very simple context to render into form-controls. The other part is an interface to deal with MPQ-files without big overhead!

    Here are some examples:
    1. Loading a listfile of a MPQ:
    Code:
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            WoWRender.MpqHandler m_handler;
    
            private void button1_Click(object sender, EventArgs e)
            {
                if(m_handler == null)
                    m_handler = new WoWRender.MpqHandler();
                listBox1.Items.Clear();
                openFileDialog1.ShowDialog();
                string fName = openFileDialog1.FileName;
                if (fName == "")
                    return;
                m_handler.AddArchive(fName, false);
                string[] files = m_handler.GetFileList(fName);
                if (files == null)
                    return;
                foreach (string s in files)
                {
                    listBox1.Items.Add(s);
                }
            }
        }
    2. Modifying a .M2-file:
    Code:
                MpqHandler handler = new MpqHandler();
                handler.AddArchive("data\\expansion.MPQ", true);
                handler.AddArchive("data\\common.MPQ", true);
                handler.AddArchive("data\\common-2.MPQ", true);
                handler.AddArchive("data\\patch.MPQ", true);
                handler.AddArchive("data\\patch-2.MPQ", true);
                handler.AddArchive("data\\lichking.MPQ", true);
    
                ModelCreator creator = new ModelCreator(handler, null);
                model = creator.CreateModel(@"World\Expansion02\Doodads\DragonBlight\DragonBlight_Tree01.m2");
                foreach (Vertex v in model.Vertices)
                {
                    v.X *= 2.0f;
                    v.Y *= 2.0f;
                    v.Z *= 2.0f;
                }
                model.Save("C:\\Programme\\Tree.m2");
    3. Render and animate a .M2 model:
    Code:
    namespace RenderTest
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            WoWRender.WoWRenderMgr mgr;
            M2Model model;
    
            private void Form1_Load(object sender, EventArgs e)
            {
                mgr = new WoWRender.WoWRenderMgr(panel1);
                mgr.OnRender += new WoWRender.WoWRenderHandler(OnRender);
    
                MpqHandler handler = new MpqHandler();
                handler.AddArchive("data\\expansion.MPQ", true);
                handler.AddArchive("data\\common.MPQ", true);
                handler.AddArchive("data\\common-2.MPQ", true);
                handler.AddArchive("data\\patch.MPQ", true);
                handler.AddArchive("data\\patch-2.MPQ", true);
                handler.AddArchive("data\\lichking.MPQ", true);
    
                ModelCreator creator = new ModelCreator(handler, mgr);
                model = creator.CreateModel(@"World\Expansion02\Doodads\DragonBlight\DragonBlight_Tree01.m2");
                model.Effects.ScaleX *= 0.2f;
                model.Effects.ScaleY *= 0.2f;
                model.Effects.ScaleZ *= 0.2f;
                model.RenderContext = mgr;
    
                mgr.BeginRender();
            }
    
            private void OnRender()
            {
                if (model != null)
                {
                    model.Effects.ScaleX *= 1.01f;
                    model.Effects.ScaleY *= 1.01f;
                    model.Effects.ScaleZ *= 1.01f;
                    model.Render();
                }
            }
    
            private void Form1_FormClosing(object sender, FormClosingEventArgs e)
            {
               mgr.EndRender();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                mgr.BackgroundColor = Color.Blue;
            }
        }
    }
    Before the first release i need to implement some more threadsecurity and some more exceptions need to be thrown.

    I hope that there will be more people acting in Modelediting if they get a easy library to modify and display the models!

    Of course it will contain also support for ADT files so you will be able to change vertices for maps (no limit for exploitation, as it will allow every ADT in the game to be changed).

    Greetings
    Cromon

    [Development] WoW Model Lib
  2. #2
    Ravenheart's Avatar Nevermore
    Reputation
    355
    Join Date
    Oct 2007
    Posts
    549
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, this is awesome, keep it up! 4x +Rep from me

    Don't forget You're able to design your own universe.


  3. #3
    piller's Avatar Contributor
    Reputation
    82
    Join Date
    May 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    looks interesting. cant rep to this thread
    Last edited by piller; 11-23-2009 at 08:11 AM.

  4. #4
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awsome i maybe start with model editing more serious when this release =3 cant rep tho :/

    ----------------------------------------------------------------

  5. #5
    Bjarke's Avatar Contributor

    Reputation
    146
    Join Date
    Dec 2006
    Posts
    319
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, you got this working with m2 viewdistance and collision? (For world objects? ) would be awsome (the tools we have now are not working proberly, and to make 1 object with collision and viewdistance we need 4-5 diffrent tools :S)

    but +rep for the great work so far

  6. #6
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Collision and viewdistance actually allready work in yiasedit if you spawn an MDX into a tile and it only intersects the spawntile. As im atm calculating the bbox of the models itll be easy to calc the appropriate MCRF for the models.

  7. #7
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cromon: We are not talking about the MCRF here.
    Once again: Why did you make another lib if there already is one? ._. Yay.

  8. #8
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MCRF -> collision, no MCRF -> no collision. If you mean another collision just tell

    Well, why do we make another computergame? There is already one. Why do we make another car? There is already one. Why do we make a new computer, there is already one? Why do we make new mobile phones, there is already one?

  9. #9
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ._. M2.Header.floats

  10. #10
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, kk, thanks, will include that.

  11. #11
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its not very difficult to make that collision and viewingstuff. If you save the file it automatically checks every boundingbox in the model if there is something to change. So the viewingdistance thing is working correctly, just need to implement a tweek on the collision as colliding with the scaled object atm results in a crit :P

  12. #12
    [Blinded]'s Avatar Contributor
    Reputation
    88
    Join Date
    Nov 2009
    Posts
    177
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for posting this, it gave me a little view of rendering.
    Tanks alot.

  13. #13
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, made some more things:
    1. You can change the boundingvertices on your own. Display a bounding shape out of the triangles as wireframe to see if it fits the modified model. scalar scaling on every vertex is pretty simple. Just scale all vertices and all boundingvertices with the same factor and you have fully working collision on the sized model ingame.

    2. Particleemitters:
    You can change these emitters. change the rotation of the particles, change the outputlocation of the particles, change the size of the particles, ...

    When ive done the M2Models i will release the first betaversion and head up to WMOmodels.

  14. #14
    Demonshade's Avatar get in da van, i got epix

    Reputation
    494
    Join Date
    Mar 2007
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sweet!! will this be integrated in yiasedit?
    /AFK shower

  15. #15
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of course

    Adding some handling for the animationblocks to change animations.

Page 1 of 2 12 LastLast

Similar Threads

  1. WoW Model and Map Viewer
    By m_fatica in forum World of Warcraft Bots and Programs
    Replies: 4
    Last Post: 04-14-2007, 02:22 PM
  2. How to edit your WoW Models
    By Cush in forum World of Warcraft Model Editing
    Replies: 27
    Last Post: 02-27-2007, 07:31 PM
  3. How to Export Images from WoW Model Viewer.
    By Elites360 in forum Art & Graphic Design
    Replies: 4
    Last Post: 02-17-2007, 07:36 PM
  4. New wow model viewer?
    By Oggadoga in forum World of Warcraft General
    Replies: 4
    Last Post: 01-06-2007, 04:43 PM
  5. need help with WoW Model View
    By Avianar47 in forum World of Warcraft General
    Replies: 1
    Last Post: 11-08-2006, 08:53 PM
All times are GMT -5. The time now is 10:27 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search