Announcement

Collapse
No announcement yet.

Mesh intersections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mesh intersections

    Is SpeedTree able to build trees that do not have any intersecting elements? By intersecting elements, I'm not talking about normal behavior where you have a branch adjoined to a trunk or two branches splitting off from each other. Rather I mean, for example, unexpected behavior such as two branches that cross through each other or a leaf that passes through another leaf or a branch. Does SpeedTree test for these kinds of intersections during tree generation or when the scene is meshed? If so, how does it deal with these intersections?

    On a related topic, how do the meshes behave at weld points. In this article (http://docs.speedtree.com/doku.php?i...hintersections) it appears that the two welded objects do not have common vertices. Is SpeedTree capable of resolving the meshes so that adjoining objects share vertices and edges? If not, does SpeedTree check if the polygons intersect each other? Does it create any separation between the polygons of the two objects?

    Our interest in SpeedTree is to generate tree models for use in electromagnetic solvers and simulation software, so we need well-formed meshes with non-intersecting polygons. If SpeedTree is able to resolve the meshes prior to export, that would make our job a lot easier.

    Thanks,
    Mark

  • #2
    Hi Mark,
    I'll answer the questions in the order they were asked.

    1. "Is SpeedTree able to build trees that do not have any intersecting elements?"

    Yes, SpeedTree has the capability of building trees that do not intersect; branches and leaves.
    - For the branches, you will need to create and use 'Collections'.
    - For the leaves, there is a 'Leaf Collision' property that reduces or removes any leaves that intersect based on the input value assigned. However,
    this is calculated using spheres so the effects lean towards the extreme.

    2. "Is SpeedTree capable of resolving the meshes so that adjoining objects share vertices and edges?"

    This can be resolved by using SubD surfaces when creating the tree.

    If you want to test how this will work for you, you can go to our website and try a eval version of SpeedTree.
    I hope I was able to help!

    Comment


    • #3
      Sonia,

      Thanks, this has helped. Using the Cage generator seems to work well at resolving the branch/trunk intersections. I'm not doing as well at resolving leaf intersections, however.

      Under the Placement property I'm clicking "Edit leaf collision…" and checking "Enabled." I'm choosing "Spread then cull," setting the spread factor and cull tolerance to 1, and choosing "Favor accuracy." It seems to be reducing collisions, but not eliminating them. Some of the leaf meshes still intersect each other, and the algorithm doesn't seem to consider leaf/branch intersections at all (if I do a node edit on the branch with leaves, moving it so that the leaves clearly intersect another branch, the leaf collision algorithm doesn't make any adjustment to the leaf positions).

      My test case is a very simple tree consisting of a trunk, a single level 1 branch, a single level 2 branch, and some leaves on the level 2 branch with a plane mesh (I'm using the eval version of Speedtree Cinema 7.0.4). I'm exporting the mesh to an OBJ, then using my own algorithm to render the triangles in the OBJ output file and test for intersections.

      Increasing the spread factor seems to just spread out all the leaves, regardless if they intersect or not. This obviously reduces intersections, but it isn't clear that the algorithm is actually testing for intersections and resolving those that are found. Changing the cull tolerance doesn't seem to have any impact on this very simple structure.

      What else can I do?

      I'm also a little confused by your statement that the leaf intersections are calculated using spheres. I haven't done my own calculations, but just looking at my leaf structures, it seems that the bounding spheres of just about all of them would intersect.

      On a different note, can SpeedTree export triangle meshes of the leaves themselves, rather than just the mesh "cards"? I'd like to have triangle meshes of each of the actual leaves, rather than a mesh of a foil or plane or some such thing with a leaf texture attached to it.

      Thanks for your help,
      Mark

      Comment

      Working...
      X