| 02-17-2006, 05:06 AM | #1 |
So I've been trying to make a model of a square that must be displayed on top of everything all the time (kind of like have a window stay on top in your desktop). The image API 'topmost' type didn't work so I used a model editor and the model of square to try to figure it out. So basically I tried this 'NoDepthTest' option for the only material layer that was present and tested it on WC3. The results seemed encouraging. The problem was that the squares weren't displaying on top of some units but after doing a few tests I realized that I had to make a building out of each unit model in order to 'load' (it doesn't really mean anything but w/e) them and be able to appear below the square everytime (basically I noticed that preplaced buildings were working). =[ I don't know if I was clear enough so my question in short is if there is a safe method to do this or if I was missing something when I tried to do this. Right now this trick doesn't really seem to be perfect and I'm clueless at what to do next :p. Thanks in advance for your help! EDIT: I'm actually not sure if I posted this in the right forum, I suppose this is a model editing issue, but it might aswell go in general development since it can involve methods related to the editor or a way to make the image API display topmost pictures >.<. |
| 02-17-2006, 02:59 PM | #2 |
In my limited experience, NoDepthTest is involved in making skyboxes always appear *behind* stuff, but I've never properly looked at it. Far as I know, you're on your own here. But if you keep testing, do please post your results! |
| 02-17-2006, 03:23 PM | #3 |
Hmm, a few things I have noticed is that the square will always display on top if you put a team color texture above it but usually below of any other texture. Basically if I don't try to do the trick I've stated above the model would compleetly act randomly and would make it useless for most consistent map making needs. And that's because I found a few exceptions: there was this ballista model (from both RoC/TFT) that had its team color texture being displaying on top of the square everytime... after checking the model I noticed that the team color layer had a blend filter instead of none =|. |
| 02-17-2006, 03:25 PM | #4 |
Aye, the Blend filter is a mite weird. Only works when you've got more than one layer, in my experience, although it rarely cares when the layer beneath has an alpha of 0... |
| 02-17-2006, 03:33 PM | #5 |
For the record, I tried that trick with two layers (one invisible) for blend: it doesn't work. And there is even supposed to be a command - sortprimsfarZ or something, used in the banshee model - to fix the rendering sequence. But that doesn't work too. Stupid blizzard. |
| 02-17-2006, 03:40 PM | #6 |
Hehe, I have tried removing the building load but for some reason the effect continues to work, which prooves the randomness of this effect. Also, if you put a model with an alpha non set to 255 above it (in this case I used permanent invisibility alpha modification you get weird results. I've attached a few example of what I get: EDIT: @Nasrudin: Yea I tried to do that when I wanted to add a team color to the square model. It didn't work at all with two layers =[. |
| 02-17-2006, 04:43 PM | #7 |
NoDepthTest in 3d rendering means ignoring Z position, but in w3 - ? |
| 02-17-2006, 05:10 PM | #8 |
Well you can check the pictures I attached to my previous post, they show that the model is rendered on top everytime, thus nodepthtest seems to ignore anything else placed between the camera and the object :p. EDIT: Btw, what does 'camera anchored' mean ? |
| 02-17-2006, 05:42 PM | #9 |
It must be that NoDepthTest in conjunction with NoDepthSet makes things appear always behind, then, for the skyboxes. Interesting. Camera anchored... Sounds interesting, whatever it may be. Perhaps it makes the object always stay attached to the camera target point? |
| 02-17-2006, 05:56 PM | #10 | |
Quote:
That was directed to RDZ, regarding a matter we were discussing some time ago. About your problem, I may be wrong, but I guess you can use a simple billboarded plane, and then attach it to the "overhead" of the unit with the sphere ability. |
| 02-17-2006, 06:26 PM | #11 |
That may be the best way of going about it. However, knowing how to always make stuff be on top would be mighty useful for nuclear explosive effects; for creating a massive glow that isn't have underground. |
