Author Topic: Kirkjufell mountain  (Read 7263 times)

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Kirkjufell mountain
« Reply #15 on: March 02, 2016, 06:06:02 PM »
Quote
I am hoping that in TG4 we will be able to export from TG via vector

sounds interesting - what's that?

I thought you used vector maps to make your image?

Well I think that if we get it, then we will be able to export anything we make in tg as a vector displacement map, So we will be able to easily use TG as a way to create incredibly detailed brushes for sculptures and what ever other soft lets you use vector to displace. Also, I guess that TG will become much more useful for real time.

 8)
It has been eaten.

Offline digitalguru

  • Member
  • *
  • Posts: 337
Re: Kirkjufell mountain
« Reply #16 on: March 02, 2016, 06:40:52 PM »
 
Quote
I thought you used vector maps to make your image?
see what you mean now, long day yesterday...

yes, that would be very useful, it's a bit of a mission to export a mesh, clean it up and you always lose a little in translation.

don't think it would be a trvial thing to implement though

Offline inkydigit

  • Terragen Alpha Tester (Mac)
  • ***
  • Posts: 5175
  • 🍄🍄🍄
    • inkydigit's website
Re: Kirkjufell mountain
« Reply #17 on: March 02, 2016, 06:42:37 PM »
thanks for all info.. great job! :)

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14169
    • www.ulco-art.nl
Re: Kirkjufell mountain
« Reply #18 on: March 03, 2016, 06:55:08 AM »
Well, there is a 'displacement to vector' function, but it's not working (yet) for export.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3271
  • I'm the crazy one
Re: Kirkjufell mountain
« Reply #19 on: March 04, 2016, 06:15:47 AM »
Well, there is a 'displacement to vector' function, but it's not working (yet) for export.

You should be able to use that to colour a plane (luminosity channel) and render it with a camera looking down from above. The rendered image is then a usable vector displacement map, as long as you save to EXR to record negative values. But I haven't tried it.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14169
    • www.ulco-art.nl
Re: Kirkjufell mountain
« Reply #20 on: March 04, 2016, 06:18:01 AM »
Okay, thanks Matt, I'll do some experimantation.

Offline digitalguru

  • Member
  • *
  • Posts: 337
Re: Kirkjufell mountain
« Reply #21 on: March 04, 2016, 07:05:56 PM »
Hey Dune, The Badger and Matt,
I tried Matt’s suggestion to get vector displacement output from Terragen and it works.

First I tried regular scalar displacement, heres the Terragen render:
62966-0

and a Maya render of a flat plane displaced with an Exr from Terragen
62968-1

and a flat plane displaced with the same Exr in Mudbox:
62970-2

And also but not least!

The same terrain with some fake stones rendered from Terragen:
62972-3

and the Maya scene rendered with vector displacement on a flat plane:
62974-4

and finally a plane in Mudbox, using vector displacement  (using Absolute Tangent as the vector displacement type):
62976-5

Set up in Terragen as Matt suggested, the trick was to use a Displacement shader to vector piped into a Surface shaders luminosity, but making sure the Displacement shader to vector is taken before the Compute Terrain. Also, making sure the Plane object is sitting at 0 in Y coordinate.

Then used a Render Layer to isolate the plane so the terrain was hidden and did a top down ortho render out to OpenExr.

Works really well!

I used to use the Micro Exporter to get terrain geometry out of Terragen, and I just found a post from Paq about the vertex merging problem, I used a free program called Meshlab to fix those duplicate verts easily and also do a nice decimation, but the meshes from the Mudbox displacement are great, very clean and quads too! (a little on the large side though :-), but you can choose the level of detail you need.

I guess the same process would work with something like Zbrush too, once you've got the vector displacement map.

Here's a link to the Terragen TGD files if you want to have a play:
https://dl.dropboxusercontent.com/u/81475291/terragen_vector_displacement.zip

Graham
 
p.s vector map is rendered at 4k and a little detail is lost, but I like what it does to the fakes stones!
« Last Edit: March 04, 2016, 07:11:25 PM by digitalguru »

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Kirkjufell mountain
« Reply #22 on: March 04, 2016, 08:13:13 PM »
oh man. Its like christmas, only I did not need to be good at all, and winter is over too.

Which version was this added in?

Gonna down your files so I can see exactly how you set up the nodes so I don't waste any time wit dat   :D 8)

It has been eaten.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Kirkjufell mountain
« Reply #23 on: March 04, 2016, 08:18:22 PM »
Quote
p.s vector map is rendered at 4k and a little detail is lost, but I like what it does to the fakes stones!

We definitely need to have a max test too! At some point it needs to be known how many pix is needed to get a one to one result.
It has been eaten.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Kirkjufell mountain
« Reply #24 on: March 04, 2016, 08:19:54 PM »
Much thanks for this chain, guys!

 :-*
It has been eaten.

Offline zaxxon

  • Member
  • *
  • Posts: 1065
Re: Kirkjufell mountain
« Reply #25 on: March 04, 2016, 09:04:36 PM »
This is very, very cool! Almost an 'oh by the way', look what's just sitting there in TG. To be able to take TG terrains out to Mud and other DCC apps has been a problem for sure, but this may be the missing link to accomplish many things on my wish list. Thanks Digital Guru for jumping on this and providing the files.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Kirkjufell mountain
« Reply #26 on: March 04, 2016, 09:56:04 PM »
ok

This is a bit confusing to me. Was the same with bringing in vectors at first too though, so hope I will get this. (in the case of bringing in vectors, it took a bunch of nodes at first, but then someone figured that it only took two)

62980-0

So for the broken headed among us (mostly me) slow and steady now... How to make this work? I don't feel like I am seeing what was described.
It has been eaten.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3271
  • I'm the crazy one
Re: Kirkjufell mountain
« Reply #27 on: March 04, 2016, 10:31:08 PM »
Hey Dune, The Badger and Matt,
I tried Matt’s suggestion to get vector displacement output from Terragen and it works.

Living up to your name, Guru :)

Thanks for trying it out and confirming that it really works. This technique could be really useful.

I don't understand why it wouldn't work when connected after the Compute Terrain, but that suggests there could be a bug in Displacement To Vector.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Offline digitalguru

  • Member
  • *
  • Posts: 337
Re: Kirkjufell mountain
« Reply #28 on: March 04, 2016, 10:38:55 PM »
Quote
I don't understand why it wouldn't work when connected after the Compute Terrain, but that suggests there could be a bug in Displacement To Vector.

That had me going for a while, when I rendered the exr it looked like there was diifuse shading in the map.

Plugging it in before the Compute Terrain produced a render that looked like a proper greyscale luminance map (this was when I was testing a straight displacement to scalar before trying out the vector method)

Offline digitalguru

  • Member
  • *
  • Posts: 337
Re: Kirkjufell mountain
« Reply #29 on: March 04, 2016, 11:09:57 PM »
Badger.
No worries, here you go:
•   Set up your terrain displacements. In this instance, all of the terrain is defined before the Compute Terrain node. I haven’t tested it yet with any major displacement after that node.
•   Create a Plane object in Terragen.
•   Line it up so it covers the terrain you want to capture in X and Z coordinates, and covers the area needed. In this instance the Plane is 8000 x 8000.
•   Create a camera, set it to Orthographic and line it up over the Plane. Set the Ortho width to 8000 to match the Plane (and the Terrain).
•   Create a Displacement shader to vector node and connect it to the last node under the Terrain group before the Compute Terrain node.
•   Go into the Internal Network for the Plane, where you’ll find the Default shader attached to the plane.
•   Open up the Default shader and turn Diffuse Color down to zero, we only want to see the luminosity from the shader.
•   Create a Vector to Color node and pipe it into the Luminosity Function of the Default Shader.
•   Connect the Displacement shader to vector from outside the Planes internal network to the input of Vector to Color shader. Now the displacement from the terrain is piped into the Luminosity of the Planes shader.
•   Now go up a level into the Main node network.
•   This part had me going for a while, I could see the vectors projected on the plane successfully, but I thought I should move to the Plane up in Y so it would occlude the terrain in the final render. But the rendered image didn’t match the original terrain.  So I translated the Plane down to 0 in Y and it worked - not sure why! Maybe it’s because the Displacement tests against the ground level of the Planet to see what is positive and what is negative displacement, Matt would know more about this one.
•   So, make sure the Planes Y coordinate is 0.
•   All that’s needed now is to make only the Plane renders and not the Terrain.
•   Create a new group and move the Plane node into the group. Right click on the Group and select Group:Capture Nodes.
•   Create a new Render node and attach the Ortho Camera.
•   Create a Render Layer and attach it to the new Render node.
•   In the Objects tab of the Render Layer add the Group containing the Plane to Object Group 1.
•   Turn off Cast shadows and other rays for the Object Group 1.
•   At the bottom of the Objects tab, make sure Render is set to Invisible and Cast shadows and other rays is turned off.
•   The original terrain will now not be visible in the final render.
•   Set the Render node to a square format, for example 4096 x 4096.
•   Turn off Do Shadows, Atmos/Cloud Visible and set the output to OpenExr.
•   Render was relatively quick, I left Detail and Anti-aliasing to the defaults of 0.5 and 0.3, don’t think they are that crucial when rendering displacement for a map, but Matt can correct me on that one.
« Last Edit: March 04, 2016, 11:12:35 PM by digitalguru »