Passindex not working

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Passindex not working

Postby Justintime9 » Wed Dec 02, 2009 1:21 pm

In my age I have a vast ocean (waveset) with lamps with sprites, and windows with Alpha. Now, When I set the passindex of the window higher than that of the water, it does not change the object under the waveset from bleeding through. I wasn't sure if it had to be higher or lower, so I tried both, but both times it did nothing. The same goes for my sprites. Is it something to do with such a large alpha object? (the waveset reaching to the horizon) Is there some other way to fix this problem?
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Passindex not working

Postby Jojon » Wed Dec 02, 2009 1:48 pm

Try giving your windows this alcscript:

Code: Select all
[ObjectName]:
   visual:
       renderlevel:
           major:
             - late
           minor:
             - blend


Refer to http://www.guildofwriters.com/wiki/Mana ... nt_Objects

Wavesets, apparently, are (by default) exported as late/opaque/passindex (8,0,passindex) (or something close :7).
If you have no render levels defined for other objects (including by having the "Transp" button, mentioned in the article, ticked), such as your windows, I assume they will be opaque/opaque/passindex (0, 0, passindex), which is an earlier drawpass.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Passindex not working

Postby Justintime9 » Wed Dec 02, 2009 4:40 pm

Ok, I put that script in for my window, and it worked! I can see the water correctly through it. There's one major side effect though: you see, my window is animated (e.g you press a button, and it opens/closes). When I put in the script the animation ceases to work :P When I take it out it works again.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Passindex not working

Postby D'Lanor » Thu Dec 03, 2009 12:54 am

The "visual" section of the Alcscript should not affect the animation. So I am guessing there is an indentation error. Try correcting that first. Failing that try swapping the order of your Alcscript sections.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Passindex not working

Postby Jojon » Thu Dec 03, 2009 1:09 am

There should only be one alcscript entry for each object. If there is more than one, the one that appears first in the script will not be used.

You need to add the "visual" attributes to the script you already have for the object:

Code: Select all
<YeOldeWindow>:
    visual:
        renderlevel:
            major:
              - late
            minor:
              - blend
        other_visual_properties_goes_here...
    animations:
      - etc, etc...


I also notice there were only three spaces before "visual" in the alcscript snippet I pasted in my first reply. That could throw the YAML parser, if you had already merged the script pieces.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Passindex not working

Postby Justintime9 » Thu Dec 03, 2009 4:58 am

Awesome, that worked like a charm :D
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Passindex not working

Postby D'Lanor » Thu Dec 03, 2009 5:07 am

Jojon wrote:There should only be one alcscript entry for each object. If there is more than one, the one that appears first in the script will not be used.

Good catch. That was just too obvious for me. But I guess it needs to be mentioned in the wiki somewhere.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Passindex not working

Postby Justintime9 » Thu Dec 03, 2009 12:39 pm

Yeah, I think there's a bit of a problem in the fact that the people who have been working with URU for years and understand Python and AlcScript thoroughly are so used to it that it can be hard to remember that there are people who have only learned how to make an age through the Wiki tutorials, without which they wouldn't be able to make an age.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am


Return to Building

Who is online

Users browsing this forum: No registered users and 1 guest