Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaf Position is incorrect #5

Closed
danwipf opened this issue Sep 4, 2019 · 5 comments
Closed

Leaf Position is incorrect #5

danwipf opened this issue Sep 4, 2019 · 5 comments

Comments

@danwipf
Copy link

danwipf commented Sep 4, 2019

Incorrect results when using the Tool. (see the Leafs) any quick Idea how to fix this issue?
(it's the ExampleIvyMeshExport.obj file inside the Example folder)

Hedera Leaf position

@radiatoryang
Copy link
Owner

I would probably want to look into this deeper / make leaf placement more user-configurable, but unfortunately I won't have time to work on this for a while...

some workarounds to try:

  • rotate the leaf textures in Photoshop by 180 degrees, etc
  • change the vertex order in IvyMesh.cs
  • mess with the UV assignment in IvyMesh.cs

@danwipf
Copy link
Author

danwipf commented Sep 5, 2019

i did tried to change the textures(rotation), manually add offset to the leafs didnt messed with the uv, because i believe they do not catch a point on the root/branch.

just to clarify i know how to manipulate a spline and can calculate a point on it but i didn’t figure out yet how it works here.

@radiatoryang
Copy link
Owner

//center of leaf quad

it picks a point on the branch, adds random offset, and then uses that point as the center of the leaf quad...

a more accurate method maybe wouldn't add any random offset to the center -- and instead it would generate the leaf quad based on a random rotation around a pivot point, instead of the center of the leaf quad

(feel free to submit a PR if you get it working! or I'll get around to this in ~december)

@danwipf
Copy link
Author

danwipf commented Sep 6, 2019

yes i will.

right now i can say that newLeafPos - ivygraphs current root position is an actual and correct point, so somewhere inside the center’s calculation the position gets off.

next respon i’ll add the solution as PR

dan

@radiatoryang
Copy link
Owner

finally got around to this a year later! see PR #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants