Getting libHSPlasma and PlasmaShop

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.

Re: Getting libHSPlasma and PlasmaShop

Postby diafero » Thu Jul 21, 2011 8:46 am

Btw, prpmod uses the same code to read Plasma objects as PrpShop ;-)
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: 2970
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Getting libHSPlasma and PlasmaShop

Postby tachzusamm » Mon Jul 15, 2013 2:07 pm

Okay, I would like to have a problem :)

I tried to use VisRegions with objects on other pages than the default mainRoom 0; I exported with PyPRP1. It did not work in the game, the object keeps appearing invisible.

So I thought it would be a good idea to use PlasmaShop (3.0 beta, build 229) to have a look what's wrong.
Unfortunately, when I try to view what's in the [0088] Soft Volume Simple on that second page (its "District_Hedges" in the example below) which belongs to the VisRegion "VisReg_Hedges1" in [0116] Vis Region, PrpShop (build 210) just crashes. Even selecting "Edit PRC" instead of "Edit" does not help.

It opens well the Soft Volume Simple entires on the first page (District_mainRoom), and it also opens any Soft Volume in any page in Cyan's Worlds.

No idea what's wrong, but I'm wondering why PrpShop crashes. Because of unexpected data maybe?

http://www.texturu.org/share/Ages/DummyTestAge.zip


(In PlasmaShop 2 / PrpTool, that mentionend Soft Volume data looks much shorter than normally - like some data is missing. But I don't understand those HEX values. I can't even read them. Do I miss a needed Font, by the way?)
Image
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Getting libHSPlasma and PlasmaShop

Postby Zrax » Mon Jul 15, 2013 7:21 pm

Hmm, I do remember that PRPTool bug, but sadly I don't remember what caused it or how to fix it...

On the other hand, I looked at the PRPs, and I see two issues with it:
- The owner key is null. This is odd, but it shouldn't crash PrpShop
- The plVolumeIsect creatable embedded in the soft volume is null. This will definitely crash PrpShop when trying to write the PRC out. I'll make a change to libhsplasma to not attempt to write dereference a null volume

While I fix that, I would suggest that one or both of the above might be the cause of your Plasma issue as well.

EDIT: The latest version (r233) contains a fix for the null volume (as well as several other things that have been fixed/added since the last time I built a release).
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Getting libHSPlasma and PlasmaShop

Postby tachzusamm » Tue Jul 16, 2013 3:27 am

Thanks a lot, that helped - PrpShop does not crash any longer.

Now I was able to track it down, and you were right with the two issues you mentioned.
For some reason, PyPRP1 did export a correct version of the said soft volume in District_mainRoom. So I copied that version over to that in District_Hedges - I had to adapt the 0's to 1's where it says ' Location="9872;0" ', because it's in page 1 now instead of 0 - and it worked pretty well in the Age.

(I'm a bit unsure what I should do with ObjID="1" though. Are ObjIDs usually numbered per page or per age?)

Now I'm wondering where I should start in PyPRP1 code to find where the part of the code is that causes the softvolume to export in the wrong page...
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Getting libHSPlasma and PlasmaShop

Postby Sirius » Tue Jul 16, 2013 4:17 am

ObjIDs are used in MOUL/Myst V. You can safely ignore them on CC.
IIRC, later versions of Plasma identify each object by a number. Complete Chronicles' version of Plasma identifies each object... by its name. Which explains why loading times are 20x longer on Uru.


As for the error...
It seems PyPRP creates the visreg "VisReg_Hedges1" in the wrong PRP. It should be in mainRoom (since the corresponding softvolume is there), but the plVisRegion is in the Hedges PRP.

It might come from here: prp_DrawClasses.py, around line1958:
Code: Select all
propString = FindInDict(objscript,"visual.visregions", [])
if type(propString) == list:
    for reg in propString:
        if (reg != None):
            if(softVolParser != None and softVolParser.isStringProperty(str(reg))):
                volume = softVolParser.parseProperty(str(reg),str(self.Key.name))
            else:
                refparser = ScriptRefParser(self.getRoot(),str(self.Key.name),"softvolume")
                volume = refparser.MixedRef_FindCreateRef(reg)
            vr = root.find(0x0116, volume.Key.name, 1)
            vr.data.scenenode=SceneNodeRef
            vr.data.BitFlags.clear()
            vr.data.BitFlags.SetBit(plVisRegion.VecFlags["kReplaceNormal"])
            vr.data.fRegion = volume
            self.fRegions.append(vr.data.getRef())

vr = root.find(0x0116, volume.Key.name, 1) looks for a visregion in the same PRP as the object. Since it doesn't find one, the last argument with value 1 means "create it if it isn't found". So the visregion is created in the second PRP, although the SoftVolumeSimple is located in the first.
Then, either
volume = softVolParser.parseProperty(str(reg),str(self.Key.name))
or
volume = refparser.MixedRef_FindCreateRef(reg)
does the same thing: look for the soft volume with the name you gave in the same PRP as the object, and since it cannot find it, it creates one... probably empty, which crashes Uru.
User avatar
Sirius
 
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Getting libHSPlasma and PlasmaShop

Postby tachzusamm » Tue Jul 16, 2013 6:19 am

It's more like the other way around.

VisReg_Hedges1 has taken it into the correct PRP, because the objects that belong to it are put in that page.
Only the belonging softvolume keeps stuck in the first PRP, while a copy of it with zero content makes it into the second PRP.
(It seems the VisReg made it automatically to the second PRP.)
I'm sure I already tried to force putting that VisRegion into page 1 by assigning page_num=1 to it, which did not work. All belonging objects disappeared.
I tried again, which seems to work now. Don't ask why, I don't know.

Let's assume this as solved for now - until I come up with issues again. :P
(oh, and by the way: URU did not crash. I just behaved strange in showing objects.)
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Getting libHSPlasma and PlasmaShop

Postby Ehren » Fri Aug 29, 2014 9:36 pm

When using prcdc.exe to decompile certain textures, I get this error:

"Wrong JPEG library version: library is 90, caller expects 80"

Does anyone know how to fix this? I'm finding this libJPEG stuff confusing...
User avatar
Ehren
 
Posts: 272
Joined: Fri Nov 16, 2007 9:45 pm
Location: Planet X

Re: Getting libHSPlasma and PlasmaShop

Postby Mystler » Sun Aug 31, 2014 5:09 am

Your prcdc wants to use jpeg-8 but finds jpeg-9. This *should* not be a problem, but it looks like it is and should be fixed. Where did you get your copy from? If it is using some libjpeg or jpeg DLL you can try to replace it with a DLL of version 8.

If all you want is to extract a texture image, you can use the latest version of PlasmaShop. I added a "Save As..." link to the texture preview that allows you to export to formats like JPG, PNG, TIFF and BMP. I'm not sure whether Zrax released that version yet, but you can use my download here. The prcdc in there might also work.
User avatar
Mystler
 
Posts: 116
Joined: Sun Mar 22, 2009 4:55 am
Location: Germany

Re: Getting libHSPlasma and PlasmaShop

Postby DatokerJ » Fri Nov 20, 2015 7:41 am

Anyone have a link to a build newer then the command line tools "Plasma_r972.zip - Aug 8, 2014"? or plasmashop "Setup-PS30-Beta-r237.exe - Aug 8, 2014"

Could you post a link if you have one TY in Adv.
DatokerJ
 
Posts: 22
Joined: Thu Jun 26, 2008 5:59 am

Re: Getting libHSPlasma and PlasmaShop

Postby Deledrius » Mon Dec 28, 2015 3:50 pm

You can find the newest releases on the project's Github wiki. Those builds are unfortunately a bit behind at the moment, and we should schedule a new tag and release soon.

User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 1 guest