Cluster Groups

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.

Cluster Groups

Postby ddb174 » Fri Oct 03, 2008 10:09 am

I've figured out the problem with Minkata's Craters. My (hopeful!) solution requires me to get a hold of the plAttribClusterLists for the Craters. So, I create a dummy object and try to load a python file with the ptAttribClusterList:
Code: Select all
dustDummy:
   logic:
      actions:
        - type: pythonfile
         pythonfile:
            file: dustdummy
            parameters:
              - index: 1
               type: clustercomponentlist
               #type: uruobjectref
               #type: activator
               ref: clustergroup:cCluster_Crater01_0@minkExteriorDay
               #ref: 0x012B:cCluster_Crater01_0@minkExteriorDay


The problem is, this ref is to something that is *not* in my blender files. I could just make a dummy clustergroup called "cCluster_Crater01_0" in a page "minkExteriorDay", but pyprp doesn't support ClusterGroups, so I'm not sure what I should do.

Should I modify prp_LogicClasses.py to accept a new thing, "forcedref" instead of "ref", and just put the raw data I want:
Code: Select all
forcedref: 0x012B:cCluster_Crater01_0@1

Where 0x012B is the type and 1 is the actual page number.

Could I submit such a change upstream, or does someone have a better idea?
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: Cluster Groups

Postby Tsar Hoikas » Fri Oct 03, 2008 1:28 pm

There is some cluster support in some contrib of PyPRP. I'll defer to someone who knows about that to give you better instructions.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Cluster Groups

Postby ddb174 » Fri Oct 03, 2008 2:26 pm

Cluster support would be great for quickly making dense Ages.

I've figured out a solution that creates the ref, so there's no longer a need for anyone to bang their head trying to find a way to make pyprp do it. Unless, of course, they think it would be handy in the future.
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: Cluster Groups

Postby Paradox » Fri Oct 03, 2008 3:33 pm

There is code for (among other things) ClusterGroups in my PyPRP contrib branch. It is export only, and will export all objects that share a mesh datablock as a Cluster Group.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Cluster Groups

Postby Lontahv » Mon Oct 27, 2008 7:22 pm

There is pretty full support for exporting clusters in PyPRP. I coded it myself (mostly). The clusters are visible in the age I'm helping model: Yinfara (more on this below).

I had to do some fiddling with the number of plClusters per plClustergroup and such to make performance better (too many ClusterGroups is a bad thing as well as too many instances per SpanInstance (I think that's the name)).

To get back to the actual current usage of them Paradox is using them for AhraPahts (big improvement in file size) and I am using them in Yinfara (for the trees). The level of detail works really well as do the vis-regions (have a pile for yinfara).

Some pics are visible here: http://www.guildofwriters.com/wiki/Yinfara.

Dustin, wanna join the Honey-Nut-Cluster club? ;) :lol:
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Cluster Groups

Postby Aloys » Tue Oct 28, 2008 3:06 am

I had noticed the tree-filled Yinfara pics in Justin's signature and I was wondering about that; looks nice. :)

Speaking of Cluster Groups, what kind of transformation can we apply to instances? I guess translation is obvious, but can we as well rotate and scale? Say I have a bunch of instance rocks, if I rotate/scale them at random PyPRP 1.5 will export them fine, but not as a cluster groups; do CGs support that as well?
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Cluster Groups

Postby Lontahv » Tue Oct 28, 2008 5:00 am

CG's support scaling (in any or all directions), rotation and translation. So basically all you can do with objects using linked duplicates what you can do with instances (which is nice because linked duplicates are what PyPRP uses to tell if an object should be a cluster).

The clusters have nothing regular (except for Materials and SoftVolume regions). The are attached to the SceneNode directly and thus have no SceneObject. This is why they are kinda... limited. It's not as if there are tons more than can be done with them than what PyPRP currently has support for (it's not an expanding field).

But they can do a lot more than Cyan uses them for (shrubs and rocks and grass on Relto, Cleft, Kemo). :D

The reason that they have collision is because when collision is enabled it exports just the collision bounds of the Instance to the regular old SceneObject with Physical thing (collision is not a build-in feature for these).
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Cluster Groups

Postby andylegate » Tue Oct 28, 2008 5:25 am

You know, we could use something on the Wiki about this, especially on how to do the shrubs like in the Cleft and Er'cana. I'm sure there are a lot of us Age Creators that would love to take advantage of this in some of our Ages. I really could have used something like is in Camp Bravo, or better yet, Zephyr Cove, for like some of the rocks or Dune Weeds of some sort. As pointed out, I COULD go in and make mesh upon mesh, but I'm thinking it would be better to do it this way.

However, other than mentioning it, there's not really anything explaining at least an idea on how to do this. Anyone want to type up a quick blurb on the wiki?
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Cluster Groups

Postby Lontahv » Wed Oct 29, 2008 4:47 am

I'm going to put writing a wiki article about Clusters high on my list. If someone else wants to write the article feel free.

Oh... WOW. I have a lot of time to work on my tiny age for RAD. So I can't use the "I'll be swamped" one in this case. :P

I'm not sure if we're released the version with (improved) clusters yet. I tend to forget what's released and what's not with PyPRP. :P

Hoikas, Paradox, et al. how do you like the idea of releasing a version before the RAD? This would help a lot of people who don't like nightly-builds and SVNs. I can't think of a major feature other than Clusters that has been added though. :/
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Cluster Groups

Postby Paradox » Wed Oct 29, 2008 7:53 am

I'm working mainly in my contrib folder, because I keep making changes that would otherwise break everyone elses' Ages. If someone wants to look through and merge anything that they think would be useful, then by all means, go ahead. Do not merge the MatClasses, since I know there are breaking changes in there, and there are probably a number of other files where I've needed to change something that would break other .blend files.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests