Re: fastest way to get results from scripted op onto shapes.

Date : Thu, 1 Sep 2005 10:06:26 +0100
To : XSI(at)Softimage.COM
From : Alan Jones <skyphyr(at)gmail.com>
Subject : Re: fastest way to get results from scripted op onto shapes.
I'd go for a UserDataBlob. It would be much nicer to work with in C++ though and make it really easy - just throw together a struct for your data and pump that straight into the userdatablob and pull it back out again.

Hope this helps,

Alan.

On 9/1/05, Sam Hodge <sam.hodge(at)rsp.com.au> wrote:
Hi Guys,

I have produced a scripted op that from an input of 7 sliders outputs
the following info, 7 integers and 7 floats.

It runs very quickly from my tests in python it updates at a rate of 600fps.

The problem is connecting it up to control the scene.

The integer represent the position in a very long array (2187 long), and
the float represents the value of that position in the array, all other
values in the array are zero.

So I can explode this out to an array of 2180 zeros and 7 non zero
floats, but it seems wasteful.

or I can do what im doing now and use a conditional _expression_
<_expression_>cond(obj.parm.index0 == 17, obj.parm.value0,0)</_expression_>

but this means that a few hundred params will be looking at the result
of the 7 integers, to see how the _expression_ is evaluated.

in the long run the value of the float will control a shape in the mixer.


So here are my questions:

What is the most efficient data structure that can hold 2187 floats,
that is accessible through an _expression_?

Can you instantiate scripted ops so the same code is evalated on the few
hundred shapes,  overcoming the need to used an _expression_ for each shape

Sam

--
sam hodge
technical director - sam.hodge(at)rsp.com.au
----------------------------------------------------------------
rising sun pictures - www.rsp.com.au
redefining visual effects delivery
----------------------------------------------------------------
direct line +61 8 8400 6400
mobile ph +61 417 801 006
----------------------------------------------------------------
our adelaide phone number & address has
changed, please update your records..........
----------------------------------------------------------------
adl ph +61 8 8400 6400 - fx +61 8 8400 6401
level 1, 133 gouger street, adelaide, 5034
----------------------------------------------------------------
syd ph +61 2 9338 6400 - fx +61 2 9338 6401
15/16 charles street east redfern, sydney, 2016
----------------------------------------------------------------
rising sun research - http://research.rsp.com.au
----------------------------------------------------------------

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.