Author Topic: Trees - Mesh displacer  (Read 4022 times)

Offline zaxxon

  • Member
  • *
  • Posts: 1129
Re: Trees - Mesh displacer
« Reply #15 on: October 21, 2014, 05:07:14 PM »
Sigh... that would've been nice.  Still, at some point we may have alembic support and while that means creating motions outside of TG, it would provide a means to render wind movement. It continues to amaze me that buried within this app are the potential controls to duplicate so many natural events and that we're even able to discuss such possibilities. Remarkable!

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Trees - Mesh displacer
« Reply #16 on: October 21, 2014, 07:37:21 PM »
^^Like a princess in a chastity belt. :P
It has been eaten.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3578
  • I'm the crazy one
Re: Trees - Mesh displacer
« Reply #17 on: October 24, 2014, 07:06:43 AM »
That was my line of thinking, and yesterday I did a small experiment, but too short to see what's going on; using a vdisp shader (X displace) setup with minimum height and an X moving PF (for gusts of wind movement), taken through transform shader. I have to try again, as that opens good posibilities. If it doesn't work, maybe it can be made to work (Matt?), like the pop coloring.

What you're asking for requires either displacement on ray traced objects (in fact, *huge* displacements compared to the size of the polygons, which would bring any ray tracer to a crawl), or render-time vertex deformation on each instance. The latter means we are no longer doing instancing, because each object has a different form. The deformed object has to be stored in RAM somewhere for ray tracing. So either you completely lose the RAM-use efficiency of instancing, or we need a clever cache that generates deformed instances when rays hit them, and clears them out of RAM when they are no longer needed. It would also be incredibly slow if every single vertex in every instance needed to be deformed. To avoid this, we'd need to introduce an LoD scheme for plants that have high vertex density per pixel. Making that work efficiently is a major R&D project, but I would like to attempt this.

« Last Edit: October 24, 2014, 07:18:02 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline Dune

  • Member
  • *
  • Posts: 15196
Re: Trees - Mesh displacer
« Reply #18 on: October 24, 2014, 08:53:08 AM »
Thanks for clarifying, Matt! Too bad it's not that easy. The best thing that would work now is mesh displace several pops of the same object spaced for a natural wind effect (with a time lag between the movement of instances in each pop), and if directional movement is required a max rotation of say 100 of the instances.