• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Reset DayNightModels for a single model.

Status
Not open for further replies.
Level 13
Joined
Jun 1, 2008
Messages
360
Does somebody know how to reset a daynight model?

Referring to this tutorial, it should be possible to make a single model a day/night model by using
Code:
call SetDayNightModels("...","...")
where ... is the model path.

But when I paste the model path in the trigger the editor (standard world editor) crashes when I try to save the map.

What I want is every model to be day/night except one or two.
Code:
call SetDayNightModels("","") //this works
call SetDayNightModels("[MyModel]","[MyModel]") //this causes crash
([MyModel] = buildings\other\WyvernCage\WyvernCage.mdl)
 
Level 4
Joined
Jun 26, 2010
Messages
73
when i do it, i usually just have an edited day and night model. that would work, but i'm not sure that's what you are asking.

i'm not sure what you are asking.
if you want the original day night models, you can (almost certainly) use them through the map archive.

The name of the model in the import editor has to be the same as in the script.
 
if you use paths on jass you should always do this \\ rather than \

buildings\other\WyvernCage\WyvernCage.mdl

should be

buildings\\other\\WyvernCage\\WyvernCage.mdl

EDIT: I read the tutorial and I think, daynight models are lighting models which affects the whole map and cannot be set to one unit only...

EDIT 2: I tried your script and yes I'm right, DayNight models really are lighting models used by the whole map... I tried using your model path and you know what I got? A PERMANENT BLACK MASK around the map...

and since you said this:

"What I want is every model to be day/night except one or two."

it means you misunderstood the tutorial...
 
Level 13
Joined
Jun 1, 2008
Messages
360
i'm not sure what you are asking.
Sorry I couldn't make myself clear. That's probably because I don't even know which models are meant with "DayNightModels". Also I didn't find a description of the function.

But I think this is what it does (after trying some paths):
When you add a model path of a light, it puts the light always at the center of your camera.
When you leave it blank theres no light created and thus the map becomes dark, except you place some lights yourself.
And then you can also give the function in the first quotations the path for terrain and in the second the path for units, which sets the standard lightning for a terrain set I blieve (I'm not sure though).

What I want to do is apply the standard lightning on a specific item/model, so it acts like it were unshaded.
Is there any way to do so without exporting the model, making it unshaded, and importing it again?

The river rushes for example are unshaded.
Use
call SetDayNightModels("","")
and place some river rushes then you know what I mean.
I want that effect on another model without importing a new one...
 
Status
Not open for further replies.
Top