Soft Volume trouble

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!

Soft Volume trouble

Postby Justintime9 » Thu Jul 16, 2009 8:55 am

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 :P 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?
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Soft Volume trouble

Postby D'Lanor » Thu Jul 16, 2009 12:28 pm

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
"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: Soft Volume trouble

Postby Justintime9 » Thu Jul 16, 2009 12:58 pm

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 :P I made sure the lamps involved were actors, and they all are.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Soft Volume trouble

Postby Christian Walther » Fri Jul 17, 2009 2:11 pm

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?
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Soft Volume trouble

Postby D'Lanor » Sat Jul 18, 2009 2:12 am

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
"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: Soft Volume trouble

Postby Justintime9 » Sat Jul 18, 2009 4:28 am

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.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Soft Volume trouble

Postby D'Lanor » Sat Jul 18, 2009 5:44 am

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.
"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: Soft Volume trouble

Postby Christian Walther » Sat Jul 18, 2009 7:12 am

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.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Soft Volume trouble

Postby Justintime9 » Sat Jul 18, 2009 8:07 am

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.
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 7 guests

cron