Jump to content

how to use .vfl files


Recommended Posts

Hi,

I forward here my post from sideFx.

I am making some attempt to compile .vfl file taken from this website :

http://opengl.jp/houdini/vex/

I didn't try all these files but I failed to compile them except one : the "dented.vfl" in the "VEX Sample Codes III" section.

For the others files I tried using "vcc -l my.otl my.vfl" command, I obtain thir error message:

C:/HOUDIN~1.343/houdini/vex/include/prman.h:96:1-5: Error 1091: Invalid context name 'float'

What does it mean ?

I looked inside the prman.h and try to check inside the vfl but I haven't enough knowledge to see anything different from the dented.vfl.

The other thing is that the dented.vfl is a shader ( surface context).

But then, how to compile to get procedural patterns like "stripes", "brickers", "foamy" etc... ?

Or maybe not compil but use the .vfl in vop context ?

I have read someething about "vcc -m" option but apparently is not supported anymore ... and I can't find any clue on the online documentation.

Thanks for your help.

Link to comment
Share on other sites

Nice old shaders under the link.

The main problem with these shaders is their age. Everything else is fine :)

First I've tried to compile disp_rope.vfl

The first error I've got was:

disp_rope.vfl:17:1: Error 1057: Unable to include "STREE_math.h"[/CODE]

STREE_math.h needed.

Google helps to find this header at this topic. But we don't relly need it for disp_rope.vfl.

The note on the http://opengl.jp/houdini/vex/ says:

Some of the below shaders can be compiled if you delete #include "STREE_math.h" statement.

But I think you already get it because you can't just ignore that include when compiling [b]dented.vfl.[/b]

The next errors I get is something like:

[CODE]disp_rope.vfl:81:21-28: Error 1104: Ambiguous expression type in explicit cast: could be one of float or vector
disp_rope.vfl:81:30-34: Error 1093: Ambiguous call to function noise(). Candidates are: float noise(float), vector noise(float)[/CODE]

Now we don't need the type cast [i](float)[/i] at line 81 before [i]noise()[/i]. Maybe some years ago it wasn't a problem with other vcc version. I don't know.

When I have tried to compile [b]dented.vfl[/b] with STREE_math.h I have no errors at all.

Just for curiosity I've comment #include "prman.h"

It was needed to change [b]color[/b] type to [b]vector[/b] in the declaration of some variables. And rename to [b]faceforward()[/b] functions to [b]frontface()[/b]

Then it compiles too.

H12.5, Ubuntu 12.04

Link to comment
Share on other sites

thanks Pavel,

I have already got the "STREE_math.h".

I didn't try to compile the dsip_rope.vfl but I guess it becomes a shader at the SHOP level.

I wonder if it's possible to compile .vfl to make vop node instead of "big" shader node ...

Link to comment
Share on other sites

ok !

I though you need Houdini11 version to get that !

thx

edit :

I just tried to compile the aurora.vfl and have this error message


error cpp error: "aurora.vfl":18 Unable to include <prman.h>
error cpp error: "aurora.vfl":19 Unable to include <vexnotes.h>
"aurora.vfl" line 49 VCC: unknown error: 1041
surface_color = blend(surface_color, layer_color, layer_opac);
^
"aurora.vfl" line 51 VCC: unknown error: 2005
Oi = surface_opac * turb;
^
"aurora.vfl" line 52 VCC: unknown error: 2005
Ci = surface_color * turb * surface_opac;
^
"aurora.vfl" line 38 VCC: unknown error: 1010
PP = transform("shader", P) * turbfreq;
^
"aurora.vfl" line 43 VCC: unknown error: 1008
turb += abs(snoise(PP + freq * PI));
^
"aurora.vfl" line 51 VCC: unknown error: 1008
Oi = surface_opac * turb;
^
VCC: unknown error: 2007
VCC: unknown error: 2007
VCC: unknown error: 3002
VCC: unknown error: 3003
VCC: unknown error: 3007
[/CODE]

the same with dented.vfl but I the header files ares still at the right place ...

Edited by vbk!!!
Link to comment
Share on other sites

With default vcc it compiles.

Just replace transform() to ptransform()

And vcc11 compiles it when I add -I option as a command line argument. It seems like vcc11 don't know where to find default headers in $HH/vex/include.

vcc11 -l aurora.otl -I$HH/vex/include/ aurora.vfl[/CODE]

Link to comment
Share on other sites

it works for me too

i had a problem with space in my houdini path. Usually I am careful about it but i installed the last build to fast !

It still doesn't work with -m option with vcc11

unknown error 2007 and 3002 ...

do you think this vfl code can be used inside a inline vop ?

Link to comment
Share on other sites

You can include any headers with your functions to the Inline VOP.

For example write your custom function in the myFunctions.h file in your $HOME/houdiniX.Y/vex/include/ directory. Then add myFunctions.h in the Include Files parameter of the Inline VOP. Then you could call functions from that file.

Edited by Green-Man
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...