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

[Import] Alpha Tile Bug and Rotating Model

Status
Not open for further replies.
Level 26
Joined
Oct 2, 2011
Messages
2,482
Kinda unsure about where to post those issues, so I post them both here instead. :)

Alpha Tile Bug
Problem 1: Alpha tile is not see-through in editor or in game? It just appears white instead. I imported the same file to a different map, and it works without problems. I tried restarting the editor, but with no new result.
This is the alpha tile I used.
This is a map where it works.
This is a map where it does not work.

Rotating Model
Problem 2: How do you make a non-rotating model attachment? I want the unit having the attachment (on origin) to be able to move around and turn as usual, but the attachment to stay facing 0 degrees.
Example: Like the devotion aura doesn't turn when the paladin wearing it does.

Currently, I have a dummy unit that looks like the model I want attached to the hero, and moves it to the heros location every 0.01 seconds, but this isn't a preferable solution.
You can see what it looks like in this map.
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Problem 1: try re-importing the texture. I also encountered the same problem when working on glideon.
Problem 2: billboarding hero's root node (only x & y axes) might work. But it has a problem where it's got flipped with certain camera yaw & pitch. But if you are using default wc3 camera maybe it won't be an issue.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
For problem 1 try using this tile. Make sure the import path is correct, it must overwrite an existing tile texture. Be aware that WorldEdit caches tile textures between maps so you need to disable it from generating a blank map at startup for some tile textures to be replaced inside the editor (in game they should still be replaced).

This texture has been highly optimized for compressibility and should use well under 1kb in the map archive.
 

Attachments

  • Transparent Tile.blp
    1.2 KB · Views: 56
Level 26
Joined
Oct 2, 2011
Messages
2,482
Problem 1: try re-importing the texture. I also encountered the same problem when working on glideon.
I've done that a few times already, but i'll give it a few more goes I guess. :)
Problem 2: billboarding hero's root node (only x & y axes) might work. But it has a problem where it's got flipped with certain camera yaw & pitch. But if you are using default wc3 camera maybe it won't be an issue.
I'm using almost default wc3 camera, the differences being you can't rotate the camera (with insert and delete) and the camera doesn't change AoA when scrolling in: I tjust zooms instead.
I'm not sure what you mean by "billboarding hero's root node". Can you explain in n00b language? :D

@Dr Super Good Thanks! I'll try it out. :)


EDIT:
Nope, the alpha tile you attached did not work either. :/
The tile turned black ingame instead. Here are two examples of how it looks:
Here I am at the edge of the map. The lower stripe of blackness is no tile, and thus, you can see the base of the building over the edge. To the right, I've placed the Alphatile that Dr Super Good provided, but as you can see it is both fogged and not see through.
example2-png.265787
example1-png.265786
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
I've done that a few times already, but i'll give it a few more goes I guess.
Does that fix it right after you re-import and re-open your WE? It kept re-occurring to me as well so I needed to keep re-importing whenever it happened. I don't know it only happened to my Glideo project, but not to the other projects.

I'm not sure what you mean by "billboarding hero's root node"
Edit the hero's model using magos model editor. Go to node manager. Right click on a node called "origin" (not "root", my bad) > edit node. Then tick "billboard x" and "billboard y" checkboxes. You can also do that to the aura model instead. But instead you need to edit the "root" node.
I haven't tested with default camera yet, in case it's got flipped then you need to flip the effect's x-axis rotation (increase pitch by 180o). But usually aura models are two-sided so getting flipped won't be noticeable.
 
Level 26
Joined
Oct 2, 2011
Messages
2,482
Did you set "open blank map on start" in preference?
That's off for me. Should it be on?
Have you restarted the editor after importing?
Yup.
Have you tried to use outland abyss?
Ye. Currently using it now.

Here I used your map.
What the fuck? :D
Did you change anything?
I thought it may have been my general Warcraft settings, but then why would it work with my other map that I open in the same editor?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The tile turned black ingame instead. Here are two examples of how it looks:
It is not black, it is transparent... You can even see the castle under the terrain through it!

The problem is with Wc3's blending mode. If there is any kind of terrain overlay, eg a ubersplat or shadow, it fails to blend the underlying terrain with the background. This is a WC3 limitation.

Look at attached screenshot showing proof that my tile works...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Here shows my tile working correctly.

It cannot blend units through terrain with overlays on the terrain. Sky boxes are probably different as they are rendered in a different order and thus blended in a different order. This is just like how you cannot see water behind water in Wc3 as it only blends the first visible surface of the water mesh, and not surfaces behind those.

