Home Technical Talk

animated grass generator script

polycounter lvl 8
Offline / Send Message
MaVCArt polycounter lvl 8
hi everyone!

so i'm working on a script for a school assignment, namely an animated grass generator script, that generates growing grass out of user-defined points, splines and surfaces. you can select different grow modes and grass strand types.

it's in a very early stage still, and actually barely doing anything at the moment other than generate some clich

Replies

  • TorQue[MoD]
    Options
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    So this is for an animation of grass growing, not grass moving in the wind? Very interesting, if not a little bit special use.
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    new update released, very big functionality update!
    Version 0.3 now features lots more control for the user, though there are still a lot of dead ends that need to be fleshed out. (it's a big script, and it's not the only thing i'm working on :p )

    read the update here:

    http://www.scriptspot.com/3ds-max/scripts/animated-grass-generator-script

    installation instruction are in the description

    TorQue: to answer your question: yes, it's for generating growing grass, but that same grass will also feature the ablility to move in wind that is user-defined. in the final version you will be able to choose between the two OR combine them. if you combine them, though, the grass won't start moving in the wind until AFTER it stops growing. for now, i'm keeping it that way to steer clear of any animation issues that might come up. there's a lot of parameters and I really need to clean up the mess :p

    the final use would be to be able to generate beautiful realistic grass in different resolutions for different applications, ranging from animation to real-time. the user will be able to define his own forces to simulate wind, and i'm working to find a way to simulate the characteristic "waves" in the grass. the problem with this is that it's kind of hard to do this using a wave modifier on top of a volume select, since the script doesn't know what kind of volume the user is working with.
  • TorQue[MoD]
    Options
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    That's really interesting. I'd suggest you post on the UDK forums as this might eventually be a useful alternative to speedgrass if you can actually use it for real-time rendering without a huge performance hit.

    Funny that no one else on polycount here seems to have noticed the post, they're usually great at replying to things like this.
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    i'll be sure to do that, but I doubt I can compete with speedgrass :p it's a school project, but since this apparently has attracted some attention over at scriptspot, i'm certainly going to finish it to as far as I can, if not for my school exam, than certainly this summer.

    yeah well, it is what it is :p
  • Eric Chadwick
    Options
    Offline / Send Message
    Very cool idea. Sounds like a great project!
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    new update, you can now grow grass perfectly functional, but only one type of strand is yet available.

    http://www.scriptspot.com/3ds-max/scripts/animated-grass-generator-script

    how-to-use video coming this evening
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    hi guys, i'm working on my script, and I'm planning on creating the opportunity for the user to load audio files, which then get their frequency sampled to determine the scale of the grass strands, enabling the user to instantly generate a music video with animated objects. (yes, a new feature is custom geometry: you can now also load custom models to quickly populate a scene with you own models)

    my question for you guys is: how do you sample the frequency of an audio file in maxscrpit? i've searched around the internet and in the maxscript help library but so far I haven't found anything useful i'm afraid...
  • TorQue[MoD]
    Options
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    Wish I knew sorry. Definitely sounds like a cool feature though.
  • iconoplast
    Options
    Offline / Send Message
    iconoplast polycounter lvl 13
    I did find a few things that might help you. One is a thread on cgtalk: http://forums.cgsociety.org/showthread.php?t=516395 and the other is a script that seems to do at least something similar to what you want: http://www.scriptspot.com/3ds-max/scripts/fftmax Hope that helps!
  • havardsc
    Options
    Offline / Send Message
    Do a google/maxscript helpfile search for audio float controller

    maybe this could help
    http://forums.cgsociety.org/showthread.php?t=281837
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    thanks for the links guys, i'll look into them.

    I currently went with loading a video file from which the value gets sampled, which also works, but it's incredibly slow and heavy for the system so I have to find a way to create a video frame buffer that pre-loads the video file before I go and sample the pixels.
    anyone any idea?
  • MaVCArt
    Options
    Offline / Send Message
    MaVCArt polycounter lvl 8
    anyone has any idea on this? my script is pretty much done for my examn, and the video pixel sampling works, but it's incredibly slow, so I need to find a way to pre-load the video file before starting to sample it.
    or if anyone has another suggestion to sample heightmap sequences, those are welcome too :)
    i'm going to check out audio too, but I don't have the time anymore before I have to turn this in for my examn, so that'll be for my summer planning :)
Sign In or Register to comment.