Waveset defaults

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Waveset defaults

Postby diafero » Mon Aug 31, 2009 12:20 pm

There are still a lot of ages out there with faulty wavesets that don't display correctly when I use wine, and people with old graphics cards have the same issue. The latest example is Crater Concept. As far as I know (but I'm not an expert on this area) the age writer has to set some "geostate" options for that to be fixed. Is there any plan to make these geostate options the default in PyPRP so that even if the age writer does not notice the problem because he is on a better machine, the issue is fixed? Maybe this has already happened, which would be even better :D
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Waveset defaults

Postby D'Lanor » Mon Aug 31, 2009 3:59 pm

The defaults are still 0. The problem is finding good defaults since the geostate settings are affected by the texstate settings.

If for example we would use the geostate settings which Cyan uses for both the lake and the water garden in the neighborhood as defaults, this would make a small puddle look as if there was a herd of elephants splashing around in it. See this video to see what I mean. That video shows the effect of geostate very well because it is so exaggerated.

The geostate defaults probably have to be calculated from the texstate settings.

Edit: I seem to be getting decent results with the following calculation but this definitely needs more testing.

Code: Select all
        texstate = self.fState.fTexState
        texstate.fMaxLength = FindInDict(objscript,'visual.waveset.texstate.maxlen',6.25)
        texstate.fMinLength = FindInDict(objscript,'visual.waveset.texstate.minlen',0.78125)
        texstate.fAmpOverLen = FindInDict(objscript,'visual.waveset.texstate.ampoverlen',0.013)
        texstate.fChop = FindInDict(objscript,'visual.waveset.texstate.chop',0.5)
        texstate.fAngleDev = FindInDict(objscript,'visual.waveset.texstate.angledev',1.00356)
        geostate = self.fState.fGeoState
        geostate.fMaxLength = FindInDict(objscript,'visual.waveset.geostate.maxlen',texstate.fMaxLength)
        geostate.fMinLength = FindInDict(objscript,'visual.waveset.geostate.minlen',texstate.fMinLength)
        geostate.fAmpOverLen = FindInDict(objscript,'visual.waveset.geostate.ampoverlen',texstate.fAmpOverLen/10)
        geostate.fChop = FindInDict(objscript,'visual.waveset.geostate.chop',0.0)
        geostate.fAngleDev = FindInDict(objscript,'visual.waveset.geostate.angledev',texstate.fAngleDev)


Edit 2: and here is a test file for those who want to try this out. It replaces prp_MatClasses from the PyPRP 1.6.0 beta 1 and should be used with that version.

prp_MatClasses.zip
(22.35 KiB) Downloaded 124 times
"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: Waveset defaults

Postby Christian Walther » Thu Sep 03, 2009 11:44 am

I'm just speculating here, never having used wavesets myself (and while I have read the GPU Gems article about them once, that was a while back)...

Comparing your modified file with the original, it appears that the troublesome defaults are the following:
Code: Select all
visual.waveset.geostate.maxlen = 0.0
visual.waveset.geostate.minlen = 0.0
visual.waveset.geostate.ampoverlen = 0.0
visual.waveset.geostate.angledev = 0.0

Has any research been done about which of these zeros causes the trouble described by diafero?

I would expect that setting an amplitude to zero is fine, but setting a wavelength to zero invites all kinds of division-by-zero errors.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Waveset defaults

Postby D'Lanor » Thu Sep 03, 2009 3:40 pm

Those four settings work together. If you use one you should also set the other three. So in the end it does not really matter which one them is the culprit.

I copied 3 of these texstate settings to their geostate counterparts. That seems to be the only way to avoid any "wild" geostate effects. The division by 10 for ampoverlen is done to minimize the default geostate effect even further because it easily grows too strong.

I have tested my suggested modification for several settings and until now it has always resulted in a subtle geostate effect (unless the texstate settings were already way over the top to begin with). Using all of the waveset defaults results in a barely noticeable geostate, which is what I was aiming for.

Still I would like to see some test results from others as well.

btw, I have an old pc which is affected by the lack of geostate so I can positively confirm that this cures the problem and that chop can remain at default 0.


Edit: Looking at Er'cana which is the only Cyan age which is missing wavesets on my old pc, it appears that it is the ampoverlen setting at 0 that causes the problem (for a long time I had no clue what exactly I was draining in Er'cana :roll: ).
"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: Waveset defaults

Postby Chacal » Thu Sep 03, 2009 4:52 pm

Christian Walther wrote:I'm just speculating here


Rise and shine!
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Waveset defaults

Postby diafero » Fri Sep 04, 2009 5:49 am

Yes, I do have the Er'cana waveset issues, too - it just completely disappears there. I also have waveset issues in Gira though, where the waveset plane is visible, but it doesn't actually wave, it's just a static half-transparent blue plane...
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Waveset defaults

Postby D'Lanor » Tue Sep 08, 2009 3:52 am

Hmm, only two downloads. I don't think we will get enough test results this way. If you want to help testing but are reluctant to install the script please modify your waveset as follows.

If you did not use texstate settings:
Code: Select all
            geostate:
                maxlen: 6.25
                minlen: 0.78125
                ampoverlen: 0.0013
                chop: 0.0
                angledev: 1.00356

If you defined your own texstate settings:
Code: Select all
            geostate:
                maxlen: <same as texstate>
                minlen: <same as texstate>
                ampoverlen: <texstate divided by 10>
                chop: 0.0
                angledev: <same as texstate>

This replicates the geostate effect from the test script and your waveset should now move up and down very slightly. This will be mostly visible at the edges.

Edit: Request duplicated in the Builders forum which is read by more people.
"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


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests