• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Occlusion isn't working properly.

Status
Not open for further replies.
In Warcraft 3 Demo, Retail and Beta if occlusion was turned on in the game settings trees faded when you got near them. After a certain patch, not sure which one exactly, broke the occlusion support. Neither does this function or the setting work anymore.

  • Cinematic - Enable occlusion for (All players)
"When occlusion is enabled, trees that block vision of units become transparent."

The map has been uploaded below.
 

Attachments

  • Fading Tree System.w3x
    150.9 KB · Views: 202
  • Destructibles 2.png
    Destructibles 2.png
    586 KB · Views: 681
Last edited:
Occlusion in Warcraft does something completely different. It defines if an object blocks the sight of a unit in the fog of war or not.

For example, the trees and the visibility blocker have occlusion height of 230, which makes them block sight if you spam them in a line. A closed gate has an occlusion height of 300.
 
Occlusion in Warcraft does something completely different. It defines if an object blocks the sight of a unit in the fog of war or not.

For example, the trees and the visibility blocker have occlusion height of 230, which makes them block sight if you spam them in a line. A closed gate has an occlusion height of 300.

And what does that have to do with broken Occlusion? Occlusion Height is only a part of Occlusion system in Warcraft 3.

Related:
Urban Dictionary: occlusion

They would probably fix it if we could find a patch where it is working. I'll try to test it out when I can. :)

What? Retail 1.00 it worked, you can also download demo. There's no need to search for any patch, Occlusion worked in retail shipped copies of the game.
 
Last edited:
Level 11
Joined
Jun 2, 2004
Messages
849
The last working patch is what's needed (and the one after that, to see what changes might have caused things to break).

This seems an incredibly minor thing, which is probably why it went unnoticed and unfixed.
 
I don't remember occlusion to ever work in WC3, even in the early days of vanilla. You must be mistaken.

What I DO remember, however, was creating my first RPG back in 2002 only a few months after the initial release of WC3 and spamming the shit out of those Ashenvale trees. You know ... these trees with the large leaves on top obstructing the sight.
And I remember testers complaining about these trees obstructing the sight. So clearly Occlusion didn't work back then either.


I'm 99% sure that occlusion is simply a NYI functionality of WC3 that never existed in a working state. Or a feature that was there in the WC3 beta, but removed later on as they polished the game. After all, melee games never had much use for the occlusion mechanic, so they figured "why bother?".
Just like they made nights much brighter after the beta.
 
Last edited:
View attachment 244575

Nice 1.00 occlusion I'm experiencing here:

That's not retail or you probably have Occlusion turned off. Show me your Warcraft 3 version in the corner of main menu, it has to write 1.00.

By the way, your photo-shopping skills suck. No offense. :p

I don't remember occlusion to ever work in WC3, even in the early days of vanilla. You must be mistaken.

What I DO remember, however, was creating my first RPG back in 2002 only a few months after the initial release of WC3 and spamming the shit out of those Ashenvale trees. You know ... these trees with the large leaves on top obstructing the sight.
And I remember testers complaining about these trees obstructing the sight. So clearly Occlusion didn't work back then either.


I'm 99% sure that occlusion is simply a NYI functionality of WC3 that never existed in a working state. Or a feature that was there in the WC3 beta, but removed later on as they polished the game. After all, melee games never had much use for the occlusion mechanic, so they figured "why bother?".
Just like they made nights much brighter after the beta.

I'm not sure what are you talking about. I'm not here to prove anything, I just reported an issue and I hope it will be fixed. Just as I said previously, Install Warcraft 3 1.00 and see for your self.
 
Last edited:
Wow, I definitely don't remember this, and I have been playing the game since 2002.

Well, as Kaijyuu mentioned this is barely noticeable. Hence that's why it never was fixed. That's what the function in triggers was supposed to do but it doesn't work. The fading trees don't have pathing and can't be target-able in the map I posted. But in Warcraft 3 1.00 they acted like normal trees that faded exactly like in the map.

Oh, jondrean. Your units must be near a tree for occlusion to work. That's probably why it didn't fade.
 
Last edited:

Deleted member 219079

D

Deleted member 219079

Oh, jondrean. Your units must be near a tree for occlusion to work. That's probably why it didn't fade.
What, you don't shove the camera into a tree? Dang..
Ok, I got the effect working by having a worker near a tree.
 
What, you don't shove the camera into a tree? Dang..
Ok, I got the effect working by having a worker near a tree.

Glad to hear it. :)

Maybe you could patch it incrementally and see what the last patch when Occlusion worked was? I have an archive of older patches that are hard to find, if you are willing to do it.
 
Last edited:

Deleted member 219079

D

Deleted member 219079

I just use ReplayKit, it's very simple with it (for 1.00 I need my original CD ofc).

But I don't have time for that atm.
 
Possibly was disabled to prevent cheating? Maybe it was to improve performance?

The setting is still in TFT. However I do not recall seeing it working.

Prevent cheating? How would it be anything related to cheating it was just purely aesthetic. I think that tree fading is broken, why would the option still be there? Why would an obsolete function still be included? They probably messed something up in the code and didn't notice.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
So researched a bit on the uploaded map: The activate/deactivate occlusion action works even in the current version but only on trees that are marked for it. The war3map.doo has a "flags" byte attribute per tree:

Code:
*flags:
0= invisible and non-solid tree
1= visible but non-solid tree
2= normal tree (visible and solid)
(source: www.wc3c.net/tools/specs)

For occlusion to work (it's turned on on default), they would have to have the value 1 there but the WE (at least nowadays) saves them as 2 and I do not know of a way you could alter that in the WE. So yeah, another job for post-processing tools.
 
So researched a bit on the uploaded map: The activate/deactivate occlusion action works even in the current version but only on trees that are marked for it. The war3map.doo has a "flags" byte attribute per tree:

Code:
*flags:
0= invisible and non-solid tree
1= visible but non-solid tree
2= normal tree (visible and solid)
(source: www.wc3c.net/tools/specs)

For occlusion to work (it's turned on on default), they would have to have the value 1 there but the WE (at least nowadays) saves them as 2 and I do not know of a way you could alter that in the WE. So yeah, another job for post-processing tools.

Yes, I hex-edited destructibles in that map to make them non-solid. Here's another map, I managed to simulate pathing and destructible-behavior of non-solid trees but it's still complicated. Press ESC to activate/deactivate Occlusion in-game.

I used farms as a dummy unit to detect position of non-solid trees and then create an invisible dummy destructible for pathing and destructible behavior (such as harvesting).

type -Kill to kill all trees in-game, alternatively type -resurrect to resurrect all trees. One more note, non-solid trees are made into doodads, so doodad animation functions work perfectly.

Also, I used custom tree models by Fingolfin :p
 
Last edited:
So does the transparency work if the flag is set and the occlusion height specifies how much of the sight the destructible is blocking? Does that mean if we could change the field in the object editor, no custom transparency systems would be required?

If occlusion height of a destructible is bigger than that of a unit's, line of sight will be blocked and you won't be able to see past that destructible with bigger Occlusion height. Most ground units have occlusion height set to 0.00, thus line of sight is being blocked by objects with bigger occlusion height.

For trees to fade you need to make them non-solid, there is no possible way to do this in World Editor. Interesting fact, trees are automatically set to non-solid if you place them outside map boundaries.

I am planning to make a tutorial about this, probably some time in the future.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Have you tested the map? Those problems can be easily countered.

I have. You placed a dummy destructable with the same model but invisible on top of each tree to have it interacted with and tried to make the non-solid tree mimic its animations. Which means you have to have a fitting invisible variant for each model, it does not accurately match up with the animation, the animation redirection may be problematic since there is no general approach to that. At least you have to monitor the dummy. It's not that I think that would be all bad, separation of model and view but ofc then we again have overhead similar to replacing systems.

The real issue here is that non-solids can only be spawned via the war3map.doo and destructables are not flexible enough to juggle them about. Also it only seems to work with destructables, not with doodads because those lack the field to set occlusion height. However, in a static environment, doodads are the more performant choice. I guess you used the dummy units because non-solids are not enumerable anymore.
 
Status
Not open for further replies.
Top