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.

Can't get vertices...

Postby Sirius » Sun Aug 19, 2012 9:49 am

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.
User avatar
Sirius
 
Posts: 1224
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Can't get vertices...

Postby Stucuk » Sun Aug 26, 2012 6:39 pm

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
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Can't get vertices...

Postby Sirius » Mon Aug 27, 2012 2:10 am

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
Sirius
 
Posts: 1224
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Can't get vertices...

Postby Branan » Fri Aug 31, 2012 7:14 am

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
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Can't get vertices...

Postby Sirius » Sat Sep 01, 2012 9:15 am

Ok, I added it here.
User avatar
Sirius
 
Posts: 1224
Joined: Mon Jul 26, 2010 4:46 am
Location: France


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron