Modcraft - The community dedicated to quality WoW modding!
Content creation => Modelling and Animation => Topic started by: PainSavior on October 21, 2013, 02:54:57 am
-
I can't seem to find a tutorial on this...
But.. I'm wondering.
How do the lights work on WoW?....
Are they're actually "Light Objects" that are combined into the WMO?
Or is there a Lightmap file for every adt?
I'm trying to make the insides of my building bright, and I thought that was done by adding a M2 (Torch), but it didn't brighten it up at all.
Can some one explain how to add light to the inside of a building?
-
There are dbc entrys and light spots for outsidem inside light is part of the model. And i would also need some hints how to handle them.
-
That's what I'm trying to figure out.. Inside WMO lights.
Gamh said it has something to do with vertex colors of the model... which aren't currently editable as of right now..
So.. is there a cheap fix to adding light to the inside of a WMO?
That's my question to the modcraft community
-
This seems to be uncharted territory, so if you really do want an answer, you may be alone in this endeavor, but if you find anything out or get a working concept going, then feel free to enlighten us(the community) if you so wish it. ^_^
-
I am unusure about lights in WMOS, but I think they're caused by lights in a m2 that is later placed inside the WMO, but you can probably set a flag to give the whole wmo the same lit.
But for m2s you can give it lights with the Lightadder program or with MDLVIS/War3ModelEditor + MDXTOM2.
I suggest you try the first program mentioned.
-
Cool. Thank you.
We should collet a List of m2 that are useable as light source.
-
Not all lightning in WMOs is handled by M2s.
But you can still add lights to your M2s yourself and place them in the WMO in question.
viewtopic.php?f=12&t=706 (http://modcraft.io/viewtopic.php?f=12&t=706" onclick="window.open(this.href);return false;)
-
QUestion is , is there also animated light possible. To get a fire flickering effect?
Or do particles also give light and are there light particels.
Questions about questions :)
I was once on Bastis server and he did the lighting with m2s. It looked very nice, but if you get the model out of view, the light alos dissaperas. Is this possible to rfix?
-
I guess that's the way to go for now. I'll give that a try.
Cause' it doesn't look like WMO's lights are understood yet, and I'm really not into hexing. I'm sure I'll make a mess of things.
I can say this, that the WMO's if written as "Indoors" usually bugs the world, if you get close to them. And I'm pretty sure it needs to be set as indoors to get the M2 lighting. IDK though I haven't actually been able to get a light to work well.
On the subject:
Unfortunately no, OBJ has no clue about lighting (but anyway, so does this converter).
Setting your WMO indoor is likely to crash as the converter can't generate portals from nothing, and portals are mandatory to link indoor to outdoor parts. I thought about a system for this.
So maybe if the entire model is indoor.
Or even if you made a seperate WMO, ligned up on the outside that might be a way around it.
-
Cause' it doesn't look like WMO's lights are understood yet, and I'm really not into hexing. I'm sure I'll make a mess of things.
They are. MOLT are just the same as M2 lights. The more performant, more commonly used MOCV is just the output of 3dsmax / some renderer, equivalent to light maps, applied to the 3d structure, coloring each vertex individually.
QUestion is , is there also animated light possible. To get a fire flickering effect?
Yes. Next to all values are animated.
Or do particles also give light and are there light particels.
No.
Is this possible to rfix?
Increase the model view bounding box until light will have no influence anymore. If you would still see light, but the model disappears, the model is actually broken, not the rendering.
-
I wanted to start out saying :
This is kind of a major thing... If you want WMO's (Larger objects, buildings and such) to have lights, then their should be a tutorial on this, No?...
I mean, really. If you'd want to make ANY custom WMO then you would want to know how to light it up just like the building's in WOW?
I don't know if this subject is relatively new.. cause I've never seen a tutorial on WMO Lighting.
I'll be sure to write one for the community if we can come to a solution.
They are. MOLT are just the same as M2 lights. The more performant, more commonly used MOCV is just the output of 3dsmax / some renderer, equivalent to light maps, applied to the 3d structure, coloring each vertex individually.
So..... In human terms.
How would I go about coloring vertexes?
What you said above... Is that all done in hex editing?...
Like step by step?
1.) Open the WMO (Switch to Indoor for Indoor objects(But what about Gamh wrote:Unfortunately no, OBJ has no clue about lighting (but anyway, so does this converter).
Setting your WMO indoor is likely to crash as the converter can't generate portals from nothing, and portals are mandatory to link indoor to outdoor parts. I thought about a system for this.))
2.) Find nLight and change value to one?
3.) MOCV / MOLT chunk?
4.) Change what values?
I have so many questions for you, if you truly know how to light up the WMO's.
Does it have to be an Inside wmo as well? (No Outdoor check)
(I'm pretty sure OBJ format doesn't allow for vertex colors..... and if not that, I'm pretty sure Gamh's converter doesn't convert vertex colors?)
-
I wanted to start out saying :
This is kind of a major thing... If you want WMO's (Larger objects, buildings and such) to have lights, then their should be a tutorial on this, No?...
I mean, really. If you'd want to make ANY custom WMO then you would want to know how to light it up just like the building's in WOW?
I don't know if this subject is relatively new.. cause I've never seen a tutorial on WMO Lighting.
I'll be sure to write one for the community if we can come to a solution.
They are. MOLT are just the same as M2 lights. The more performant, more commonly used MOCV is just the output of 3dsmax / some renderer, equivalent to light maps, applied to the 3d structure, coloring each vertex individually.
So..... In human terms.
How would I go about coloring vertexes?
What you said above... Is that all done in hex editing?...
Like step by step?
1.) Open the WMO (Switch to Indoor for Indoor objects(But what about Gamh wrote:Unfortunately no, OBJ has no clue about lighting (but anyway, so does this converter).
Setting your WMO indoor is likely to crash as the converter can't generate portals from nothing, and portals are mandatory to link indoor to outdoor parts. I thought about a system for this.))
2.) Find nLight and change value to one?
3.) MOCV / MOLT chunk?
4.) Change what values?
I have so many questions for you, if you truly know how to light up the WMO's.
Does it have to be an Inside wmo as well? (No Outdoor check)
(I'm pretty sure OBJ format doesn't allow for vertex colors..... and if not that, I'm pretty sure Gamh's converter doesn't convert vertex colors?)
That's why .WMO is not based on .obj.. Doing it by hand would be a horrible pain in the ass, though. I'd advice against that.
Also, see http://pxr.dk/wowdev/wiki/index.php?title=WMO (http://pxr.dk/wowdev/wiki/index.php?title=WMO" onclick="window.open(this.href);return false;).
-
I haven't been around WoW for a bit ,so I might've forgotten something.
From what I remember to get vertex lighting you have to enable the flag in the MOGP chunk (optionally the indoor flag too if it's indoor) if you leave it outdoors the light will just blend with it like it normally would.
You then need to add a MOCV chunk yourself, (The MOGP and MOCV are in the group file, I think I edited MOGI in root file when testing indoor/outdoor ,but you couldn't see the inside unless you moved into it because of no portals) After that I used "4 bytes per vertex"(quoted from wowdev) and trial and errored it. That's how I got light in my .wmos .-.
Old examples attatched -edited
-
There is no real way to do this by now, if that's what you mean PainSavior.
It is possible to do the following to add lights, both indoor and outdoor I guess, with the help of the wiki link above :
- Open root WMO
- Increment nLight
- In MOLT, add a new light entry with your parameters
- Open the WMO group where you need a light
- In MOLR, add your light entry
- In both root WMO and group WMO, toggle the MOLR flag on.
But as said,
Doing it by hand would be a horrible pain in the ass, though. I'd advice against that.
That's why there aren't explicit tutorials about this.
What you most probably want to do for "indoor lights" is using vertex colors, which are colors applied on each vertex of the model, used exclusively indoor in WoW. But nor OBJ or 3DS support vertex colors ; a good candidate is the FBX format, and I'm already working on this.
You can do all of this by hex, but it would be a whimsical time loss.
-
Okay, okay. So it is possible VIA hex editing... I get it. But this would one vertex at a time which would be a giant waste of time I guess.
So, in the mean time of waiting for us to be able to convert something that allows vertex colors to WMO format.
What would be the best rigged-fix? In terms of managable, simplicity, and times-sake.
The idea of using m2s (With a larger light span)?
-
Perhaps cromon could add this to his wmo edit.
I will have a talk.
-
That would be very very, progressive.
Hopefully Gamh will kill it too, 2 birds and 2 stones, nothin like options lol.
I mean, 1 bird, 2 stones. You get the point.
I'm hoping someone might be able to make a step-by-step on how to vertex color, manually.
EVEN if it is a big whimsical time loss (thanks for that word lol), I'm still interested in it cause it seems like there's not much of another option, as of right now...
I have noticed that the torch light that you hold as a weapon, lights up the WMO's.
So anyone one with the knowledge, please step forward and lend some wisdom (In a tutorial format) please :P
-
You need to know how to use the wiki to navigate in a .WMO file, what's a flag, what is little-endianness, etc, there are several tutorials for that out there.
- Open the WMO group of your indoor part.
- At the end of the file, append a chunk called MOCV (so "VCOM")
- It's size will be nVertex * 4 (because 4 is the size of a color entry and you have nVertex entries). You can find nVertex by dividing MOVT size by 12.
- Apply the colors you want in BGRA format (the neutral color is 7F 7F 7F FF or sth like that). Take example from Blizzard models which already contains a MOCV.
- In the MOGP.flags, toggle the MOCV flag on.
-
I'm superiorly nooby with hex editing, so all of the above pretty much sounds like chinese to me haha.
If I can get it down, I promised to write a tutorial about it, in the mean-time, of some one (hint hint) going above and beyond and making the FBX conversion, or a tool that puts vertex colors to wmo's.. maybe cromon even?
-
Download 010editor.
Download the templates from resources.
Open 010
Open model
Gonto templates menu and load wmo template.
Again wmo menunrun this template.
Nkw you getna treenstructure where you can accessnall data parts of the wmo.
Refer to the given infos and the dev wiki and change data.
-
I mean like, I know how to get to that part. I just, don't understand like the little things when I get there...
Such as .. what would be a good number for everything?
I guess I could refer to a WoW model as a guideline, but it'd help if somebody would explain each one y'know..
Like, YEAH there's a LightAdder for M2's.. but NOBODY explains which numbers to use, and what's what. Like, do all the numbers have to be 2.435 or can they just be 2, or.. how is attenuation measured?.. what are the bones? What happens if I put -1 -1 -1 for position? Y'know? Like questions like that I have with that type of thing.
I just think it'd help if there was a guideline tutorial on this subject.
-
Simple becaus not many till noone ever spend time in it.
in modding you are often one of the first doing such stuff.
There are simple no guys that can quick post you some stuff.
-
do all the numbers have to be 2.435 or can they just be 2
As described in the wiki or source code of the application.
how is attenuation measured?
As described in the wiki. (No proper description available: Try around.)
what are the bones?
You should use the bone you want to attach it to. If you don't need any animated position of the light, pick none (-1).
What happens if I put -1 -1 -1 for position?
-1 -1 -1 is a valid position in 3d space and will by offset by -1 -1 -1 from the bone you chose or 0 0 0 of the model, if no bone chosen.