Visual pop when walls fade out

Posted By: TheStonerunner

Visual pop when walls fade out - 09/14/07 09:32

I'm using a modified version of the smart_walls action. The roof that I'm fading in and out has several pieces, but all are combined on one mesh. When the walls start to go invisible, one piece stays fully visible until everything else is almost as transparent as it will get, and vice versa on reappearing. The code is as follows:

action smart_walls
{
while (1)
{
if (vec_dist (my.x, camera.x) < 220) // play with this value
{
if (my.TRANSLUCENT == OFF)
{

my.TRANSLUCENT = ON;
my.alpha = 100;
while (my.alpha > 20)
{
my.alpha -= 10 * time;
wait(1);
}
}
}
else
{
if (my.TRANSLUCENT == ON)
{
while (my.alpha < 100)
{
my.alpha += 10 * time;
wait(1);
}
my.TRANSLUCENT = OFF;
}
}
wait (1);
}
}
Posted By: George

Re: Visual pop when walls fade out - 09/14/07 14:26

Please give me more information:
1) Where did you get the smart_walls action from?
2) What is the building code supposed to do?
Posted By: TheStonerunner

Re: Visual pop when walls fade out - 09/17/07 07:30

I got the Smart walls from an old AUM, I am not sure where, but all it did was turn invisible on and off. I think it's an issue with my video drivers, not the code, because models with an alpha channel have z-fighting issues, the same as in Maya with models there who have an alpha texture in their channel.

Now that that's solved, any idea how to fix the alpha problem?

Thank you George for such an immensely useful newsletter. Between the documentation and AUM I'm able to do anything I can imagine.
Posted By: TheStonerunner

Re: Visual pop when walls fade out - 09/18/07 08:47

Ah, figured it out. :-) It was a normals issue. Some of the models were partially flipped (made from pieces and some were also used in a Source level). That seems to confuse A7 for the whole level, since it doesn't know which normals face the same way.
Posted By: George

Re: Visual pop when walls fade out - 09/18/07 10:36

It's good to hear that you've got it to work; I had similar problems years ago but since the models were humans it was easy to find the problem.
Posted By: TheStonerunner

Re: Visual pop when walls fade out - 09/21/07 04:26

Yeah, I imagine it's easier with something like that. With this, what tipped me off was that there were other things that worked fine, and one person made the models that were flipping out.

Thank you again for the AUM. That has made my life a lot easier, and kept me from re-inventing the wheel. I'm able to fulfill dreams, both my own and those of others, with what I have learned here.
© 2024 lite-C Forums