Announcement

Collapse
No announcement yet.

Tool to convert opacity mapped faces into geometry leaves

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

  • #16
    I was wondering how tuff it would be to trace the leaf edge with a spline, if you sampled the alpha there wouldn't be too much data to consider, maybe..

    I have no idea how to approach it though :P
    Eric Boer
    Dev

    Comment


    • #17
      that's just what I did. I just traced the alpha with a spline by hand, not too hard to do. depending on what kind of tree you have you can get away with only 4 vertex points, then converted it to a mesh, it doesnt need a shell modifier like da force said, because the vray mat renders both sides anyway.

      the xfrog tree I used has allready 4 differt mat. ids for the leaves, that way you can replace it with 4 different colors too.

      Comment


      • #18
        I'll add in support to replace multiple ids too. As far as the splne tracing thing, I think somene may have done this but I'm not sure whether it was in max or in a compositor as some kind of auto rotoscoping...

        Comment


        • #19
          the more I think about it the more impossible I think it is, in maxscript anyways. It can be done in PS easily just convert a selection to a path. and of course any raster to vector proggy. Joost's method is sounding pretty good.
          Eric Boer
          Dev

          Comment


          • #20
            dudes im so wasted right nbow.
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #21
              why does that not suprise me in the least

              Comment


              • #22
                Okay I've re-done somestuff in this, now you can pick multiple objects to be the leaves to add a little more variation. On second thoughts, the assigning of ids via the script may be a bad idea especially if the leaf object you are using already has multiple object ids - for example we're doing something where we have an object with leaves and apples in one object so it'd be a pain in the ass if the apple objects accidentally got a leaf material id etc.

                Anyway, new version is up in the stuff section of the site - http://www.joconnell.com/view_stuff.php?view=4 - I'll add a slightly better manual or a little screencap later on.

                Also, one of the guys here is having problems with memory overheads on high poly leaf objects so I'm gonna do another version which rather than outputting a huge bit of geometry puts out point helpers with the position and orientation of the source leaf which may be a little lighter. I've got another script to replace one object with another to swap them over to complete the process.

                Comment


                • #23
                  Thanks again,it works a treat

                  Comment


                  • #24
                    Appreciate all the work your willing to share with every John, very generous of you.

                    I'm curious as to the correct method of working with your script. I am testing it with an XFrog plant, and it appears to be creating a leaf object placed at the center of every face on the target object, which is fine in itself. However, the plant I'm working with has multiple faces for single leaves, so the script is over populating the object.

                    I guess a request would be to have it replace at the poly,element level as well. Or maybe I'm just doing it wrong

                    Again, thanks!

                    EDIT I just figured out that it's based of off visible/invisible edges. Works like charm, thanks!

                    Comment


                    • #25
                      Yeah it's a little thick really and works on the assumption that one single polygon is each leaf object - all of the max aec trees that I set it up for use a single face and an opacity map - the opacity map adds 3 leafs to each face so you need to replace one face with an object that has 3 geometry leaves so it's geared towards that type of situation. Support for element level is a very good idea though for situations like xfrog or otherwise - I'll add in an option to run from either or possibly off selected elements.

                      Comment


                      • #26
                        hi joconnell,
                        very nice script, but i've tried to used it in max8, and i can't open.
                        does it work in max8?
                        Jonas

                        www.jonas-balzer.de
                        www.shack.de

                        Comment


                        • #27
                          Hi Jonny,

                          I'm still on max 7 in work - we havent had any down time since max 8 sp1 came out so to be honest I haven't tried it. The only thing I can think of is that it installs itself as a macroscript under "John O'Connell tools" in the main ui category of customize ui. I'll take a look at it this evening though to make sure that it behaves properly.

                          Comment


                          • #28
                            aaah there he goes. yes it works fine as you said!!

                            thanks a lot!
                            Jonas

                            www.jonas-balzer.de
                            www.shack.de

                            Comment


                            • #29
                              Just be careful using really high poly leaf objects - we've tried it on an aec tree that has 11000 leaves and were replacing them with a new leaf that had around 150 polygons (it had to replace an opacity map that had three leafs on it) and we had a few out of memory errors. I'm trying to work on quicker more efficient methods bu be careful in the mean time

                              Comment


                              • #30
                                yes i will thanks. but i have a lot of trees in a scene at the moment, which renders veeeeery slow with opacity map, i've made proxis, and all the textures crashes. so i hope it will work without any opacity map.
                                Jonas

                                www.jonas-balzer.de
                                www.shack.de

                                Comment

                                Working...
                                X