zveris Posted February 15, 2004 Share Posted February 15, 2004 I have a question about expression I wan to change uv positions with image map, and to do that on per frame base. So if I do expression $MAPU +(tex("mysequence$F.pic" ,$MAPU, $MAPV, r) I'm getting innitial uv possition plus r value of currient frame, which is fine for the first frame, but not for the rest of the frames, where I would like to have previous frame uv possition plus value. So how do I write this expression? Help would be realy appreciated Aivaras Quote Link to comment Share on other sites More sharing options...
Jason Posted February 15, 2004 Share Posted February 15, 2004 Look into using the Trail SOP to get a previous frame, and then look into using the point() expression to reference those points. Unfortunately the Trail SOP doesn't allow you to NOT output the current geometry too. I've often wished for the Trail SOP to just allow you to get the past frames even just for my own OnionSkinning purposes. Anyhow, it looks like a good way to remove the current frame is to use the GroupCopy SOP. Attached is a simple hipfile to so that. This little function would be great to be made into an OTL.. trail_previous_frame.1.zip Quote Link to comment Share on other sites More sharing options...
zveris Posted February 15, 2004 Author Share Posted February 15, 2004 Thanks Jason, this is a nice trick for onion skinning. But I dont think it helps in my case. Your net allows to look get the data from the previous frame, but I still don't know how to compute the data. Consider this - on fr1 I have u and v(UV0) coordinates for a point. I displace those coordinates using r value of the image at those uv coordinates and result is UV1.So we go to frame two where new texture map will give the next displacement value, but the problem is that $MAPU $MAPV in a point sop will not read UV1 but UV0, which gives incorect result. My point is - I have a seequence of images describing motion not in absolute meening but incrementaly , therefore I want uv's to move to new possition to get next motion increment. I hope it makes sense, and I hope somebody can come with some idea for it, I'm getting totaly out of my mind here. zveris Quote Link to comment Share on other sites More sharing options...
Jason Posted February 16, 2004 Share Posted February 16, 2004 Ah, I see. What you're wanting to do ultimately is "simulation" - where changes are cumulative. This is doable with mild hacks and it almost always entails writing out the frame and reading that same frame back in on the next frame. ReadFrame | MoveStuffAbout | WriteFrame You can build in a SwitchSOP in there to output the rest/initial position at Frame=1 ($F=1) and it goes quite smoothly. Take a look at the LoopSOP that was submitted to od[force]. This uses a technique like this. Hope it helps, Jason Quote Link to comment Share on other sites More sharing options...
edward Posted February 17, 2004 Share Posted February 17, 2004 If you want simulation, then why not POPs? Quote Link to comment Share on other sites More sharing options...
zveris Posted February 17, 2004 Author Share Posted February 17, 2004 interesting ideas, but how I can use simulation or pop's to drive uv's?With the transformation in uv space? I'm confused. Quote Link to comment Share on other sites More sharing options...
edward Posted February 18, 2004 Share Posted February 18, 2004 Bring your geometry into POPs and append an Attribute POP. Let's say you called it "uv" as the name and "UV" as the Local Variable. Then put your starting uv expressions into the Default parameter. In the Value parameter use $UV1+0.1 and $UV2+0.1. Now you should see the values changing every frame in the geometry spreadsheet. Check out the attached file. pop_attrib.hip.gz Quote Link to comment Share on other sites More sharing options...
zveris Posted February 18, 2004 Author Share Posted February 18, 2004 thanks edward, that seemes to work. Indeed, if to check spreadsheat the values are adding nicely up and all. So it is fine. Thank you very much. Just one last question and I feel stupid to ask - why I cant read thosse new uv's to point sop? Which ever way I try - feeding as a second input in point sop, transfering attribure, making ch expression - nothing happens, although I see in spread sheat nicely animated uv attributes in popnet, they seem to be not transferable to poin sop. Thanks again. zveris Quote Link to comment Share on other sites More sharing options...
edward Posted February 19, 2004 Share Posted February 19, 2004 Oops, sorry, the default uv attribute is of size 3, not 2. Look at the modified file in the uv viewport which will show the animated uv's. pop_attrib.hip.gz Quote Link to comment Share on other sites More sharing options...
edward Posted February 19, 2004 Share Posted February 19, 2004 Oops. wrong file. try this one: pop_attrib2.hip.gz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.