Where are the Vertices? + DelURU Development

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.

Where are the Vertices? + DelURU Development

Postby Stucuk » Fri Aug 05, 2011 11:29 am

Could someone tell me which "Class" from a PRP contains the vertices? The plSpans don't seem to contain any vertex information....
Last edited by Stucuk on Sat Jun 02, 2012 1:51 am, edited 1 time in total.
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Where are the Vertices?

Postby Branan » Fri Aug 05, 2011 3:36 pm

vertex data is in plDrawableSpans. They're stupidly complicated, if you need a bit more help figuring them out let us know.

EDIT: Technically, it's in plGBufferGroup, but you need the information from the Icicles (a subclass of plSpan) in order to be able to use them. plDrawableSpans is the overall container class for drawable data.
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: Where are the Vertices?

Postby Stucuk » Fri Aug 05, 2011 4:18 pm

I was hoping you weren't going to say they were hidden in there. I wish Cyan made class/variable names more descriptive, i would never have guessed that class would contain vertex information based on its name. Thanks for the information, i will try and see if i can work it out.
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Where are the Vertices?

Postby Branan » Fri Aug 05, 2011 8:15 pm

I may make a blog post about DSpans in the near future - I've been trying to think of a bit of Plasma I can write a technical post on, and DSpans are both self-contained and typically need some explanation before people figure them out.

I'll post a link here when/if that post gets finished.
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: Where are the Vertices?

Postby Stucuk » Fri Aug 05, 2011 11:34 pm

Is the fParticleSpans related code* in plDrawableSpans::Read redundant? The only thing which seems to add to it is linked to plParticleSystem::ICheckDrawInterface** which seems(Based on my proberly flawed understanding of the code) to be only called before/during rendering and after an age has loaded, both of which should be after plDrawableSpans::Read has been called.....


*
plDrawableSpans::Read Show Spoiler

** plParticleSpan *plDrawableSpans::ICreateParticleIcicle is the bit which adds to fParticleSpans but ICheckDrawInterface is the highest "level" procedure i could find.

P.S I look forward to reading your post when/if it is posted.
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Where are the Vertices?

Postby Stucuk » Tue May 15, 2012 9:27 am

Image

Made some progress, currently its just rendering the Vertex's (I haven't written code to load materials/layers). Seems to be rendering correctly, though i haven't been able to work out what matrix your meant to apply(Im guessing its something to do with the Coordinate Interface's).
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Where are the Vertices?

Postby Sirius » Tue May 15, 2012 11:37 am

Wow, nice !!

I worked a bit on Drawable Spans too, and they are not easy at all to read (ok, it is not supposed to be read by anything else than plasma itself, but still...).
Extracting any object from them is a real pain (that's what I was trying to do, before Dustin made his distillation tool available in the command line of Drizzle).
Before we get a better post about it from Branan, you might want to check these forums - there are some useful infos in them.
Here and here.
Have fun messing with it :P .
User avatar
Sirius
 
Posts: 957
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Where are the Vertices?

Postby Stucuk » Wed May 16, 2012 7:26 pm

Thanks for the links. I thought the space tree would be a type of Potential Visibility Set(Currently im not actually loading it, skipped onto the rendering :P).

Image Image

Implemented Layer + Material loading code as well as basic rendering of them(Very basic as it only uses the first layer of a material and ignores all its flags). Im cheating when it comes to Transparency by using GL_SAMPLE_ALPHA_TO_COVERAGE_ARB so i don't have to sort the vertex's(Though the transparency is not as nice).

Note: The transparent red bits are layers which are not pllayers(pllayers is the only type it can load currently).
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Re: Where are the Vertices?

Postby Branan » Wed May 16, 2012 9:55 pm

A bit more info on the spacetree: It's implemented as a BVH, which is fairly simple to build/traverse but not as efficient as the BSPs and octrees that most other engines use. The PlasmaClient code is probably a good example of how to use it. I'm not sure I ever put that code on github, but it's still on Zrax's server

One thing to keep in mind is that if you implement kickables or animations, you'll need to rebuild the spacetree as objects move around. I never implemented this in PlasmaClient, so your only reference for how to do that is going to be CWE itself.
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: Where are the Vertices?

Postby Stucuk » Thu May 17, 2012 8:00 pm

The reason why the Coordinate Interface's LocalToWorld matrix (As well as the layers Transform matrix for textures) didn't work right was due to me loading the matrix's the wrong way around. Doh. Now objects are in the correct places and textures for the most part seem to have the right texture coords.

@Branan: Thanks. I currently don't know if it will ever get to the stage of having Physics(Well an avatar which walks around and interacts with the world). My plan is to make it able to load the PRP's fully(With visual renderings of the prp classes where possible to check that its all loaded correctly) and then see what happens. Id love to make a Age Maker(Map editor) at one stage (One which doesn't require any modelling knowledge, where you can raise/lower land to create height-maps for the terrain coupled with the ability to place prefab objects (Like rocks, trees, etc)) but it would take up alot of time.
Image
-Stu
Stucuk
 
Posts: 45
Joined: Wed Jul 14, 2010 5:29 pm

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron