Page 1 of 1
Soft Volume trouble

Posted:
Thu Jul 16, 2009 8:55 am
by Justintime9
I just added a softvolume region and script to my age. Unfortunately, it only half works: the avatar is no longer affected by lights outside of the softvolume, but for some reason, it isn't affected by the lamps
inside the softvolume, so the avi appears all black

here's my AlcScript:
- Code: Select all
Hemi1:
lamp:
softvolume: "!(OfficeSV)"
Hemi2:
lamp:
softvolume: "!(OfficeSV)"
Hemi3:
lamp:
softvolume: "!(OfficeSV)"
Hemi4:
lamp:
softvolume: "!(OfficeSV)"
Hemi5:
lamp:
softvolume: "!(OfficeSV)"
HemiBR:
lamp:
softvolume: "!(OfficeSV)"
OfficeL1:
lamp:
softvolume: OfficeSV
OfficeL2:
lamp:
softvolume: OfficeSV
The Hemi#s are the outside lamps, and the "OfficeL#"s are the lamps inside the Softvolume cube, that should affect the avatar in URU. I made the softvolume by going to Scripts > PyPRP > Sofvolumes > Softvolume Cube.
Anyone know what I did wrong?
Re: Soft Volume trouble

Posted:
Thu Jul 16, 2009 12:28 pm
by D'Lanor
Did you add the AlcScript for the soft volume itself? Something like this:
- Code: Select all
OfficeSV:
type: softvolume
softvolume:
type: convex
softdist: 2.0
Re: Soft Volume trouble

Posted:
Thu Jul 16, 2009 12:58 pm
by Justintime9
Ah, that must be it,I probably missed it, because when I'm not completely familiar with a certain AlcScript and settings for an age, I go back to an age I've done it before; copy and paste the alcScript, and change the appropriate variables. Aparently I forgot to copy that one.
Edit: that still didn't fix it

I made sure the lamps involved were actors, and they all are.
Re: Soft Volume trouble

Posted:
Fri Jul 17, 2009 2:11 pm
by Christian Walther
You don't need the AlcScript for the soft volume if it's marked with a logic property type = softvolume and you're fine with the default settings (instrength 1, outstrength 0, softdist 5).
I'm not sure if I understand you correctly, Justin - are you saying that only the Office lamps work correctly and the Hemi ones don't (i.e. avatar is illuminated when inside of the volume but not when outside), or that none at all work (avatar is never illuminated)? I'm confused by your expression "lights outside of the softvolume", because the location of the lights doesn't matter, it's the location of the avatar that matters.
I can't see anything obviously wrong with your script, I suspect the problem lies in the volume itself. Do the normals point inwards (they should if you didn't modify them after making the volume using the script)? Is it on the same page as the lamps?
Re: Soft Volume trouble

Posted:
Sat Jul 18, 2009 2:12 am
by D'Lanor
Christian Walther wrote:You don't need the AlcScript for the soft volume if it's marked with a logic property type = softvolume
Which a soft volume does NOT get when you add it from the menu... By default it only receives: type = svconvex
Re: Soft Volume trouble

Posted:
Sat Jul 18, 2009 4:28 am
by Justintime9
The normals are pointed inwards. My problem is that when the avatar is outside of my office (the room with the softvolume), it is effected by the Hemi lamps, as it should be. However, when the avatar enters the softvolume, it is completely black, and not effected by the lamps that are supposed to effect it when it's in the softvolume cube.
Re: Soft Volume trouble

Posted:
Sat Jul 18, 2009 5:44 am
by D'Lanor
It may just be a problem with the settings of the office lamps. Do they cast light on the avatar without the soft volume applied? As Christian already said, there is nothing wrong with your Alcscript. I have an identical setup in one of my test ages which works fine.
Re: Soft Volume trouble

Posted:
Sat Jul 18, 2009 7:12 am
by Christian Walther
D'Lanor wrote:Christian Walther wrote:You don't need the AlcScript for the soft volume if it's marked with a logic property type = softvolume
Which a soft volume does NOT get when you add it from the menu... By default it only receives: type = svconvex
That's the same thing.
softvolume seems to be the newer, preferred value, introduced in r41, with
svconvex accepted again for backwards compatibility since r55. Perhaps that menu script should be updated to avoid confusion.
Justin, have you tried removing all of your lamps except one Office one and one Hemi one? 8 lamps seems like a lot to me, I don't know if current hardware even supports more than that (it's the minimum required by OpenGL). If you have any other lamps around affecting the avatar in that region it may be that the last ones just drop off the list. I don't know how Plasma allocates the D3D lights, but I could imagine that scene lamps that are just set to intensity 0 by a soft volume don't actually free up their D3D slots.
Re: Soft Volume trouble

Posted:
Sat Jul 18, 2009 8:07 am
by Justintime9
Apparently something was wrong with my lamps, because I deleted them, then created two more. I wasn't sure if they had to be actors or not, so I set one to actor, and the other not, as a test. I linked in, entered my office, and saw that both the lamps work, the one that's an actor, and the one that's not, so I'm assuming that setting it as an actor does absolutely nothing, and there was something wrong with my previous lamps that made them not work.
There's still one problem though: as my avatar is walking away from my two lamps, to the door at the far end, when there's about a meter's distance to the door, it suddenly turns black again, not gradually , as it should be in a room with only two lamps; suddenly, like someone walking into a dark room. I assume this has something to do with distance, but I don't know how, or what to set it to, to get it right.