• 🏆 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!

Shadows and Shading ?

Status
Not open for further replies.

Ardenian

A

Ardenian

Hello,

how does one create an appropriate shading/ add shadows ?
As far as I know, the default wc3 engine does not create shading/shadows based on the light source, right ?

So, for example, if I have a pillar and one, only one light source,
then I will have to edit the pillar texture based on the light direction, don't I ?
Or is there another way to add this shading effect ?
 
Last edited by a moderator:
Level 31
Joined
Jun 27, 2008
Messages
2,557
Model is already shaded from what I can see, unless that's texture. In Magos material window you can tick Shaded option and it will have those shades.

Wc3 lighting works with one Directional Omnilight, which rays upon entire map. If you want to change this lighting into custom one, use call SetDayNightModels("","") for that model to disappear (so that everything is black and light sources becomes vital, you can have this setup for complete darkness and use light sources to draw shades in the dark on those models) and just make a light model with Directional set up instead of Omni, put it in map.

As for shadows, light sources does not affect those, you may want to customize that to achieve a shadow, or use dummy units to drop their shadows or use World Editor function to apply shadows and save the map, but this affects stationary objects and screws up ground texture, so it is best to customize, create your own shadow model for the effect.
 

Ardenian

A

Ardenian

Ah, I understand, thanks!

Does this work with multiple lights ? If you have many torches, for example, then using their light as Directional set up will shade the walls around it correctly ?
 
Level 31
Joined
Jun 27, 2008
Messages
2,557
No, Directional lights entire map, it gives a sun in the sky so to say. If you want to have half of wall lighted and another half dark, use function call SetDayNightModels("","") and put torches with Omni setup. You can also edit those torches and change the strength of those lights so it will light more space. This includes color as well. In my latest cinematic I exploited these factors (dark tomb set up).
 

Ardenian

A

Ardenian

If it's for playable terrains, then everything APP said suffices.
However, I've got some tips for scenic terrains that he didn't
touch :p

I suppose he needs all of this for a cinematic contest so I guess scenic tips could be of use as well. :)

Yes, I play a bit around with terraining options to see whether I can make something that satisfies me for the cinematic contest :)
If you have some advises, tell me, please :)

One little question, in the first post, we see that the shading will be uniform per... rectangle ( I don't know how the combination is called in modelling).
So, for example, if I had one very big rectangle and a light source that would, in real life, throw shading on it, then it would be uniform shaded in wc3, not in steps, as it would be if there were many little triangles/rectangles, as in the pillar ?
 
Level 36
Joined
Nov 24, 2007
Messages
4,382
Well. When I said "scenic" I pretty much meant "still scenic" as in "not moving".
In a cinematic the camera will move around, so I reckon most of my methods
won't work, as they involve the camera not moving around at all.

I can, though, mention that in the UTM there is a doodad called "Light" which is
basically an invisible model that only affects other doodads (and models) by giving
them lighter surfaces. If a doodad is tinted down, with low RGB values, it will give
off the effect of being shaded on one side and lighter on the other side. The distance
from the light model to the objects does also play an important part, so you might
want to fool around some with that too.

Other than that, my general shadowing techniques involve the Black Glow doodad,
found in the model section, and some cloud doodads that I tint completely black and
scale in various ways for shadows. Both of these generally work best for still terrains though.
 
Last edited:

Ardenian

A

Ardenian

Thanks, that helps a lot!

Scenic, not moving, hm... To be honest, I don't know what is the big difference. If you have static shadows/shading/light sources, then it doesn't matter whether the camera moves or not, does it ?

About the black glow, what would you recommend ? Using the black glow for shadows or edit the actual texture ? Depending on the circumstances I could imagine it is easier to edit the texture using a semi-transparent gradient tool than arranging the glow models. I can imagine situations for both, but what is your opinion ?
 
Level 36
Joined
Nov 24, 2007
Messages
4,382
Don't use the black glow, it will move as the camera moves and is generally a saggy tit
to work with, with can work wonders for scenic terraining, but it wouldn't work for a
moving camera. Trust me.

That's also the case with my other techniques, although I do guess if you flattened and
scaled down a a black cloud doodad then maybe you could be able to make some sort
of shadow, but I can't imagine it'd be easy and would take some precision skills to pull
off in a good way.

You could also just copy the doodad you want a shadow of, pitch angle it "-1.57", tint it
0/0/0 and flatten it toward the ground, this would probably only work on a completely
flat surface, however.

I'm really not sure how to make shadows in a 3D environment in the WE, magic?
 

Ardenian

A

Ardenian

Hm, the interesting question is whether the black glow moves as the camera moves because he is camera anchored. In case this is the reason I could simply edit the model to not make it follow the camera. Whether it looks then is the other question.

Thanks, I will test what is the best solution for me!

Another question, if you don't mind. About mountains, if I would like to have a visible mountain not fading into glow, then I have to add a custom texture, don't I ?
Since the default textures will probably look like man little rocks one on another, not like a far far away mountain.
Do you have an advice for them ? Mountains visible a 100% in the sun light ?
 
  • Actions
    • Ubersplat - Create ubersplat at (Center of (Playable map area)) of type Goldmine with color (0.00%, 0.00%, 0.00%) and 50.00% transparency (Disable paused state, Disable skipping birth time)
Try using Ubersplats for ground shadows?

I think there was a map around here in the terrain section containing just the ubersplats of buildings iirc and maybe you could replace it with a monochrome shadow.

I think you can find it under the units in the object editor under buildings 'Art - Ground texture' to use them without triggers.
 
Level 15
Joined
Dec 24, 2007
Messages
1,403
One little question, in the first post, we see that the shading will be uniform per... rectangle ( I don't know how the combination is called in modelling).
So, for example, if I had one very big rectangle and a light source that would, in real life, throw shading on it, then it would be uniform shaded in wc3, not in steps, as it would be if there were many little triangles/rectangles, as in the pillar ?

What you posted in the OP (the Blender screenshot) is a simple example of a flat shading model. Every 3D model used in games is composed of polygons, triangles to be more precise. These triangles are simply made up of 3 vertices that, when connected, form a face (or triangle). Each "face" has a normal, which essentially defines which direction is the "outside" of the face. The flat shading simply takes the value of each normal, and applies the same uniform shade to that face, and does so for the entire model, which gives it that "faceted" or banded shading look.

Now, if you're looking at smooth shading, then it gets more complicated. You get into basic lambertian and phong shading models, which are quite a bit more complex.

So, there's some quick, extremely basic info on how lighting is done in most modern games.

Warcraft 3, however, is nothing like that. Getting any "real-time" shadows in WE is pretty much impossible. As Keiji has explained, we've only managed to create the illusion of it through all sorts of sorcery and trickery.

As for your question about mountains, that can be done fairly easily with some smart use of the default terrain editor. If you're talking about cliffs rather than a mountain though, then it's more difficult. In most games, all cliffs are composed of the same rock asset, rotated and stacked in place to give variety.
 
Status
Not open for further replies.
Top