Page 1 of 1

Broken Softvolumes?

PostPosted: Wed Jan 28, 2009 5:49 am
by GPNMilano
Forgive me, but I think that soft volumes might be broken (in either my version of PyPRP which I doubt, since I've never gone near the soft volume code) or in 1.5

Basic break down. I was having difficulties making soft volumes. So I made a simple one, just a single plane. Exported it, and noticed that, according to libPlasma, the soft volume has a single plane, confined to a single vertex in space, that is no where near where I put the plane's object center in blender, and instead is at one of the corner vertexes of the plane.

I double checked that my scale and rotation were correct, and exported again, no result. Is this right? Should a single plane soft volume just be confined to a single vertex in space once its exported?

Re: Broken Softvolumes?

PostPosted: Wed Jan 28, 2009 6:06 am
by Christian Walther
This sounds correct to me. I don't remember the details, but off the top of my head: Soft volumes are not stored as meshes, but as sets of planes (real planes, infinite ones, not the quads Blender calls "planes"). A plane is given by a point on the plane and a normal. For the point, PyPRP uses one of the vertices of the face, as you observed.

Also, according to my wiki article, export of soft volumes with scale and rotation was broken in PyPRP 1.5 (but I think I fixed that in a later version). To be sure, apply the scale/rotation before exporting.

Did you actually test the soft volume in Uru or did you just examine the exported PRP? As far as I can see, my own soft volumes, exported with my experimental PyPRP branch (which is up to date with respect to the trunk as of not too long ago), still work as expected. (One thing I noticed is that the effect of lamp soft volumes on the avatar shadow has changed at some point, it no longer appears and disappears abruptly as described in the article. I haven't investigated in detail yet what caused the change, and updated the article accordingly.)

Re: Broken Softvolumes?

PostPosted: Wed Jan 28, 2009 11:37 am
by D'Lanor
I have recently exported Prad and my soft volumes still work. They are simple soft volumes, planes that divide space into 2 half spaces. Since soft volumes of this type do not need scaling I did not use any on the small planes. I used this alcscript:

Code: Select all
Lamp02SoftVol:
    type: softvolume
    softvolume:
        type: convex
        softdist: 2.0
        instrength: 0.8
        outstrength: 0.0

Lamp02:
    lamp:
        softvolume: Lamp02SoftVol

Lamp05SoftVol:
    type: softvolume
    softvolume:
        type: convex
        softdist: 0.0

Lamp05:
    lamp:
        softvolume: Lamp05SoftVol

Re: Broken Softvolumes?

PostPosted: Wed Jan 28, 2009 2:56 pm
by Nadnerb
Yes, this behavior is correct. SoftVolumes are defined as a collection of planes. They are always transformed to world space, and stored as a point and normal, and some other parameters, such as the smallest distance from the plane to the object center. The "point on plane" is (in the current export routine (which I wrote, and CW corrected for some transform cases)) the first vert in the face.

Your SoftVolumes should work as expected in Uru if you test them. (Intersection tests are done against the object centers of each of the avatar's connected parts, so in the case of a light SoftVol, the pants or shirt may change first, if you pass through the boundary vertically. Also, SoftVols affecting sounds will be tested from the camera position, so keep this in mind.)

The SoftDist parameter describes the size of the "soft area" around the volume, in which the effects of the volume will be interpolated between the inside value and the outside value. The reason for the lack of abrupt change that CW noted is that SoftVols now have a non-zero default SoftDist, so their effects will change gradually as you approach the boundary.

Re: Broken Softvolumes?

PostPosted: Wed Jan 28, 2009 4:15 pm
by GPNMilano
Thanks for the info guys. Guess I'll have to figure this out by just some experimenting. I want to confine my KI and Nexus gear sounds
Show Spoiler
to a soft volume. So I just wanted to make sure they were behaving normally. Now that i know they are I just got to figure out the right placement of the soft volume, and than how I want to make the intersects and unions work with it.

Re: Broken Softvolumes?

PostPosted: Thu Jan 29, 2009 4:55 am
by diafero
the offline ki that's now tied to Drizzle
Just a small correction, it is not tied to Drizzle - they are closely related, but you can perfectly well download the Offline KI from http://diafero.bplaced.net/ and install it without ever using Drizzle. It's just more complete with Drizzle, because that is required to convert MOUL, Myst V and Crowthistle. With Drizzle you can also download fan-ages, but ULM can also be used for that, or you download and install them manually.