Jump to content

Learning VOPSOP


Recommended Posts

A little late to the party. 

Having a quick go at this one. Not used the cross product yet, just dotting the vector from P to the nearest point on the cylinder with another planar vector (1,0,0) and putting that into a sin. Looks like I'm not quite there though.

post-3273-0-30823600-1410237866_thumb.jp

Edited by wixman
Link to comment
Share on other sites

Just noticed I've written cross product instead of dot product, you don't need a cross for this, you're really close :)

Thanks! Well that's good to know - I guess it's possible to use the cross for this (?) as the length of the cross is the sin of the angle between the two vectors multiplied by their lengths

Link to comment
Share on other sites

Shinji's tasks are so hard T_T

Sorry for taking so long to post but what I did was basically follow wixman's instructions, I would've never figured it out on my own. So I did some more messing around in Houdini to get an idea of what's actually going on. 

Anyway, here's a screenshot;

post-11810-0-97319800-1410365655_thumb.p

Link to comment
Share on other sites

edit; nvm, I tweaked a few things and it looked like it's working fine until I tried moving the cylinder. What I used instead of the PC import by index was PC Import inside of an If-then block. The rest of the network was pretty much the same as yours. Also I had to increase the Search Radius on the PC Open quite a bit ;3 

Also you should consider unhooking that N pipe from the VopSop's output. For some reason it's doing weird things , at least on my machine. 

Edited by Georgie
Link to comment
Share on other sites

I've attached an image of my network.
 

Presumably, if it's not working when you move the tube around, something is wrong with the point cloud look up. Because if it finds nothing, the lines will fan out from center (0,0,0).

What the dot product is essentially doing is comparing the two (normalized) vectors, and giving the cosine of the angle between them:

1 if they're the same direction, -1 if they're opposite direction and 0 if they're perpendicular. The arccos gives the actual angle between the two vectors in radians (from 0 to pi)

I've done this in an attribvop, which has opinputs as globals making the point cloud lookup a bit simpler.

post-3273-0-54387000-1410385038_thumb.pn

Edited by wixman
Link to comment
Share on other sites

Could someone explain me why the position of the points I try to get doesn't work using the PC import node with an if block? maybe I'm doing something wrong because he doesn't take the points of the cylinder, only the origin. Here is the modified file

Édit: you used a PC filter node, from the help, it says you get the average of the point given by the point cloud, but don't you want to get the correct position, not an average one?

problem_Shinpierre.hip

Edited by ioness
  • Like 1
Link to comment
Share on other sites

I'm glad to see I'm not the only one who failed at this :))    I tried for hours yesterday to no avail.  Not even close all i could get was a lines going parallel to the vector I dotted with and when i added the sin function I just got two parallel lines.

 

Soo then I started to mess around and did this...  Its not right barely even close unless you tweak tons of parameters, but if I mess with the number of points to return on the point cloud open node the pattern vibrates and it makes a really badass tunnel effect :)

 

tunnel.jpg

 

network.jpg

Link to comment
Share on other sites

I'm glad to see I'm not the only one who failed at this :))    I tried for hours yesterday to no avail.  Not even close all i could get was a lines going parallel to the vector I dotted with and when i added the sin function I just got two parallel lines.

 

Soo then I started to mess around and did this...  Its not right barely even close unless you tweak tons of parameters, but if I mess with the number of points to return on the point cloud open node the pattern vibrates and it makes a really badass tunnel effect :)

 

 

Hey Captain - to be honest, the only thing that looks out of the ordinary here is the nearpt/getattrib here. We just need a vector from our current position (P) to the nearest point on the cylinder.

Also, use the 'trigonometric functions' node for the sin - the key here is to crank up the frequency to increase the number of beams. 

Link to comment
Share on other sites

oooooooohhhhhhhhhhhhhhhhh    that makes sense, I couldn't figure out why I could only get blocks instead of a radial pattern.  I think near point works better then a point cloud in this instance, though subtracting the both of them just makes a cool wiggling effect :)  

 

Thanks for the explanation of the math, this makes a lot more sense to me now.

Link to comment
Share on other sites

Okay here's one for Day 9:

 

Using the intersect vop create shadows from a mesh onto a grid.  Extra credit for making it a soft shadow( you can use a second vopsop for this)

 

 

mountain_Range.jpg

 

Roberts example is better you should stride to it like that |

                                                                                         \/

Edited by captain
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...