Planetside Software Forums

General => Terragen Discussion => Topic started by: decksounds13 on July 26, 2016, 11:31:06 PM

Title: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: decksounds13 on July 26, 2016, 11:31:06 PM
I want to be able to use V-Ray materials in Maya because I want to use my (3) gtx 1070's for rendering because they are so much faster than my CPU. Is there any way to export a file that I can load into Maya to use as a mask to add erosion/sediment?  Thanks so much!
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Dune on July 27, 2016, 02:06:40 AM
Never having done such, I would think Daniil's erosion shader would work to export maps. It can make maps, and if you project these on a black terrain and (ortho) render from above, without any fancy stuff like atmosphere and shadows, you end up with a series of maps in grey scale.
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: ajcgi on July 27, 2016, 05:54:50 AM
That would certainly work. I've wanted something like this for a while. Currently if you use the erosion plugin or World Machine to make your mattes in the first place, that's fine, but getting decent mattes out for use in other software or even in TG without those starting points is tricky.
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: decksounds13 on July 27, 2016, 05:54:07 PM
Thanks guys, I really appreciate the help.  I tried using Danil's erosion shader but I was blown away by the render times.  I made this with the world machine method and it took less time to build/export/import/render than waiting for Danil's shader to render alone.  I like the ability to get more instant feedback in WM because I'm new to this all and I like being able to see what the heck I am doing. 

I figured out how to export the WM maps, it was fairly simple... then I projected them with an orthographic camera.  WM exports 3 different erosion maps but I just combined them into one mask for the sake of experimenting.  This was my result.  I feel like the runoff might not line up correctly in some areas of the mesh.  Could this be due to the blend between the imported height map from WM and the procedural terrain in TG?

I should also mention that this hasn't made it's way into maya yet, I just dumped it back into TG to render it but being able to export the maps in any way was my goal...  I love the renders in TG and if I could have my way I would do most everything in the program and then composite other elements from Maya back into the scene but the renders take so much longer than GPU.  Maybe I can optimize TG more to get faster renders. 
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Dune on July 28, 2016, 02:22:21 AM
The patch size of a compute terrain sometimes messes things up when adding masks after that to terrain displaced before it. If you're able to take it out, you may also win render time. Otherwise reduce patch to 1m or so and see what happens.
Also, in initial terrains, I always (mostly) use a stretched Y to get the same fractal color over height, which is also handy when deriving maps through 'displacement to scalar' for lakes and such. 

And Daniil's shader only takes a lot of time for the first render, when memory is filled with data. Later it's faster.
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Oshyan on July 28, 2016, 02:48:40 AM
There is currently no direct way to export Terragen texture information, so even though there are methods to "visualize" the erosion flows and create masks out of it, you can't easily get it out of TG. The best you can do for now is a top-down orthographic render with neutral lighting (lighting straight above). TG is mostly intended currently as a procedural modeling *and* rendering tool, it is not so much designed for asset generation that gets exported to other apps for rendering. This does mean that performance can be limited vs. GPU rendering that is increasingly available in other apps, of course.

- Oshyan
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: digitalguru on February 28, 2018, 07:37:22 AM
Quoteso even though there are methods to "visualize" the erosion flows and create masks out of it,

That sounds interesting - how do you do that?

On extracting texture information - there is an easy way... render a top down projection and add Surface Diffuse Colour (before lighting)   tgSurfDiffCol Render element  and you get a perfect texture without any lighting
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Dune on February 28, 2018, 08:50:01 AM
You can activate masks/maps in the erosion shader and output to blue/red/green to scalar, and use color adjusts on those.
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: digitalguru on February 28, 2018, 10:15:27 AM
is this the Terragen erosion shader or Danii's plugin?
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Dune on February 28, 2018, 12:01:14 PM
Daniil's plugin. The heightfield erosion I never use.
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: digitalguru on February 28, 2018, 12:11:17 PM
thanks Dune - will have a play with the demo
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: Dune on February 28, 2018, 12:12:55 PM
You haven't yet? You'll be astonished by its possibilities!
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: digitalguru on February 28, 2018, 03:25:50 PM
Just having a play now - it's very nice... and fast
Title: Re: Is there any way to export erosion maps/masks to be used with V-Ray in Maya?
Post by: digitalguru on March 25, 2018, 11:58:43 AM
Just a found something interesting in the Terragen example scenes:

advanced_preset_scene_tutorial.tgd

Has a setup to extract a erosion/deposit map - uses a test from a non eroded - eroded version of the terrain and works without plugins.