Home Technical Talk

Place gravel in maya without dynamics?

polycounter lvl 14
Offline / Send Message
sltrOlsson polycounter lvl 14
I'm about to create a gravel texture for a scene. My thought was to create about 10 different gravel stones and optimize them fairly heavy. Then place them randomly and scattered so that i can bake textures from them..

My first thought was to use the dynamics in maya, but it's so slow when you have like 400 objects colliding with each other. And placing them by hand will just be a time killer of huge measurements..

Thought about placing them in zbrush in the 2.5D space and tile it right away. But that also feels a bit time consuming.

Do you have any ideas? Any nifty program that calculate dynamics in CUDA maybe? :D I guess i could make them collide with just the bounding box to..

Replies

  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    My thoughts would be dynamics as well. Use proxy items/bounding box for collision. Could maybe even try using particles and the instancer?
  • JohnnyRaptor
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    isnt there some brush in paintfx that lets you paint place a collection of random objects?
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    @ kodde, the instancer? Haven't used particles or dunamics that much. Tell me more about this instancing machine your are talking about! :)

    @ You'r right, or i think it's in the bonus tools.. I'll check that out!
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Instancer lets you select one or more polygon meshes which you connect to a partileShape (if I'm not mistaking). You can then have the meshes controlled in any manner you can control particles. The smaller shards are 3 or 4 different chunks which are controlled by dynamic fields.[ame=http://www.youtube.com/watch?v=Rt7gPdD3h3c]Here's an example where it can be useful[/ame]

    On second thought I'm not sure that it would be a useful solution for what you want to do since getting the gravel to be packed and lie still on a surface could be an issue with a dynamics simulation using this method. You can could try it though. You can make the particles collide with a polygon mesh surface, tricky part is having the particles collide with each other. This can be done by having each of the particles having a distance based field of its own which would push other nearby particles away.

    Like I already mentioned a solution like this would probably have troubles with particles landing on each other causing a jittering movement on the ground. But this might not be a problem after all since you just want to capture one interesting frame and render it from above I guess?

    There's probably an easier solution -_-
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Here's another example of the instancer. But I doubt that some of these particles are not lying on top of each other.

    EDIT:

    Whoops, forgot the link. [ame]http://www.youtube.com/watch?v=NHxZY2gfqpA[/ame]
  • tharle
    Offline / Send Message
    tharle polycounter lvl 9
    you could try something like this: http://vimeo.com/5147726 and then randomising the rotation and scale with a script if things look too uniform?

    i remember doing the set dressing tutorial video from digital tutors and using a similar method to place rocks on a beach.
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    @kodde, that's cool! Seams to be very useful for animation but a bit of a hassle for this..

    The paint geometry tool looks really cool! I think that might be the solution!
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Okey, tried out the paint geometry tool, it's a bit strange but this is what i got.. Obviusly i need to test the paint tool more so that i understand it, but it feels like a good start (: Thx for the help!

    Here is it baked btw..

    ipqzx5.jpg
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Sweet. I've got an itch to try that as well now :)
  • ivars
    Offline / Send Message
    ivars polycounter lvl 15
    You could also use dynamics, but don't do all at once. Do like 50 objects at a time. Once they're still, use them as a passive rigid body and drop another 50 active on top. Or whatever number suits your hardware :)
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    @ivars, haha just realized you tried to tell me that when we did the exploding wall in fused. I still here it ecco in my head :P

    But you'r right, that must be the easiest way! Thx a bunch! (:

    @Koode, GO! :D
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    sltrOlsson> I saw you posted your gravel results in the WAYWO thread in P&P forum. Care to let us in on how you created your results? Is it tileable and how did you manage this?

    Thanks.
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Hey! Yeah, i went with the dynamics after all.

    Placing stuff with the brush script was annoying course it was buggy.
    I found an other script that placed the mesh all over a target mesh randomly.But that just made the stones just look flat, and some of them where on the same position, wich look really ugly.

    And at first i wanted the whole trail module to have unique stone details, stupid, so i did a tileing texture instead.

    This is how it goes,
    • Create 5 HP-ish stones
    • Create 40-60 tris lowpolys for them and bake normal map, AO and mask.
    • Drop them with dynamics about 250 at the time. I did a "mold" that was 10*10 units so that i could drop them into it. Built it up layer by layer with stones. When on layer was dropped and placed nicely, i duplicated them and made them static rigid body. (Didn't find a proper way to convert them to static without duplicating them and combing them and then make them a static object)
    • When I was happy with my stone pile, that was about 2000 objects, i duplicated it around my first pile so that i would bake properly.
    • In xNormal i baked a regular AO and hight out. Then i applied the normalmap to the highpoly stones and baked a base texture. Then i did the same with the AO and the mask.
    • Combined the HP-baked AO and the actuall AO from my 2000 stones and started texturing.

    I hope that makes some sense :P I can make a quick series of screen grabs when i come home if that's interesting.

    28as5me.jpg
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Cool, thanks. Never thought about simulating in iterations. So simple yet clever :)

    Never understood how did you get it tiling though?
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Does this explain it better? Or is it just retarded? :D

    400th post btw. Woooho, fuck yeah! :D

    [EDIT] Rewrote the text. Don't make tutorials 2.30 in i morning :D

    GravelTut.jpg
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Thanks sltrOlsson!

    I'm gonna give this a go.
  • Visceral
    Cool stuff :D i have to try this, i wonder if this could work for grass too.
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    :)

    @Visceral, how would you go about? Sculpting grass, making a plane with alpha and normals? Place it and bake it? I thought about if their was a way to bake grass properly the other day. Would be awesome if it works!

    If you test it out, would be cool to see know how you succeed! :D
  • Eric Chadwick
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
Sign In or Register to comment.