Need to animate an environment map

   7504   10   2
User Avatar
Member
48 posts
Joined: July 2005
Offline
I'm trying to simulate a chrome surface.

I'd like to use a file sequence in the environment map field of either the vex shiny metal or vex environment chrome. However, $f won't work stating that time dependent channels cannot be used.

If there is no way to accomplish this with the prefab shiny metal or env chrome, How can I set up supermaterial or another shader to simulate a “chrome”surface with a file sequence as environment map or reflection map?

Any suggestions?
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Hmmm…chrome…nope - sorry. Mantra doesn't do chrome.

Jes' kiddin…

Anyway - the problem sounds like you're trying to animate things directly in VOPs - that's understandable because of the level of integration in Houdini there's an instinct to just go ahead and stick expressions in there. Actually, VOPs are an interface to writing a program: creating code, compiling it, and then inserting the compiled code wherever you've put it, in this case likely a SHOP. It's easy to miss this because you can drag ‘n drop right from the VOP network to an object - but it’s making a SHOP for you automatically. Because you need to compile it, having an expression in there like $F doesn't work because $F gets evaluated, substituted, and boom - it doesn't work the way you want. For that reason, you can't directly connect things in VOPs to specific things in a given hip - you need to *pass* it to the compiled shader.

So the way to do it is to feed a Parameter VOP to the field that names the image. When you make a SHOP from that VOP network, it will contain the Reflection map field, and *thats* where you can put expressions like foo.$F.env…

Hope this helps…

Cheers,

J.C.
John Coldrick
User Avatar
Member
48 posts
Joined: July 2005
Offline
Got it. Thanks John.

Works wonderfully. Guess now I should flesh out a full interface for my shop instead of diving into vops every time i need to tweak. :wink:
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Glad that was the problem. It's interesting, the work process with VOPs - I also tend to work right there in the VOPnet for most of the development, being a little “lazy”. I only work on an interface if I really need it(animation of params being one of those needs).

Cheers,

J.C.
John Coldrick
User Avatar
Member
48 posts
Joined: July 2005
Offline
My problem has been my lack of understanding of how to implement vops.
I'm guilty of being lazy about reading the pdfs and actually diving into some prefab vops to see what's what.

However, you've giving me a good “kick-in-the-arse”.

I've gone into the prefab shinymetal vop and decided that I could do much better to suit my purposes. Created my own shader based on what I learned from the workings of ShinyMetal, however, with more controls and options. Read the entire vops pdf in doing so. Much of which is foreign to me.

I have a fair amount of understanding in the area of shading, however don't talk to me in vector algebra cause I get lost, fast.

I need to find a book called “Illuminance loops for dummies” .
I had to read the explaination of dot product 5 times over and still have only marginal understanding. ops:

Guess it's time to pick up some algebra books.
User Avatar
Member
225 posts
Joined: July 2005
Offline
and *thats* where you can put expressions like foo.$F.env…
How would I loop a 10 frame sequence?
User Avatar
Member
48 posts
Joined: July 2005
Offline
Thanks Tallkien,

In my case, I started with a vopnet, so I'm assuming you're having a similar problem.

To animate a 10 frame sequence as a map, you simply need to append a parameter sop to the map input on your vop and set it's type to string (image). Right click on the network and choose create new shop.
In shops, in the params of your new shader use $f as John stated.

If you're starting with a shop, then skip all that. :wink:

If your sequence starts with a file named myImage.001.pic, you simply use the expression myImage.$F3.pic. $f will advance the sequence with each frame while the 3 is there to define how many places of padding you used to name your seq.
Edited by - Oct. 6, 2003 14:32:53
User Avatar
Member
225 posts
Joined: July 2005
Offline
no no I wasn't talking about Vops at all. I meant If i had a 10 frame sequence that I wanted to loop as a texture in shops, $F would restrict me to only 10 frames after which the map would no longer exist. I found a workaround with the extend cop but would still like to know if there is some expression syntax that could replace $F to allow looping a sequence
User Avatar
Member
48 posts
Joined: July 2005
Offline
Or you could just use FileCOP, sequence tab, Post Extend > Cycle.
User Avatar
Member
27 posts
Joined: July 2005
Offline
$F%10

should get you the looping you want
-on frame 10 the modulus function (%) returns 0, next frame 1, etc
User Avatar
Member
48 posts
Joined: July 2005
Offline
I use wrap($F,1,10)

It seems more intuitive to me.
Adtech Communications Group
  • Quick Links