Jump to content

isolating ares around sharp edges


hatrick

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :ph34r: Ok, so you just want to identify things like silhouette edges? eg. like a toon shader? search for it in the forums.

Link to comment
Share on other sites

Sorry, I didn't realize when I replied that I was in the shader forum. :ph34r: 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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by hatrick
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by hatrick
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Hi,

I am afraid i'm not getting it AT ALL :blink: .... 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 by hatrick
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...