hatrick Posted June 12, 2011 Share Posted June 12, 2011 hey, how i can isloate areas of my surface where the normals of neighbouring faces are orientated to each other over ore below a certain angle. maybe the dotproduct plays an important role here ?? BUT I've no real understadig of the math ... further i ve no idea how to compare the relevant normals to each other. I had a look at the edgefalloff - vop where the dotproduct of I and N is calculated but how to tell the shader to look at the relation of every neighbouring normal... i don't know if thats the right attempt but my goal is to isolate areas with steeper faceangles thank you HT Quote Link to comment Share on other sites More sharing options...
edward Posted June 12, 2011 Share Posted June 12, 2011 I don't have Houdini right now but I thought there were some related options in the Group SOP. Quote Link to comment Share on other sites More sharing options...
hatrick Posted June 13, 2011 Author Share Posted June 13, 2011 I don't have Houdini right now but I thought there were some related options in the Group SOP. great! thank you for that ... the next step would be passing that info to my shader and to blur that "attribue"? for a smooth falloff. May you could give me some advices how this is done. Do i need pointclouds for the falloff ? ... Greets HT Quote Link to comment Share on other sites More sharing options...
anim Posted June 13, 2011 Share Posted June 13, 2011 maybe it would be easier if you just use curvature information from Measure SOP, maybe fit it to correct range Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted June 16, 2011 Share Posted June 16, 2011 I'm not sure myself on how to do this in Houdini, but I might look at the first derivative of the surface. The value that that outputs is the rate of change for it. If it is high, then you have a sharper change between the normals, low and you have a shallow one, 0 and you have no change in the direction and the normals will be parallel. As I said, I'm not sure how to do this in Houdini yet. I would assume that you would have to use a VOP SOP, but I am failing to find a way to do it. I will keep digging into it and see what I can find. Quote Link to comment Share on other sites More sharing options...
edward Posted June 19, 2011 Share Posted June 19, 2011 great! thank you for that ... the next step would be passing that info to my shader and to blur that "attribue"? for a smooth falloff. May you could give me some advices how this is done. Do i need pointclouds for the falloff ? ... Sorry, I didn't realize when I replied that I was in the shader forum. Ok, so you just want to identify things like silhouette edges? eg. like a toon shader? search for it in the forums. Quote Link to comment Share on other sites More sharing options...
hatrick Posted June 19, 2011 Author Share Posted June 19, 2011 Sorry, I didn't realize when I replied that I was in the shader forum. Ok, so you just want to identify things like silhouette edges? eg. like a toon shader? search for it in the forums. no, no toonshader! ... i'd like to isolate areas around sharper edges (higher derivative?) with a smooth falloff to add different color ore displacement values to that area. the goal is a used, attrited, battered, nagged, ore worn effekt. thank you... like i ve mentioned above .... the prebuild edgefalloff vop gives me the smooth control i'd like to have, but with the wrong vectors (I,N) ... @Adam .... you're attempt sounds good....but how to define the metioned derivative (of each poly) with vectors ? Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted June 20, 2011 Share Posted June 20, 2011 Unfortunately I don't know how exactly to do it with vectors. I am still working on my undergrad in math and we haven't quite gotten that far in it. I will be taking Theory of Matrices eventually, which should give me what I need to know to do it, but I just have no idea how to do it right now. If you have a way to get the normals of two adjacent points, then I would probably start by subtracting them and looking at the output. I am imagining a square. If you look at the normals for each point, you end up with either a +-90 degrees. A hexagon would give you +-60 degrees. The closer to 0 the number is, the closer to parallel the normals are. I would try the absolute value of the difference of the normals. I tried to set up one myself, but I am not able to do the comparison. Quote Link to comment Share on other sites More sharing options...
hatrick Posted June 21, 2011 Author Share Posted June 21, 2011 (edited) Unfortunately I don't know how exactly to do it with vectors. I am still working on my undergrad in math and we haven't quite gotten that far in it. I will be taking Theory of Matrices eventually, which should give me what I need to know to do it, but I just have no idea how to do it right now. If you have a way to get the normals of two adjacent points, then I would probably start by subtracting them and looking at the output. I am imagining a square. If you look at the normals for each point, you end up with either a +-90 degrees. A hexagon would give you +-60 degrees. The closer to 0 the number is, the closer to parallel the normals are. I would try the absolute value of the difference of the normals. I tried to set up one myself, but I am not able to do the comparison. hm ... thanks for your thoughts .. i think the angle between two vectors can be calculatet with the dotproduct divided with the magnitude of the vectors.... my problem is that i don't know how to tell the shader to look at EACH adjacent vector. thank you maybe i am askig the wrong questions ... basicly i just want to do what the groupsop method edward metioned does, but in shading context with a smooth falloff.... some further suggestions would be great Edited June 22, 2011 by hatrick Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted June 24, 2011 Share Posted June 24, 2011 I was just watching a video and noticed an expression function that might be worth looking into. The video isn't on it, so I am not sure exactly how one would go about using it for this purpose, but at least it does something with neighbors. primneighbors() and pointneighbors(). Take a look and let me know if you find any use for them as your problem is something I am sure I will run into eventually, and it would be nice to have the situation figured out already. Quote Link to comment Share on other sites More sharing options...
hatrick Posted June 29, 2011 Author Share Posted June 29, 2011 I was just watching a video and noticed an expression function that might be worth looking into. The video isn't on it, so I am not sure exactly how one would go about using it for this purpose, but at least it does something with neighbors. primneighbors() and pointneighbors(). Take a look and let me know if you find any use for them as your problem is something I am sure I will run into eventually, and it would be nice to have the situation figured out already. tank you adam... i ll get back to you when i got further ! greets Lucas Quote Link to comment Share on other sites More sharing options...
hatrick Posted July 4, 2011 Author Share Posted July 4, 2011 tank you adam... i ll get back to you when i got further ! greets Lucas @edward, maybe i misunderstood you re comment. so ... yes ... it could be a similar approach like a toonshader. I'd like to identify areas around edges. I ve searched for toonshading but i am not realy getting further. Is there a hipfile around ? Thank you Lucas Quote Link to comment Share on other sites More sharing options...
edward Posted July 5, 2011 Share Posted July 5, 2011 I ve searched for toonshading but i am not realy getting further. Is there a hipfile around ? http://forums.odforce.net/index.php?showtopic=3573 Quote Link to comment Share on other sites More sharing options...
hatrick Posted July 5, 2011 Author Share Posted July 5, 2011 (edited) http://forums.odforce.net/index.php?showtopic=3573 thanks edward but i think thats not what im searching for... i need the dotproduct of every neighbouring surface ore point normal.The examples in the topic show toonshadig with the dotproduct of I ad N ... greets Lucas you ve mentioned a method isolation such areas in sop's with the groupgeo sop ... i ve setup a vertex attribute for my wanted areas with that method ... how can i use that attribute in a shadernetwork (it should be blured ?) .... Thank you again Edited July 5, 2011 by hatrick Quote Link to comment Share on other sites More sharing options...
edward Posted July 6, 2011 Share Posted July 6, 2011 i ve setup a vertex attribute for my wanted areas with that method ... how can i use that attribute in a shadernetwork (it should be blured ?) .... Promote it to a point attribute, and then have a shader parameter that's named the same Quote Link to comment Share on other sites More sharing options...
hatrick Posted July 6, 2011 Author Share Posted July 6, 2011 (edited) Hi, I am afraid i'm not getting it AT ALL .... Sorry! ... group some faces in SOPS ... create a new attribute in SOPS by : attribcreate, group Type / Primitives , Class / Vertex, Type / Float, with the first value component set to 1 ... attributepromote in SOPS : Original Class / Vertex , New Class / Point, Promotion Method / Average ??? ... inside a new material i call that attribute just by giving a new parameter the same name ?? in other words: i d like to apply several surfacecharakteristics on specific areas of my geometry. e.g. some kind of noise (surface ore displacement) for the faces which give 1 for my mentioned attribute and "no noise" for the ones that give 0. some further tips on how to use the parameter (attribute) in shops would be great.e.g. how to blur the area specified with the attribute (paramater) ore a apply a falloff to it Thanks Lucas Edited July 6, 2011 by hatrick Quote Link to comment Share on other sites More sharing options...
edward Posted July 7, 2011 Share Posted July 7, 2011 ... inside a new material i call that attribute just by giving a new parameter the same name ?? Yes, make it invisible while you're at it to avoid confusion. Here, I've attached a .hipnc file. cuspShade.hipnc Quote Link to comment Share on other sites More sharing options...
hatrick Posted July 7, 2011 Author Share Posted July 7, 2011 Yes, make it invisible while you're at it to avoid confusion. Here, I've attached a .hipnc file. wow, i don't know what i did wrong ... indeed a strange workflow with just naming a paramater ... thank you very much ! Quote Link to comment Share on other sites More sharing options...
edward Posted July 7, 2011 Share Posted July 7, 2011 In written VEX language (which VOPs compiles to), shader parameters are automatically bound to attributes of the same name/type. 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.