Can't get vertices...

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.
Post Reply
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Can't get vertices...

Post by Sirius »

Hi, I'm using PyHSPlasma to load and parse a PRP.
I've never worked with it before, so I'm just running it in Python's command line for now, and learning to retrieve the data from this PRP.
I've managed to correctly load a file, get the sceneobjects, get the draw interface for this sceneobject, find the icicle in the Drawables Spans, etc. So far, everything is fine.

Now, I would like to get the vertices from one of the plGBufferGroup. So, I try to use the getVertices() command of this plGBufferGroup, and there I have a problem.

From what I see in the source file from libHSPlasma at github, getVertices() take three arguments: the vertex group Idx, the start id, and the number of vertices (count).
So, if I set start to 0, and count to any number, it returns me every vertices from (start) until (end - count). Isn't this supposed to return vertices from (start) to (start+count) ? (at least that's what I believe when looking at the source file)
And if I try to set start to any non-null value, then the console prints something like "This application has requested the Runtime to end it in an unusual way" and crashes. I tried with two different PRPs but both crashes.

I believe I am doing something wrong, but can't figure out what...
Could someone help me ? Thanks in advance.
Stucuk
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Can't get vertices...

Post by Stucuk »

I can't comment on PyHSPlasma but your likely going to want every vertex as you will need to use the index list/buffer/whatever to work out how to render the geometry.
Image
-Stu
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Can't get vertices...

Post by Sirius »

And that's exactly what I did since I needed to store vertices in a group of three for each face :) I wasn't yet sure about how I was going to get all the data, and having a function that might crash the script bothered me. Still, it works fine now, it just uses more memory since I am loading vertices I won't use.

Thanks for your reply !
User avatar
Branan
Gehn Shard Admin
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
MOULa KI#: 66990
Location: Portland, OR

Re: Can't get vertices...

Post by Branan »

Could you file this in the issue tracker for libHSPlasma please? https://github.com/H-uru/libhsplasma/issues/new
Image
Your friendly neighborhood shard admin
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Can't get vertices...

Post by Sirius »

Ok, I added it here.
Post Reply

Return to “Plasma Development”