Ignore the strange other stuff, that is just part of my test map. Focus only on the correctly black transparent area.

Wc3 terrain does support some alpha features, but it was not programed with alpha tile textures in mind. Outside of terrain texture blends, alpha was not really considered and as such some blend operations will be incorrect over such tiles.
 

Attachments

  • WC3ScrnShot_042217_182703_01.jpg
    WC3ScrnShot_042217_182703_01.jpg
    300.7 KB · Views: 104
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
I thought you were talking about ground texture, no? Well, Rufus doesn't seem to use any ubersplat. I think it's irrelevant to his problem. As the alpha tile works just fine for me but not for him.

It cannot blend units through terrain with overlays on them. Sky boxes are probably different as they are rendered in a different order and thus blended in a different order. This is just like how you cannot see water behind water in Wc3 as it only blends the first visible surface of the water mesh, and not surfaces behind those.
Come to think about it, sorry Rufus for being a bit off topic, if I understood it correctly it seems that if we have a platform with "additive" texture then any other platforms with "blend" textures won't be rendered (or at least they got overlaid). If it works with transparent platform, then I think we can use it to make some fancy UI (with similar effect to the pic below) for instance radar or custom scrollable minimap UI. Well this is an example but it's not using that trick of course:
full


Hehe.. I gonna test it!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I thought you were talking about ground texture, no? Well, Rufus doesn't seem to use any ubersplat. I think it's irrelevant to his problem. As the alpha tile works just fine for me but not for him.
Possibly its relying on undefined driver behaviour? Is he using a modern NVidia GPU?

My alpha tile is a 1*1 pixel 1 bit alpha (masking) index content blp. Hopes is that it compresses for only a few bytes as opposed to 7kb.
 
Level 26
Joined
Oct 2, 2011
Messages
2,482
I don't think the tile itself is the problem, as I imported it into another map, and there it worked fine. (1kb is lovely btw :D )
Hmm.. I'm curious. How about your video settings? All high (especially texture quality)? I'm not sure if it affects or not.
All set to high.

Well, my computer is currently breaking down (harddrive singing its last song), so perhaps that can play a role, but why would it owrk in a nother test map on the samme computer then?

full


Hehe.. I gonna test it!
Looking as awesome as ever! :D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
btw do you know what filtering mode is used by waters? (Sorry again Rufus : p)
I think water uses bilinear filtering with mipmaps. Zooming close to the water shows linear filtering at work, which is almost always bilinear filtering. Looking at the water from far away shows no aliasing meaning that mipmaps must be in use. Looking at the water from an oblique angle shows discontinuous bands, the result of a sudden change in mipmap level, meaning no trilinear filtering must be at work.

Ground mesh on the other hand uses bilinear filtering without mipmaps. Zooming close to ground shows linear filtering at work, which is almost always bilinear filtering. Looking at ground mesh from far away shows aliasing, meaning no mipmaps are being used.

Be aware that texture filtering and texture blending are two different concepts. Filtering is used to resample a texture in a visually accurate way. Blending is used to mix two samples together to result in a single output sample, eg a semi-transparent billboard overlaid over the ground.

(1kb is lovely btw :D )
It takes only 46 bytes inside a map archive (excluding archive file system structure overhead) due to compression. I honestly have no idea how such a file could ever have been 7 kb...
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Well, this is as closest as it can get, non-visible area can only be half transparent (can also be completely white so it acts like custom mask). Well it can be perfect if only there's a way to create & move doodads freely, but it's very unlikely wc3 will ever feature such thing.
 

Attachments

  • dsa.jpg
    dsa.jpg
    420.8 KB · Views: 74
Level 26
Joined
Oct 2, 2011
Messages
2,482
Quilnez, you are my saviour after all!
I downloaded the file you attached on another computer and checked it out. Then I noticed taht you had not replaced my "white" tile, but added another instead, not placing it on the map.
Now, when I actuually placed your tile, I saw that it had worked. Thanks a bunch for all your help! :)

Now, It is just problem 2 remaining. I'd like to make the aura unrotating, not the hero attchment. I tried following our instrctions, but there is no "root" attachment in the devotion aura, just "dummy" instead, and a few child bones. Besides, Devotion aura has many other alien elemnts that I'm not familiar with (I'm really new to modeling).
If it is easy, would you mind editing the attached model to always face one way? :)

EDIT:
Update!
The alpha tile that you provided stopped working when I moved it in the tile order! This might have been the problem all along! This only occur when the alphatile is placed first in the order.
 

Attachments

  • Sky.mdx
    2.7 KB · Views: 50
Last edited:
Status
Not open for further replies.
Top