Jump to content

How to change direction of Normal?


Recommended Posts

Hi Members,

Today I have a other question that is related math.

Please find my attached file.

As you can see that file, I would like to change direction of Normal.

I don't know that I have been thinking all day long.

Please let me know.

Best,

Jamie

post-3269-0-27780600-1368605887_thumb.pn

Link to comment
Share on other sites

If you can control how the polygons are constructed, then you can create uv co-ordinates that are well formed along the polygons. From there you can use the PolyFrame SOP to compute orientation vectors based on your uv's and you are done.

The corollary to that is if you can muster to compute proper uv's then you have a hope at constructing your reference frames.

From your example bgeo above, it is well ordered and can easily be converted in to a polygon mesh but one prim wound out of order and this won't work.

post-371-0-19077900-1368620430_thumb.jpg

polyframe_uv_orient_coordinates.hip

Link to comment
Share on other sites

Btw in case you were wondering the PolyFrame SOP was created to flow guide curve feathers down a bird body by simply manipulating the uv mesh to control orientation. Also comes in very handy for fur/hair styling. Just add a lift based on a rotate along the tangent attribute with the Rotate VOP.

Link to comment
Share on other sites

@ Old School

Thank you for your support.

You always give me a great teaching. Really thanks.

I could not think there is PolyFrame SOP.

Have a great day.

@ Zarti

Hi, Zarti. Thanks for your suggestion.

That is so much good solution and fancy idea.

I have a smile due to your teaching.

Have a nice day.

Link to comment
Share on other sites

Hi Old School,

I have 2 questions in your attached hip file.

Question 1 : Why did the polygon convert to type of Mesh?

Actually I am confused that there are difference between polygon and mesh type.

Question 2 : Why did you apply to Vertex texture in UVTexture SOP?

I had understood other nodes.

If you feel free, please let me know.

Best,

Jamie

post-3269-0-45274700-1368667865_thumb.pn

Edited by jungjaehwa
Link to comment
Share on other sites

Question 1 : Why did the polygon convert to type of Mesh?

Actually I am confused that there are difference between polygon and mesh type.

I converted to a Polygon Mesh type because it makes it trivial to add uv's using the Rows and Columns method and get the correct orientation. Works very well with the Polyframe SOP and is rock solid with deforming geometry inputs. No flipping.

If you use Rows and Columns on the raw polygons with the UV Texture SOP, you get each poly face with a 0-1 in both u and v all piled on top of each other. Not too good for the Polyframe SOP approach but still may work.

The idea is to have continuous flowing uv's that respect the geometry in your case example. If you are generating these patches in a procedural way, then construct your uv's at that point in time as well. The nice thing about this is if you want to adjust things, just play with the uv's. Simple.

The approach where you try to construct a frame of reference by chasing edges, it will fail most spectacularly if just one face is wound either reverse or shifted one vertex. By the time you have implemented a solution to clean and order the polygons, you could have generated uv sets a few times over. Assuming your faces are in a nice constructed order which they are as I can trivially convert them to a mesh type without fail and construct uv's is just that: an Assumption and that word always implies a healthy measure of risk which means surprise at the most inopportune time.

My method will be significantly faster than chasing edges and constructing vectors when you start piling on thousands of polys. And using uv's and PolyFrame SOP is entirely artist friendly as there is a better chance an artist understands uv's than vector math. Yes that is an assumption...

Question 2 : Why did you apply to Vertex texture in UVTexture SOP?

I had understood other nodes.

I always apply my uv's as vertex type and set that as a permanent default for myself. Vertex uv's just behave better for shading with less surprises is all.

The default setting on the UV Texture SOP is Automatic which will generate point uv's unless the polygon shape is manifold and using polar or cylindrical and then you get vertex uv's or you apply textures to parametric surfaces that have closed u or v boundaries. I don't like surprises that result in head-slappers.

I like to set this to vertex all the time and then use a Point SOP and enable uv's if I need to promote to point uv's for use with VOP SOPs.

Hope that clears things up.

  • Like 1
Link to comment
Share on other sites

Hi Old School,

Thanks for your kindly help. I appreciated it.

Unfortunately I don't know your name then I call you Old School. I hope you understand.

I have been reading your post deeply and slowly.

Have a great day.

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...