Announcement

Collapse
No announcement yet.

Better than Itoo Forest

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

  • #31
    You can use the offsets. But if you limit by altitude range it doesn't take the transform offsets into account due to order of operations.

    1 - Scatter by Surface (geo) / Areas
    2 - Limit/remove based on geo Slope and Altitude.
    3 - Transform Offset generated trees.

    So since Transform (displacement) occurs after scatter and limits it doesn't take the transforms into account. Hence the need to do it via the displacement map and a derived slope map from the displacement. But the problem there is you can only override the distribution map which is tiled. So it's going to be really hard to align the worldspace tiled distribution map with the say color corrected displacement map in UV space.
    Gavin Greenwalt
    im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
    Straightface Studios

    Comment


    • #32
      ahh ok i see.. the altitude and slope ranges.. hm.. tough one. in that case i expect you are back to generating a massive mesh on which to base your trees unless itoo can come up with a solution quick! - at least you can switch it to "custom edit" mode after generating the trees and remove the massive mesh from the scene..

      Comment


      • #33
        Hi!

        It's not yet a full solution, but I've been able to use the new Effects feature found in the current Forest Pack beta and use the same map used by the VRay Displacement Modifier to calculate the Z position of segments without you having to do any fiddly maths. This effect automatically derives the size of the scattered objects and perform the calculations necessary to match a displaced surface. Also it's linked to the modifier's Displacement Amount value, so the surface and the FP object will always be in sync. As you've pointed out, using this technique Surface > Limit By Altitude and Surface > Scale falloff commands still don't work, but I've also added some additional basic controls for this purpose.



        At the moment slope angle calculations still aren't possible but still this may still be helpful for some uses. You can read more about the effect and see how to set it up including a sample scene here http://docs.itoosoft.com/display/FOR...placed+surface

        Cheers!

        Paul
        Paul Roberts
        Training Manager - iToo Software

        Comment


        • #34
          Originally posted by Paul Roberts View Post
          Hi!

          It's not yet a full solution, but I've been able to use the new Effects feature found in the current Forest Pack beta
          Paul
          Oooooo! Scripting! Call me a happy camper. I might not use the UI at all anymore. I would add one more line of code though. Also link up to the VRay Displacment mod offsetvalue.
          Gavin Greenwalt
          im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
          Straightface Studios

          Comment


          • #35
            Originally posted by im.thatoneguy View Post
            Oooooo! Scripting! Call me a happy camper. I might not use the UI at all anymore. I would add one more line of code though. Also link up to the VRay Displacment mod offsetvalue.
            Good idea! I'll work on it
            Paul Roberts
            Training Manager - iToo Software

            Comment


            • #36
              Maybe in v2 of the effects framework you could let us load and read 3dsmax map values as well? I'm just thinking of something like.
              Code:
              mapRealWorldWidth = DisplacementPlane.width //assume square for ease at this point. 
              pixelUVWidth = 1/DisplacementMap.width
              pixelRealWorldWidth = pixelUVWidth*DisplacementPlane.Width
              DisplacementAmount = 1500
              fpItem.position.z = DisplacementMap(fpItem.distUVW.U, fpItem.distUVW.V) * DisplacementAmount
              
              //calculate points of 4 triangles off of the center sample... 
              
              Pzero = [0,0,DisplacementMap(fpItem.distUVW.U, fpItem.distUVW.V)*DisplacementAmount]
              Pone = [-pixelRealWorldWidth,-pixelRealWorldWidth ,DisplacementMap(fpItem.distUVW.U - pixelUVWidth , fpItem.distUVW.V - pixelUVWidth) * DisplacementAmount ]
              Ptwo = [pixelRealWorldWidth,-pixelRealWorldWidth ,DisplacementMap(fpItem.distUVW.U + pixelUVWidth , fpItem.distUVW.V - pixelUVWidth) * DisplacementAmount ]
              Pthree = [pixelRealWorldWidth, pixelRealWorldWidth ,DisplacementMap(fpItem.distUVW.U + pixelUVWidth , fpItem.distUVW.V + pixelUVWidth) * DisplacementAmount ]
              pfour =  [-pixelRealWorldWidth, pixelRealWorldWidth ,DisplacementMap(fpItem.distUVW.U - pixelUVWidth , fpItem.distUVW.V + pixelUVWidth) * DisplacementAmount ]
              
              //generate the four rays out from the center. 
              
              rOne = Pzero - Pone
              rTwo = Pzero - Ptwo
              rThree = Pzero - Pthree
              rFour = Pzero - Pfour
              
              // generate normal...
              
              N = crossprod(rOne,rTwo) + crossprod(rTwo,rThree) + crossprod(rThree,rFour) + crossprod(rFour,rOne)
              N = N*(1/length(N))
              
              fpItem.Slope = sin(N.z*pi/2)
              It would involve 5 map shader calls per point. But even at 100m trees 3ds max should be able on a regular workstation be able to generate 500m texture calls within 2-3 minutes.

              Or maybe, vlado if you're out there, there could be a framework to get it out of the vray plugin based on a triangle id/bary coord and use the RayIntersection code built into forestPack
              Last edited by im.thatoneguy; 23-02-2016, 12:21 PM.
              Gavin Greenwalt
              im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
              Straightface Studios

              Comment


              • #37
                Thanks for the idea, we have many plans for the new effects feature including the ability to read maps. We'll look at your suggestion and see what's possible for the next version.

                Thanks!

                Paul
                Paul Roberts
                Training Manager - iToo Software

                Comment

                Working...
                X