Populating Pointcloud from Python

Discussions concerning programming of SOFTIMAGE©
Post Reply
MartinWeber
Posts: 3
Joined: 10 Jul 2009, 13:59

Populating Pointcloud from Python

Post by MartinWeber » 08 Jul 2013, 22:07

Hi guys,

I am at a loss when it comes to creating points in a pointcloud using a Python script.

I have been searching through the SDK help and googling to no avail. It seems I can get the existing points through the primitives geometry point property but there is no way to add points. I had a look at the SDK samples where the mesh importer is using the buildmesh function to create geometry from a vertex buffer.

The trouble is that I have large datasets from scientifc simulation that I need to get into a pointcloud for visualizations. The data are spherical coordinates plus density and temparature etc. I thought of creating a mesh for the positions and creating particles from the vertices but then I still could not assign density and temparature.

I would be thankful for any hint on how to create that pointcloud from Python loading the data from file. Just how do I add points to a pointcloud from Python? I am sure there is an obvious way that I am just missing by looking in all the wrong directions.

TIA,
-Martin
www.effectsgarden.com - TD & CG Generalist

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Populating Pointcloud from Python

Post by gustavoeb » 08 Jul 2013, 22:32

They added the ability to write custom ICE attributes through python at some point. Maybe you can load your data as arrays and then use those arrays to feed your ICEtree?
Havent done it before, so I cant help much...
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
csaez
Posts: 253
Joined: 09 Jul 2012, 15:31
Skype: csaezmargotta
Location: Sydney, Australia
Contact:

Re: Populating Pointcloud from Python

Post by csaez » 08 Jul 2013, 22:38

You can parse the data to generate an icecache file, there's an example on the wiki page. :)
http://softimage.wiki.softimage.com/ind ... hon_Script

MartinWeber
Posts: 3
Joined: 10 Jul 2009, 13:59

Re: Populating Pointcloud from Python

Post by MartinWeber » 09 Jul 2013, 08:40

Thanks gustavoeb! I was already thinking about that but it seemed overkill. It's weird there is no option to create points but I guess that comes with the way they store data in an optimized way internally.

Thanks csaez! Creating the icecache seems to be the most straight forward option. I need to see if that works when using the icetree on the modeling stack to just load it once at creation.
www.effectsgarden.com - TD & CG Generalist

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests