Author Topic: Mudbox displacement maps in T2  (Read 54653 times)

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #30 on: May 21, 2013, 05:21:09 PM »
You did, just seeking clarity. Thank you. And Im looking forward to your further posts!
It has been eaten.

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #31 on: May 22, 2013, 01:38:56 AM »
Hello guys,

j meyer : Yes from my test #3 seems to be the right result. I didnt had that much success using zbrush so far (doing simple terrain), I need to investigate a little bit more.

Anyway here's an other test, using modo.

This time I use heightfield. I have split the 3 rgb channel of the vector displacement in photoshop. While the setup is more complicated, the cool stuff is that you can insert erosion modifier before rebuilding the vector node. Please forgive the stupid example quality, I have no idea how to get the best result from the erodeV3 node. It's probably also possible to use worldmachine to erode just the blue (y elevation) channel (next test).

I know I will probably get some weird result, but it worths a try.

TheBadger : sorry I miss your question, in this modo terrain example the poly count doesnt matter that much, it's more the vector texture size you create that matters (2k image for those tests). There is no baking process like in zbrush/mudbox, you paint the vector displace on the fly, the geometry is there just as feedback. The flip side is that the sculpting process is a little bit rough. Next step is to use zbrush or Mudbox.

43115-0
« Last Edit: May 22, 2013, 12:48:52 PM by paq »
Gameloft

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #32 on: May 22, 2013, 01:54:48 AM »
Paq, please test Mudbox. Zbrush has lots of users who post tons of stuff on the net. But it can be more difficult to find information from mudbox users. Also, I use mudbox, so it will help me more  ;D Just a little selfishness on my part  ;)


By the way... Does everyone see that cave! I see it! I guess this answers a post from a while back about how to do caves... Also I think it answers my question about making scales (like reptile scales)
I always wanted to do one of those fantacy scenes where a giant fell asleep and became part of the earth. But I could do a dragon now! Thats pretty great.

Thanks guys. Please keep going! Ill join in better once these models are finished... For what I will be worth ::)
« Last Edit: May 22, 2013, 02:00:02 AM by TheBadger »
It has been eaten.

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #33 on: May 22, 2013, 02:24:33 AM »
Hi TheBadger,

Sure mudbox will be my next target. I love zbrush sclupting tools, but for 'simple' terrain job Mudbox seems good enough, and I'm pretty sure I will get less map exporting trouble.
And yes that's the whole point of vector displace map, be able to export outcrops details, something that simple elevation displace cant do of course.

I was more concern about adding this erosion stuff into the game, but this split method seems to give some result, not the most technical accurate one that's for sure :)

Gameloft

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Mudbox displacement maps in T2
« Reply #34 on: May 22, 2013, 09:38:29 AM »
The way I create a mask for erosion channels in TG2 is as follows:

Create 2 starting points:

1) Heightfield generate 01 -> heightfield shader 01 -> displacement shader to vector -> length to scalar
2) Heightfield generate  01 -> heightfield erosion -> heightfield shader 02 -> displacement shader to vector -> length to scalar

Then subtract those from each other using a "subtract scalar".
To the subtract scalar you attach a "colour adjust shader", using this shader you can adjust the colour range of the output from the subtract scalar operator as the length to scalar operator can give values much greater than 1 (since displacement "direction" component is removed and only "magnitude" is converted to a scalar value")

The output of the colour adjust shader now contains your mask for erosion channels.

Now you can just continue building your scene with the output of the eroded heightfield and for example mask stones/sediments using the erosion channel mask.

Cheers,
Martin

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #35 on: May 22, 2013, 02:49:49 PM »
Hi Martin,

Thanks a lot for this erosion mask workflow, I would never figure that out by myself !
(and thanks your constant participation to this forum, I think 90% of the stuff I've learned is coming from your posts, and Dune of course :) )
« Last Edit: May 22, 2013, 02:52:04 PM by paq »
Gameloft

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #36 on: May 22, 2013, 03:25:07 PM »
It's even worse than expected,mumble,grumble,grumble,gnarrrrf.
I'll show you with the help of some examples.
First let me explain something:when you start sculpting from a basemesh you go up
in subdivisions and change the basic shape(you sculpt) and that changes the low poly
basemesh as well and therefore I made 2 VDisp maps one for the altered basemesh and
one for the original basemesh,which was a sphere in this case.






Edit:the prepass of this(VDisp-version) also just shows a sphere not the displaced shape.






The last one is lit by a sphere with luminosity to show that the detail is there
and to confirm that it is not due to a faulty VDisp map.
At the moment I'm rather clueless as to what is causing this.
Let me know if you need more explanations.
« Last Edit: May 22, 2013, 05:01:38 PM by j meyer »

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #37 on: May 22, 2013, 03:30:17 PM »
paq - If you still have the exr of your first example (on page 1) could you please test
        if the shadow of the overhang is there and correct,I could not see that in your pic.
        I'd guess it is correct,but just as a confirmation.
« Last Edit: May 22, 2013, 03:31:49 PM by j meyer »

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #38 on: May 22, 2013, 05:04:46 PM »
Hey guys. Really great stuff here! 8)

Just wanted to suggest that the high polly always be imported into terragen and rendered. Otherwise what are we testing against? We cant compare T2 to mudbox, zbrush, mentalray, vray. Only contrast.

But if we render the high polly, and low poly with maps in T2, than we can really have some useful information to compare.

Sorry if thats what you did and I didn't see it, J.
But I thought that you showed several attempts at the low polly with maps? But what does the perfect high polly sculpt look like rendered in T2, so we can determine the amount of success?.. Against the best result at a displaced low poly...

No complaint here, this is awesome development! just wanted to talk about more clearly documenting the proof. 8)


Also, the last image in your set, J. Looks rather good is that the sculpt, or a displaced low? If its displaced in some way I am saying thats pretty successful!
« Last Edit: May 22, 2013, 05:11:55 PM by TheBadger »
It has been eaten.

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #39 on: May 22, 2013, 05:11:48 PM »
Of course you're right,Michael,I simply forgot to do that and will add it later today or
tomorrow.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #40 on: May 22, 2013, 05:12:44 PM »
Ah, lol did not know you were on. Thanks a ton J! Cheers to you.
It has been eaten.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3545
  • I'm the crazy one
Re: Mudbox displacement maps in T2
« Reply #41 on: May 22, 2013, 10:37:36 PM »
The problem here is the ray traced shadows. Terragen's ray tracer cannot see the displacements on imported objects, so the shadows don't work properly. This is something we'll address in future.

It works with terrains because the Planet, Sphere, Plane, Disk and Lake are built-in displaceable primitives that are rendered differently.

Matt
« Last Edit: May 22, 2013, 10:45:31 PM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #42 on: May 23, 2013, 03:31:35 PM »
Thanks Matt,good to know.I began to suspect that after a render with cast shadows
turned off.


Here is the high poly for comparison

Rendered under the same conditions as the ones before.

And the one with cast shadows off   Edit:this is the same as Normals VDisp in the
post above,2nd pic



Yes,the yellowish one was a displaced one ,too.

paq - some more info about the mapping variants you used in modo and TG would be
        really helpful.Was it planar mapping for example or something else?


« Last Edit: May 23, 2013, 05:41:40 PM by j meyer »

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #43 on: May 23, 2013, 04:14:38 PM »
Hello,

Quote
paq - some more info about the mapping variants you used in modo and TG would be
        really helpful.Was it planar mapping for example or something else?

I'm not sure to really understand you question. For the shadow, I dont have any trouble as I'm using the vector diplacement map on the planet.
I'm using the image map shader with a plane Y projection type.
Gameloft

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #44 on: May 23, 2013, 04:41:16 PM »
Thanks paq,that (plan Y) was my assumption.But what was the mapping in modo?
In ZB you have to have UVs and the mesh in,at least,2 different subdiv levels to generate
a disp map.And the UVs need a mapping,too.So if I'd map a plane it would be planar
mapping for instance.I'm asking,because I've tried to do what you did and failed with
my ZB generated VDisp map and thought I might have been using the wrong mapping
to project it onto the planet in TG.
Little success with the heightfield method also,half of the displacement was negative and
the other half positive and other strange results.
Do you have the opportunity to try with a ZB VDisp map yourself,maybe?