[Question] How to add light to mdx (.m2) models? menu

Shout-Out

User Tag List

Results 1 to 10 of 10
  1. #1
    necroslord's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] How to add light to mdx (.m2) models?

    First of all, greeting to everyone, and thanks for taking some time for this.

    I am really interested in the not-so-easy but fine art of lighting, I think lighting is something that gives life to an enviroment and I notices from the first day I played WoW that it lacks good lighting.

    I am experimenting with lighting in wow because I want darkness, in WoW nights aren't dark enough. By now I know how to modify enviromental light (right nowI have Azeroth in the deepest darkness except inside buildings naturally. However a problem appeared, there are no lights outside! Even when there are lamp post everywhere there's no light at all!

    This leads to my question, is there a way to add light to models such as street lamps? or to increase light radius given by off-hand items likes torches or lamps? I'm really excited with my project of "realistic nights" and would appreciate any help.

    I would post a screenshot of my achievements so far, but this is my second post in the forums (3 are required to post links).

    EDIT: So now I have 3 posts. Here are two screens. First one, pitch black "world in darkness":



    and second, dark but not black, a little better for late at night, but as you can see, the issue of no light giving objects, and my lamp gives almost no light.

    Last edited by necroslord; 09-13-2008 at 02:00 PM.

    [Question] How to add light to mdx (.m2) models?
  2. #2
    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 ->
    : 0x11C: uint32 nLights
    : 0x120: uint32 ofsLights
    :-> ofsLights nLights blocks of:
    : : 0x00: uint32 ignore
    : : 0x04: float[3] Coordinates
    : : 0x10: AnimationBlock AmbientColor // (float, float, float)
    : : 0x2C: AnimationBlock AmbientIntensity // (float)
    : : 0x48: AnimationBlock DiffuseColor // (float, float, float)
    : : 0x64: AnimationBlock DiffuseIntensity // (float)
    : : 0x80: AnimationBlock AttenuationStart // (float)
    : : 0x9C: AnimationBlock AttenuationEnd // (float)
    : : 0xB8: AnimationBlock ignore2 // its 1 // (int)

    AnimationBlock
    : : 0x00: int ignore
    : : 0x04: int ignore2 // nranges
    : : 0x08: int ignore3 // ofsranges
    : : 0x0C: int ignore4 // ntimestamps
    : : 0x10: int ignore5 // ofstimestamps
    : : 0x14: int nValues // count of values (should be 1)
    : : 0x18: int ofsValues // offset to the values.
    -> at ofsValues: an array of the type specified above with nValues entries.

    You actually only have to care about the Intensity in my opinion. So you go to ofsLights, the intensity block. there to ofsValues (at both, ambient and diff!), and change the value to something bigger.

    Nice idea. Great project.

    ICQ: 174605633, MSN: [email protected]

  3. #3
    necroslord's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for letting my project go on and +rep.

    Doesn't look really hard. But the important stuff now would be.....
    What program can I use to have access to those settings?

  4. #4
    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)
    Any hex-editor.

  5. #5
    necroslord's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /sigh

    I thought I would need a specialized tool or something! This is gonna be easier then. Thanks.

  6. #6
    necroslord's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright , modifying existing lights in objects resulted to be easy after schlumpf's help a little "study" of the file. However adding a light to a model that doesn't have it seems difficult. Can anybody help on this?

  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)
    Well, its the same. But you need to fill in the things, I said to ignore too. Please contact me on MSN or ICQ. (ICQ: 174605633, MSN: [email protected]).

  8. #8
    Yamachi's Avatar Contributor
    Reputation
    149
    Join Date
    May 2007
    Posts
    653
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The easiest thing to do would be to take the data for an existing light from another model, and import it into the one you want to add lights to. Then, you can just edit it how you want it. The same thing applies to particles.


  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)
    Why does everyone copy things? Just create new ones.

  10. #10
    necroslord's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A comparsion, of Tyr's Hand place in Eastern plaguelands. Both sets of screenshots were taken at the same hour (9:10pm), first set is with original weather. Second one with my enviroment project. In the original some buildings are missing due to the removal of patch-X.MPQ, but the important thing is lighting effect. You can also see fire totems as placeholders for lights until I learn how to put them into .m2's correctly. (The totems give some decent light)

    Before:





    After:





    P.D. Schlumpf, I already added you as MSN contact, maybe some time you could explain me a little of the m2 thingy. I got lost in the middle of the process.
    Last edited by necroslord; 09-15-2008 at 09:31 PM.

Similar Threads

  1. [SQL Question] How to add S5 and T7 to 2.4.3?
    By damar in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 03-14-2010, 10:50 PM
  2. [Question] How to add items to your itemcache
    By Rynosaur4472 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 09-14-2008, 04:12 PM
  3. [Question] How to add an item to the mpq when u finish editing it
    By VIEJO in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-30-2008, 12:51 AM
  4. [Question] how to add model patch
    By Jardiare in forum WoW ME Questions and Requests
    Replies: 8
    Last Post: 04-22-2008, 03:53 PM
  5. [Question] How to add multiple files in MWCS
    By Randie in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 04-21-2008, 03:52 PM
All times are GMT -5. The time now is 08:49 PM. 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