Jump to content

UI for a VEX script and some other doubts..


bhaveshpandey

Recommended Posts

hey!

i have been working with mark's Cluster This dso....he has given the option to use a vex script....

so i wrote a VEX script to break up the clustering of points in a spherical pattern..as per my understanding the dso creates the points at rendertime and then executes the VEX script upon it if the Execute script toggle is enabled...(pls correct me if i'm worng about this)

I have a functional VEX script but sadly it does not provide me the interface to interact with it without having to edit the values of the set params int the script and compiling it again..

i do know about the vcc - U command which creates a .ds file....what i cant seemingly understand is how do i use it??

is there any way to interact with the script from an interface rather than editing it and compiling it again..

for instance i use the same VEX script in the VEX SOP in the Geometry context..

ich works fine..but there's no interface to it..

do i have to link the .ds file which has the interface to the .vex script....?? if yes, could someone shed more light on it?

also one more issue i'm facing is how do i access the Global Variable $T or $F from within a script?? Say for instance i have to apply some noise to the points with an offset using $T....how could i go about accessing that info??

or would i have to probably create the point attrib which could store the Time value and then access it from within the script??

cheers :)

Link to comment
Share on other sites

hey wolf_cub_one thanks for the reply mate..

i did compile it into an otl using the vcc - L command before..

but i needed a vex script since it was not accepting an otl..

what i did was

vcc -o test.vex test.vfl

and for the ui i used

vcc -U -o test.ds test.vfl (i dunno if i used -U first or -o..though i think putting -U first should be right)

Link to comment
Share on other sites

hey wolf_cub_one thanks for the reply mate..

i did compile it into an otl using the vcc - L command before..

but i needed a vex script since it was not accepting an otl..

what i did was

vcc -o test.vex test.vfl

and for the ui i used

vcc -U -o test.ds test.vfl (i dunno if i used -U first or -o..though i think putting -U first should be right)

Have you tried creating a VEX Op type? In Houdini go to File > New Operator Type : and choose VEX Type. Be sure to specify the "Network Type", etc. This will give you an HDA which will allow you to create an interface for your code, which you would provide in the Code Tab.

You can't use global vars inside your vex code directly, but you can provide a parameter which gets exposed in SOPs, etc. For example:

sop
aw_sop_test(float mytime = 1;)
{
vector mycol = {0.5, 0.1, 0.9};

Cd = mycol * mytime;
}

In SOPS I can feed $T into "mytime".

Cheers,

Alan

Link to comment
Share on other sites

hey guys thanks for the replies....

i guess i didnot put forth the issue correctly..

problem is that i need an independent cvex script which i have to point to while using the Mantra ClusterThis dso writen by Mark..

when i click on the button to browse for the script..it looks in my disc for the script....

i did compile my vfl script into an otl but thats only for SOP level Visualisation of what the render should look like....

I believe when my geometry is sent for renders, ClusterThis first creates a cluster of points at rendertime and then runs the cvex code if the toggle's on and the path is correct....

so there's no way for me to interactively tweak the parms..i have to change them in the script....I'm not aware if it does in fact work with an otl?? (but i could take the risk of thinking it doesnt....please correct me if i'm wrong)

.................

apart from the above issue, i also am looking for the solution of one more hitch..

say i need to refer to an external file to read in some attribs from them in a VEX script....how would i go about importing a sequence instead of a single file?

for instance the name and path of file is:

home/test_01/test.$F4.bgeo

how do i refer to this path and name in my script??

the script wont understand it if i use something like:

string file = "home/test_01/test.$F4.bgeo";

it will take the whole string without evaluating the $F variable..

i did try concat but i again i face the issue of assining a string which is first evaluated and then binded to a variable..

so how do i get around this??

cheers :)

Edited by bhaveshpandey
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...