Planetside Software Forums

General => Terragen Discussion => Topic started by: TheBadger on May 17, 2013, 02:25:30 PM

Title: Mudbox displacement maps in T2
Post by: TheBadger on May 17, 2013, 02:25:30 PM
Hello,

Several things I need to ask about in this post.

First off, does anyone here have mudbox (or zbrush perhaps) or can you get a test copy in order to help answer these questions?..

The set up:
When using high poly sculpts in maya from mudbox users use the low polly version of the sculpt in maya. Before rendering in maya (mental ray) smooths the model and applies mudbox produced maps to the low polly. The rendered version is a close representation of the high polly sculpt.

The questions:
What I would like to know, has anyone used a displacement map (or even a bump map) from mudbox (or any sculpting software) on a low polly object in Terragen2?

I am willing to create and provide some simple objects and sculpt maps for testing. But one problem is that the displacement maps I have produced do not look right to me. So it would be really great if someone with more experience than I have, could participate here.

Mudbox can produce 32bit maps.

What I am trying to figure out, is if by using RTO off, I can get a low polly model to look like its high polly sculpt in T2.
And
More simply, if I can use a mud box created displacement map in T2 in any capacity.

One more thing:
One immediate reason none of this is clear to me, is because a displacement map in T2 is a grayscale map. But a map generated from mudbox is Black and red, in appearance.  ???

Again, I would be willing to post some materials for testing for those of you who understand all of this, but perhaps just don't have a sculpting program on hand.

Thanks guys.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 17, 2013, 04:03:07 PM
...One immediate reason none of this is clear to me, is because a displacement map in T2 is a grayscale map. But a map generated from mudbox is Black and red, in appearance. ...

Are you shure you are talking about a displacement map and not a vector displacement map
here?
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 17, 2013, 04:18:43 PM
No Im not sure, now. I will look into this!

But while were here, what would that mean?
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 17, 2013, 05:26:37 PM
There is a difference between those (you'd have to read up on that yourself,though) and not every
software is able to read vector displ maps,it's a fairly new technical addition to sculpting and
modeling apps,as far as I know.
TG2 has something that is called vector displacement,too,but that is a TG internal shader and
doesn't make TG capable of reading vector displ maps,again as far as I know.
Title: Re: Mudbox displacement maps in T2
Post by: Matt on May 17, 2013, 10:40:18 PM
TG2 has something that is called vector displacement,too,but that is a TG internal shader and
doesn't make TG capable of reading vector displ maps,again as far as I know.

Vector Displacement Shader can be used with Image Map Shader to work with vector displacement maps, but might need some parameters to be tweaked depending on the format of the vector displacement map.

Matt
Title: Re: Mudbox displacement maps in T2
Post by: gregsandor on May 18, 2013, 02:46:20 AM
When can we expect displacement on models with raytracing?
Title: Re: Mudbox displacement maps in T2
Post by: paq on May 18, 2013, 05:54:53 AM
TG2 has something that is called vector displacement,too,but that is a TG internal shader and
doesn't make TG capable of reading vector displ maps,again as far as I know.

Vector Displacement Shader can be used with Image Map Shader to work with vector displacement maps, but might need some parameters to be tweaked depending on the format of the vector displacement map.

Matt

Tweaked like inverting color channel order ? I'm affraid my math are really poor to make anything more advanced :S
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 18, 2013, 02:26:28 PM
.......

Vector Displacement Shader can be used with Image Map Shader to work with vector displacement maps, but might need some parameters to be tweaked depending on the format of the vector displacement map.

Matt


Thanks for the insight on that.
Does that mean the image map shader accepts 32bit images? If so,which format(s)?
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 18, 2013, 02:48:49 PM
TG2 has something that is called vector displacement,too,but that is a TG internal shader and
doesn't make TG capable of reading vector displ maps,again as far as I know.

Vector Displacement Shader can be used with Image Map Shader to work with vector displacement maps, but might need some parameters to be tweaked depending on the format of the vector displacement map.

Matt

Tweaked like inverting color channel order ? I'm affraid my math are really poor to make anything more advanced :S

To change the order of colours you can split the output into a "red to scalar" + "green to scalar" + "blue to scalar".
Now each channel is split into a scalar value.
You can then recombine these scalar values into any desired order by connecting them to a "build colour" or "build vector".
Depending on what type of data you need you may need to convert from one datatype to the other using a "scalar to vector" node for instance.

.......

Vector Displacement Shader can be used with Image Map Shader to work with vector displacement maps, but might need some parameters to be tweaked depending on the format of the vector displacement map.

Matt


Thanks for the insight on that.
Does that mean the image map shader accepts 32bit images? If so,which format(s)?

I don't know exactly which formats are accepted, but I usually use .SGI.
There's a free SGI-plugin for Photoshop around, easy to find.

Cheers,
Martin
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 18, 2013, 04:00:31 PM
....

I don't know exactly which formats are accepted, but I usually use .SGI.
There's a free SGI-plugin for Photoshop around, easy to find.

Cheers,
Martin

Thanks,I know that plugin and have used it with 16-bit stuff for heightfields iirc.
Didn't know,though,that it works for 32bit and the image map shader,too.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 18, 2013, 04:27:39 PM
Ok, There seems to be enough interest in the basic premise. So Ill try to think of something to model that people may want to have, besides the question stuff. Ill do a sculpt and produce all the maps mudbox makes and post it all.

Probably thats the best way for everyone to see the issues in the same way at the same time. Will start today and hopefully finish by Monday.

How does some decorative Roman era columns sound? I think they would be nice in a lot of garden renders. Been meaning to do this anyway, so this is as good a reason as any to get started.

Thank you for the discussion guys, I appreciate it.

Title: Re: Mudbox displacement maps in T2
Post by: paq on May 18, 2013, 08:03:34 PM
Hello,

So yes, vector displacement works !

I'm using OpenEXR Float32 format in modo.
There is just an Green/Blue switch to do in Terrragen.

Of course the image has to be set as linear in the image map shader.

Finally I had to tweak the final multiplier setting form the vector displacement shader.
I had to push it up to 250, not sure about the rules here.



[attachimg=1]
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 18, 2013, 09:11:35 PM
GREAT! Thanks for sharing your proof, paq! This is going to be fun :)

What is the polly count of the object the maps were made from?
Title: Re: Mudbox displacement maps in T2
Post by: Matt on May 18, 2013, 10:16:10 PM
Tweaked like inverting color channel order ? I'm affraid my math are really poor to make anything more advanced :S

I was thinking reversing/negating the values or perhaps applying an offset of -0.5 (so that mid grey becomes 0). There are options to do those things in the Vector Displacement Shader.

Perhaps I should add options to swap channels too.
Title: Re: Mudbox displacement maps in T2
Post by: Matt on May 18, 2013, 10:19:03 PM
Thanks for the insight on that.
Does that mean the image map shader accepts 32bit images? If so,which format(s)?

Yes. EXR.

Matt
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 19, 2013, 02:45:25 AM
Ok, so it turns out I did have a little experience with vector maps. In mudbox they are a way to get and repeat intricate details with overhangs, quickly.

With respect to overhangs, will this work (essentially) the same way in T2? So if in paq's example there were (for example) scales where the edge was slightly lifted, this would come through correctly, on a terrain or otherwise? Im guessing yes.
Title: Re: Mudbox displacement maps in T2
Post by: Matt on May 19, 2013, 08:21:07 AM
When can we expect displacement on models with raytracing?

We have a roadmap for achieving that. My best estimate is about 1-2 years from now if we stick to the plan. However, much sooner than that we will provide options for selecting which objects are ray traced and which are rendered with the micropolygon rasteriser with displacement.

Matt
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 19, 2013, 02:40:50 PM
Did a first try with ZBrushs VectorDisplacementDiagnostic files,but all I got were
lots of Bucket errors and vanishing geometry.(The disp map is exr by default btw)
Will try again and report back here.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 19, 2013, 02:52:08 PM
Paq, thanks for sharing that result. Good to know such things are possible :)
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 19, 2013, 06:07:44 PM
Quote
... However, much sooner than that we will provide options for selecting which objects are ray traced and which are rendered with the micropolygon rasteriser with displacement.

Matt

Matt, Do you know yet if that will be per object or also per population? Will we be able to do it to an object and a population of a different object at the same time?
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 20, 2013, 05:30:45 AM
[attach=1]

[attach=2]

Its crappy. I spent nearly 8-10 hours modeling a replica of the complex grounds of "the temple of Zeus", in Athens. And then got an unknown error in Maya. All was lost. I had two versions. 1 was rather literal. And the other was a creative departure. I added some things I thought would be nice, including a ornate pool. Was going to make a mask of the pool shape to displace the terrain with, so it would be easier to fill with water...

Restarted it this evening, but only concentrated on the columns. Ill get back to the complex this week. But will share the columns as soon as one is finished.

The columns here are a departure from the source inspiration, which are corinthian. I went with a more roman meld of Ionic and Doric.
Not finished modeling yet, and then have to detail/sculpt. But at the very least you'll be able to make something like this:
http://upload.wikimedia.org/wikipedia/commons/1/1f/National_Capitol_Columns_-_Washington,_D.C..jpg
If not something more complex in arrangement.

I'll include the low polly with high polly masks, as well as the high polly sculpt... Incase we cant get the maps to work for some reason... And for close ups.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 20, 2013, 02:53:32 PM
Yes! ;D It works great,all I had to do was to activate the 'Data is linear' option.
Thanks to paq for pointing that out.
Nothing else necessary.
[attachimg=1]
The number below the perfect sphere is the value to be entered in ZBs export
settings and then everything will be automatically flipped and swapped on
export.
Thanks Matt and anyone else involved,great feature!
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 20, 2013, 02:59:53 PM
^^
Pardon my brain hole, J. But what is being demonstrated in the image you posted? I don't understand what the object in the render is.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 20, 2013, 04:38:55 PM
It's a test object you use to import into your rendering app of choice to see which
settings (of 48 possible) you have to choose in ZB for export.Maya needs other
settings than max or modo or whatever.So instead of going through all 48 posssible
variations you just export the given test files (1obj/mtl,1bmp,1exr) import them into
your rendering app load the exr into a material(or in this case the image map shader
connected to the VDisp shader) and render.One of the 48 little blobs (no disp)
should render to a perfect sphere then.In this example it should be the one with the
number three below it and like said before:
"The number below the perfect sphere is the value to be entered in ZBs export
settings and then everything will be automatically flipped and swapped on
export."
Hope it's more understandable now
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 20, 2013, 04:50:46 PM
Thanks for the info meyer :)

I wonder though, what about #48 then? That looks "spherish" to me too? #20 has a glitch in the shadow, but looks quite correct too.
Not really relevant, just wondering.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 20, 2013, 05:08:14 PM
Take another look ;)
Seriously, #48 is not a sphere,you can see that by looking at the shadow line
(light is default btw).#20 ditto,I'd say.
Maybe I'm wrong,we'll see when I perform the next test later today.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 21, 2013, 02:36:40 PM
Just wanted to say Im still working on the models. Since Im going to share, I want them to be as nice as possible. And I guess, despite how important something feels to me when I first think of it, there is not really a reason to rush.  ;D

Besides, my wife will give birth this week or next, so things are a bit crazy around here  :o  :)
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 21, 2013, 03:25:00 PM
Take your time and good luck.


#3 was the right one.
Now for the bad news,there are some issues I didn't notice and/or think of yesterday.
Look at the no disp and the vdisp again and you'll see the shadows are the same.
I think Richard (cyphyr) had that happening before with displaced planes iirc.
It becomes more obvious when rendered bigger or with protrusions and so on.
That's of course not really desirable for object rendering.But there's nothing you
can do about it as a user,except cheating or tricking the eyes or postwork maybe.
Another problem is the fact that low poly objects can have pretty bad shadows also,
talking about the shadows that are on the object itself here,when the poly resolution
is too low.So one has to find the right balance.In other rendering apps you would simply
add some subdivision levels,preferably on rendertime,to solve that,for use in TG you have
to try with different polycounts to see what works best for your purposes.
ZB users will have to deal with ZB not exporting normals (less mb,smaller obj files) and
TG2 not generating normals on imported objects (other apps do that btw).There are
workarounds so it shouldn't be much of a problem.
Didn't get to test everything thoroughly yesterday,so some more tests are required.
Will keep you posted.

Does TGs renderer use smooth uvs internally?

Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 21, 2013, 03:35:41 PM
J, higher polly counts in objects will nearly always improve appearance anyway. In Mudbox to maya, I have found that if the low polly is increased at least one smoothing level above the base, and then Mudbox maps are rendered to that, the quality is increased compared to the absolute lowest level model (mental ray)... If that makes sense.

can you post a render of what your seeing, because people will have different tolerances to what is acceptable. Maybe the issues you are seeing will not seam so bad to us?

Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 21, 2013, 04:53:22 PM
It makes sense and I thought I was refering to that already:"In other rendering apps you would simply add some subdivision levels,preferably on rendertime,to solve that...."

I'm preparing some pics to illustrate,it just needs some time.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 21, 2013, 05:21:09 PM
You did, just seeking clarity. Thank you. And Im looking forward to your further posts!
Title: Re: Mudbox displacement maps in T2
Post by: paq 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.

[attachimg=1]
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger 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 ::)
Title: Re: Mudbox displacement maps in T2
Post by: paq 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 :)

Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe 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
Title: Re: Mudbox displacement maps in T2
Post by: paq 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 :) )
Title: Re: Mudbox displacement maps in T2
Post by: j meyer 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.

[attachimg=1]

[attachimg=2]

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

[attachimg=4]

[attachimg=5]

[attachimg=6]
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.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer 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.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger 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!
Title: Re: Mudbox displacement maps in T2
Post by: j meyer 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.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 22, 2013, 05:12:44 PM
Ah, lol did not know you were on. Thanks a ton J! Cheers to you.
Title: Re: Mudbox displacement maps in T2
Post by: Matt 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
Title: Re: Mudbox displacement maps in T2
Post by: j meyer 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
[attachimg=1]
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
[attachimg=2]


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?


Title: Re: Mudbox displacement maps in T2
Post by: paq 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.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer 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?
Title: Re: Mudbox displacement maps in T2
Post by: paq on May 23, 2013, 07:20:36 PM
Hi J.,

Got something working very well with mudbox.

1) Use the standard plane primitive to build your terrain
2) Create a second plane, used as target for the projection

Go into UVs&Map, extract, and choose vector displacement :

I have post the setting I used (nearly default one, except that I switch on the smooth target model ... not sure if it's needed).

Out of the box, the map should work fine in the terragen vector displacement node.
There is a little bit of banding effect, not sure where it's coming from.

Title: Re: Mudbox displacement maps in T2
Post by: paq on May 23, 2013, 07:32:25 PM
Btw I had some trouble with zbrush too, but I dont know it very well.

First the standard zbrush plane has either no uv, or strange uv arrangement, so I give up and import my own plane inside Zbrush (subdivided 4 times +-), and with a planar uv map on it (so uv = square 0-1).
The plane was oriented as the ground in my 3d app, not sure if that's matter.

Before sculpting you have to store a morph to freeze the initial plane state.

Start to sculpt your terrain.

When it's done, come back to level 0, restore the morph, and export your vector displacement.

I dont have zbrush here, but I think I disable everything in the option except the floating point one (so no tangeant displace, no uv smoothing)

I got some weird effect on the extreme border of the terrain, but except that, it was working fine in terragen.
I didnt change anything in the vdm setting inside zbrush, but I did some revert channel inside terragen until it works :)
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 23, 2013, 07:52:50 PM
Thanks for the info,gonna try again now.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 23, 2013, 09:00:58 PM
Thanks again,got it working now! ;D
Not sure as of yet what it was,though,maybe later.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 24, 2013, 01:23:51 AM
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

Ok a little clarification for my brain hole, please...

So when using a map for the terrain, then a vector map is ideal. And will render well with RTO on.
However, for objects, a vector map should not be used, instead use a displacement map with RTO off.
A object with displacements maps, will (or can) render shadows properly. Regardless of what soft generated the maps.

Correct?

@paq
That looks great!
Out of simple curiosity I wonder how long it would take someone to reproduce that form, or rather the elements of it, using no maps and just nodes. My sense is that even a guru would not get very far.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 24, 2013, 06:26:20 AM
That would be awesome, to be able to 'ZBrush' dents, bubbles and caves into the planet. I just did some experiments with caves, but by carefully adding some SS's, which kind of works. Even tried rotating a crater. And you can do some stuff with inverted fake stones. But it's cumbersome.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on May 24, 2013, 08:30:34 AM
Paq, could you give a more detailed account of how you used ZBrush?  I have the program but have not used it enough to undderstand what you are describing.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 24, 2013, 03:10:23 PM
Just for the record,after several tests with three different models I have to say
that it is not a reliable technique.Sometimes it works and the next time,using the
same settings as before,it does not.Overhangs sometimes get cut off,sometimes
not.I can't tell for mudbox or other apps,but with ZBrush and TG it remains problematic.
This refers to using VDisp maps directly on a TG planet.

Nonetheless I'll do some more tests,I guess. ;)
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 24, 2013, 05:36:42 PM
Thats not happy news, J. Hopefully paq will come back with different findings. If so, then maybe you guys will be able to figure out a fix for the Zbrush flow.
Title: Re: Mudbox displacement maps in T2
Post by: Matt on May 25, 2013, 01:20:36 AM
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

Ok a little clarification for my brain hole, please...

So when using a map for the terrain, then a vector map is ideal. And will render well with RTO on.
However, for objects, a vector map should not be used, instead use a displacement map with RTO off.
A object with displacements maps, will (or can) render shadows properly. Regardless of what soft generated the maps.

Correct?

No, the problem is with *any* displacements on imported objects. It is not specific to vector displacements. Displacements on imported objects can be rendered with RTO off but their shadows and reflections will not be displaced which can cause various problems.

Matt
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 25, 2013, 05:53:03 AM
Thanks Matt.

One last clarification.
On a high polly object, such as a sculpt where no maps are used, the displacement is "real", And therefore the shadows act properly. Yes?

Im just a little confused, because those mushrooms I made a while ago (unknown to me at the time) were very high polly, and I thought the shadows looked fine. But I didn't know what to look for then. I still think they look fine. But it could just be a lucky break? In the case of the shrooms, I also used displacement maps for very fine detail. Seemed to work well.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 25, 2013, 06:59:33 AM
I don't think the high poly'ness has anything to do with the shadows being accurate. Without RTO the shadows of a displaced (high or low poly) object will turn out fine, but as soon as you RT, the cast shadow will follow the undisplaced/bumped contours, whether it's high or low poly. At least that's what I think.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 25, 2013, 08:14:46 AM
I don't think the high poly'ness has anything to do with the shadows being accurate. Without RTO the shadows of a displaced (high or low poly) object will turn out fine, but as soon as you RT, the cast shadow will follow the undisplaced/bumped contours, whether it's high or low poly. At least that's what I think.

Yes that's it if you'd ask me.

RTO just can't "see"  (at rendertime) displacement to put it in a very simplistic way.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 25, 2013, 09:05:23 AM
Thanks guys, I guess I knew that from reading everyones threads and my own tries. But its good to have concrete statements. I thought there would be some way to trick, or work around. As with the sculpt maps, I was thinking that because they are so detailed (not like finding a texture on line and converting it to a greyscale) that it would somehow make it happen. But if the raytracer is just not set up for it, period, than thats it. Of course shadows are not a big concern on a foggy/cloudy day! ;D

Still, theres a lot of good testing in this thread, just ahead of time I guess. And at any rate, ray trace issues or not, these methods are still going to make objects look better in renders. Not to mention the terrain by vector displacement, thats pretty nice!

Still working on those models I mentioned. Its turning into... like it is for Ulco's deer... Obsessing about every little thing. And trying to make it perfect. Takes for ever :)
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 25, 2013, 02:29:56 PM
Good news,I've got it sorted now.
Before I made some stupid mistakes,so I have to apologize in case my blabber caused
any inconvenience or confusion.
It is pretty simple and and worked everytime.Tested it again with 3 models,no problem.

[attachimg=1]

One has to use the same settings as before,when exporting the VDisp map for a model.
Yes,it's as simple as that.(doohhh,one can be so stupid ::))
Just make sure that the orientation of the model the map is extracted from is plan y in
ZB too,that's important.Another point to consider is that it will be most likely very small
in TG,so might be hard to find at first,unless you make it bigger in the Image map shader.
And you have to crank up the Final Multiplier in the Vector Disp Shader a bit,according to
the size you chose.In the above example I set the image size to 12 and the Final Multiplier
to 5.

mhaze -(or any one else of course) if you want a more in depth description or a step by
step,let me know.

Edit: the line of little black artefacts on the bottom marks the edge of the plane model
        used to produce the map and is the only glitch left.Should be easily fixed in TG as
        long as you leave a big enough border between the sculpt and the edge of the plane.


Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 25, 2013, 02:42:18 PM
I don't think the high poly'ness has anything to do with the shadows being accurate. Without RTO the shadows of a displaced (high or low poly) object will turn out fine, but as soon as you RT, the cast shadow will follow the undisplaced/bumped contours, whether it's high or low poly. At least that's what I think.

Yes that's it if you'd ask me.

RTO just can't "see"  (at rendertime) displacement to put it in a very simplistic way.

Judging from my experience it's a bit different.I found that the shadows you get with
RTO on are more like shadows you would get with real displacement.
I think I still have the images of a test I did some time ago,so if anyone is interested
I should be able to post them to illustrate.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 25, 2013, 02:45:37 PM
I would be interested.

And to make sure I understand well; is it correct that you make a model and use its vector displacement information to displace the TG planet? 
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 25, 2013, 02:50:46 PM
Ok,I'll see that I find them and post.
And yes,that's correct.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 25, 2013, 02:59:13 PM
Thanks. And you offered a step-by-step... would you?
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 25, 2013, 03:10:29 PM
Sure.
Will take some time,though.Should be ready tomorrow.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 25, 2013, 03:44:07 PM
I don't think the high poly'ness has anything to do with the shadows being accurate. Without RTO the shadows of a displaced (high or low poly) object will turn out fine, but as soon as you RT, the cast shadow will follow the undisplaced/bumped contours, whether it's high or low poly. At least that's what I think.

Yes that's it if you'd ask me.

RTO just can't "see"  (at rendertime) displacement to put it in a very simplistic way.

Judging from my experience it's a bit different.I found that the shadows you get with
RTO on are more like shadows you would get with real displacement.
I think I still have the images of a test I did some time ago,so if anyone is interested
I should be able to post them to illustrate.

I'm not sure if I understand what you mean?

If you displace an imported object and use RTO then the displacement will be converted into bump.
Thus geometry itself will not change, but lighting/shadow is being mimiced as if the surface was actually displaced.
That's how it works in TG.

Like Ulco I'm of course very interested to see this workflow.
This would offer new creative possibilities.
I don't have ZBrush, but I do have an educational license for mudbox.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 25, 2013, 05:37:09 PM
Ulco wrote: ....but as soon as you RT, the cast shadow will follow the undisplaced/bumped contours, whether it's high or low poly.
This is true for other apps.Bump mapping usually does not react with light,so there should be the same shadows as with no bump map at all.
Disp mapping reacts with light and alters the outline of the model,that's the theory as I know it.

T_U says in his second post regarding this issue: ...If you displace an imported object and use RTO then the displacement will be converted into bump.
Thus geometry itself will not change, but lighting/shadow is being mimiced as if the surface was actually displaced.
That's how it works in TG.
That's what I was refering to and is definitely not what Ulco said and T_U agreed with in
his first post I quoted before.

Here are my images
[attachimg=1]

I'll attach the full images at the bottom and suggest you download them and view with an
image viewer so you can switch,which helps seeing the difference.


Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 26, 2013, 04:46:02 AM
So, then, the consensus is dead?

What would the results be for displacement vs bump? Same model, same scene, same frame?
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 26, 2013, 08:01:44 AM
Thanks Jochem. But I think there's a misunderstanding. The shadows on the smooth curves of the object are fine, but if you look carefully at the shadows being thrown on ground, they follow the original contours of the 'undisplaced' object. Actually, whether you have RTO on or off. I also think that if you would be able to discern the shadows trhown on the object itself from the shadows in the bumps on the object, you'd see that the 'thrown shadows' do not follow the bumps., if you get my point. But on a smoothly rounded object that's hard to see and won't distract from it's reality anyway.
I've quickly tested a quite straight object and its shadows, which will clarify what I mean. You'll see that teh shadow on flat ground is straight, and doesn't follow the displacement or bump.

If we have RTO with real displacement and proper shadows all sorrows will be over.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 26, 2013, 10:15:11 AM
^^Yep. Those are the results I got my in tests too.

But it can be, sort of, dealt with by using diffused light and ruff terrains. Also many many shadows such as those that are created when light passes through a forest will effectively obscure the problem.
Soft shadows will also help.

And as was said, haze and clouds do wonders.

J, you are getting great results, man! I would keep going. Its very useful and also fun. paq too!
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 26, 2013, 02:53:25 PM
Ulco - I forgot to mention the dropshadows of the object these stay like you said.
         My point is that compared to other apps the shadows on the object itself are
         different in TG.Try to render in Lightwave,XSI or even Bryce and you'll see
         that the shadows on the object are the same with bump as without bump.
         While in TG they are clearly not.I'm not complaining about that,just saying.
         And I wholeheartedly agree with:"If we have RTO with real displacement and
         proper shadows all sorrows will be over."
         
         And please,it's Jochen with an n ;)

But now for the step by step.
         
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 26, 2013, 04:20:26 PM
And here we go:

              ZBrush VectorDisplacement Maps for plan-Y projection in TG2

First you will need a onesided square plane to import into ZB,because ZBs plane object is procedural
and as paq already mentioned it can cause problems.So you're better off to use an imported
one. It's orientation should be plan-y,that seems to be important.
[attachimg=1]
The above image illustrates what plan-y means,just incase ;)
In my example it's a 32x32 plane,but you can use a higher or lower divided one of course.
Furthermore it should be UV mapped.
So now that we have our Uv mapped square plane with plan-y orientation,let's export it as
obj file.

Start up ZBrush and import your plane.Draw it on the canvas and switch to edit mode.
Before doing anything else store a morph tartget.  Tool -> MorphTarget -> store
That stores the objects current state and is needed after sculpting to get back to an
unaltered basemesh when extracting the map.
Go to Tool -> Geometry and add a few subdivision levels and start sculpting.
When you are done save your Ztool (that's what it's called in ZB btw).

Now go to Preferences -> Importexport -> Vector Displacement Map and set the
'Flip And Switch' and 'Tangent Flip And Switch' values to 3. (which is the correct value
for TG as shown and explained earlier in this thread)
[attachimg=2]
If you are sure that you will only export maps for TG you could also store these values
with UI configuration.
In case you want to change the size of the map that will be generated,you can do that
Under Tool -> UV Map ,just press one of the presets or push the slider or type it in.
Now go to Tool -> Geometry and swich from your highest subdivision level to your lowest
subdiv level.You will find that you basemesh has been changed by the sculpting process
and that's where we need our previously stored morph target.
Go to Tool -> Morph Target and press Switch  now we have our basemesh back in the state
we started from.
[attachimg=3]
Then go to Tool -> VectorDisplacementMap  leave anything there as is and press
CreateAndExportVDMap a dialogue window will open letting you choose name and location
and format to save.By default it is exr and that's what we want.
A ZB message will open asking,if you want to export your basemesh too,press no and
you're done.
[attachimg=5]

Start TG and create a Vector displacement shader and then an Image map shader and
load your exr into it.On the Image map shader go to the colour tab and activate
 'Data is linear'!
Go back to the Projection,Location tab and set the desired size ,for my example it's set
to 12.Projection type should be set to PLan Y.
Connect the Image map shader to the right port of the Vector displ shader.
In the V disp shader window set the Final multiplier to an appropriate value, 5 for this
example.
Connect the Vector displacement shader to the Compute terrain.
Find it in the Preview window,set up your camera and render.
[attachimg=4]
There are small artefacts that mark the edges of the sculpted plane,but that should be
easy to fix with a masked distribution shader or so.
That's why it is better to leave some space between the sculpted area and the planes borders
when you sculpt.
Most likely you'll have to adjust the size and Final multiplier settings to fit your needs.

Hope it'll be of some use to you.

Feel free to ask questions.
And for mudbox,please refer to what paq posted on page 4 of this thread.

Thanks for your attention and have a good time y'all.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 26, 2013, 04:36:39 PM
Thanks very much, Jochen. I was experimenting with Lightwave, but I can't seem to export such a VDisp map from UV mapping settings. It probably has to be ZBrush then.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on May 26, 2013, 05:20:51 PM
Thank you so much, that is really helpful off to fire up ZBrush then!
Title: Re: Mudbox displacement maps in T2
Post by: dandelO on May 26, 2013, 06:43:32 PM
Hi, J. Thanks for taking the time to educate us on this! :)

I have a question. Must you use a planar object with plan-Y mapping to be able to translate the vector output to TG? You likely guess my thinking, you've posted on my last image thread, so, could I import a model to ZB, create a VD map from the normals(displacement wouldn't even be required, just the surface vectors) and then, convert those vectors to a 3D colour function that could be used on a TG volume? I've been to the end of my rope trying to find ways to do this, or a choice of nearly any other method to get there, directly in Terragen and I'm almost ready to throw the lot out of my window! :D
I really think this should work but I can't try it myself, as I don't have access to all my gear right now, no vector exporters on my temporary machine.

Cheers again, man. And to Paq and everyone else contributing here, great! :)
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 26, 2013, 07:19:40 PM
dandelO - it's not necessarily required to use a plan y mapped planar object,this is just
               the best way if you want to apply it on a planet in TG,because that can be
               considered a flat surface.Theoretically it should be possible with other basic
               shapes,too.I'm still testing.
               I don't know if it'd be possible at all to create a VD map from normals.
               But it is possible to convert the VD map to colour via red,green blue to
               scalar and go from there.
               I hope I'll be able to do some tests with clouds in the next few days.
               The next thing for me is to try to get working on vertical or close to vertical
               surfaces.

               Btw I've found the other thread we were talking about in your thread
               and I'll post the link there.
Title: Re: Mudbox displacement maps in T2
Post by: dandelO on May 26, 2013, 07:33:13 PM
Thanks, J. I'll look forward to your further experiments.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 27, 2013, 07:37:03 AM
Tonight I got a 'bright' idea and drew my own VDisp map in PS. No need for a modeler if you don't need it. Works like a charm. I'll post some result soon.
Title: Re: Mudbox displacement maps in T2
Post by: dandelO on May 27, 2013, 11:21:15 AM
Ahh! Good-good, man! :)
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 27, 2013, 02:07:15 PM
Just saw it Ulco,cool!

Hey Martin,the first little test with clouds just made the clouds disappear.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 27, 2013, 02:46:16 PM
Just saw it Ulco,cool!

Hey Martin,the first little test with clouds just made the clouds disappear.

Clouds are volumetrics and are intrinsically different from surfaces on how they are evaluated (noise) and rendered.

For instance, you're probably trying to apply this mask in some kind of projection and are assuming you're dealing with vectors.
The only part were you do that kind of is when you warp a cloud's texture space with a warp shader.
The warping shader pushes the texture space in the directions of the vectors the displacement of this shader is generating.
All else happens in texture space in regard to clouds.

So without knowing your exact setup I think that your principle may work, but that you have to keep the type of texture space you're working in in the back of your mind.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 27, 2013, 03:04:30 PM
Indeed I've tried to use the set up I already had (for side z projection) on the clouds when
I needed a break form the somewhat frustrating tests.
And no I did not assume I was working with vectors as I usually don't think in vectors,scalars
and other mathematical terms.Sometimes I don't think at all apparently. ;)
Thanks for the input,I'll try to translate that to my thinking.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on May 27, 2013, 03:50:04 PM
Well luckily I don't do that either :) as soon as issues arise I try to think through what I want and what I'm actually doing.
Title: Re: Mudbox displacement maps in T2
Post by: Mahnmut on May 27, 2013, 05:50:14 PM
Now thatīs an interesting thread! opens up whole new worlds!
And Dune, what you said about PS intrigues me and I wish to learn more. Thats a program I can use. Can you just give me a hint how to start? At the moment I have not the faintest idea how to paint a vector displacement map. So the colour chanels represent shifts in different dimensions? Exr is the format I need? Anything else to know?
Thanks to all of you!

And before I forget it: All the best wishes to the Badger and his family!
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 27, 2013, 06:03:45 PM
I just explained to Martin (T-U) in Dutch, so I'll do it in English as well. Paint in the color channels indeed, 16 bit RGB tif. Blue for Y, the other 2 for the other sides, whichever you choose (green=X and red=Z, or vice versa). Think where you want your cave, keeping in mind that it displaces to one side. On top of the lightest blue (white) is the top, so you don't want a cave there, paint it at the blackest edge. If you pant in the third channel on top or half on top of the green channel, you get a hook in the cave, which is what my example was about. If you draw a softer gray slightly higher than the cave (where the blue is lighter), it'll form a softer cave, and thus will produce a 'brow' above the cave. Lots to experiment with.
Then convert to 32bit and save. 16bit RGB won't open in TG, and 32bit can't be painted in in PS., hence the workaround. Set size appropriately in TG image map shader and check data is linear of course, like Jochen and/or paq mentioned. No need for an EXR. I couldn't even save an EXR I worked in as EXR.
Title: Re: Mudbox displacement maps in T2
Post by: Mahnmut on May 27, 2013, 06:40:53 PM
Thanks a lot!
I think I understood the Principle, I just wouldnīt have known how to do it .
( and to be honest, I didnt think about splitting the chanels, that would have been some colour magic to do!
Cheers,
Jan
Title: Re: Mudbox displacement maps in T2
Post by: Mahnmut on May 27, 2013, 06:50:39 PM
Hey, that also means I can use any good old bumpmap as bluechanel and paint in sideways displacements!
Dune, this getīs better and better. I really have to force myself to go out now, because its a marvelous evening outside.
CU,
J
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on May 27, 2013, 08:48:40 PM
I think this provides so many solutions to so many problems. We can use T2 to make the planets just as before, but use this method for very specific deformations not easily possible by seed or node tree, such as arches and bridges.
Fantasy art in T2 will benefit greatly!

T-U! You should return to your experiments with those giant spire formations found in China. Do you know the ones I mean? It seams to me that you need only paint the basic structure, and inlets. Then T2 can displace it and color it nice and pretty?

*...Oh thanks Mahnmut. Could happen any second now.
Title: Re: Mudbox displacement maps in T2
Post by: Oshyan on May 28, 2013, 07:23:23 AM
Great to see this long and detailed discussion about new workflows. There are some tremendously promising results here!

This is my brief summary of how to get best results from this stuff in TG, for now:

1: This technique is by far most promising for sculpting terrains and displacement from the planet object or one or the other displaceable primitives. This is because all the problems of raytracing objects, incorrect shadows, etc. are avoided (see below points 2 and 3). You get the best quality results this way, and the most difficult to achieve in TG, vs. point 2 below where you can just use a high poly imported object. So this is where I hope to see most people using this as a new approach to augment their modeling needs. If you have explicit terrain shape needs you can sculpt your base in e.g. Mudbox or Zbrush, bring it in as a vector displacement map, then add procedural detail in TG for further realism. This would be an ideal technique to achieve something like this, for example:
http://www.planetside.co.uk/forums/index.php/topic,16134.msg157391.html#msg157391

2: If you want a high quality object with absolutely realistic shadows (including self-shadowing), then if possible "bake" the displacement into geometry in your modeling/sculpting app, export that as OBJ, and load it into TG as a high-poly, complex object. Avoid using displacement maps to provide significant structure detail as A: you won't be able to use RTO, and B: you won't get accurate cast shadows.

3: If you are OK with some inaccuracy in shadows, you can use displacement maps on imported objects, but do so only with fine/small details, make the majority of your shape changes in actual geometry, and keep the displacement map to a "detail map". You can either use RTO (displacement gets turned into bump mapping) or not, in this case, the results should be similar as the displacement map is now just being used for fine/small-scale detail, although of course real displacement is always preferable. Overall displacement on objects should be avoided if possible; see my first point above.

- Oshyan
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 28, 2013, 03:16:00 PM
For the sake of completeness:
You can paint in 8-bit,too.It's coarser of course,but it works.You can even paint with the
appropriate colors directly (separate layers) and experiment with different methods of combining
layers,like multiply and so on.
I would choose green for height (y) though,'cause that matches with other things in TG,and
red for x and blue for z.
I find it harder to get to the desired shapes as it is with sculpting,but it's still a great method.
And probably easier for arches and the like.

Edit: I use PSE and that doesn't support channels or more than 8-bit.
Title: Re: Mudbox displacement maps in T2
Post by: paq on May 28, 2013, 10:57:56 PM
Hi Oshyan,

If you have a chance to jump into the posted thread, you're more than welcome :)
While indeed vector displacement seems to open lots of door, I'm wondering if you have any idea how to resolve the micro detail projection problem
I'm facing.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 29, 2013, 06:52:20 AM
@Jochen: I tried some combinations in TG, like adding, multiplying, subtracting some of the color channels to/from each other before building the vector. Really nice to experiment with. Now, what I like to do is get this working procedurally. Theoretically and after just a few minutes experimentation, I'm positive it should work....

And thinking more about it, what does 'build vector' actually do? Most things I do in TG are intuitive, not based on any knowledge  ::) , so that makes me wonder. Is there a big difference between the vector displacement from the color channels and build vector and say 'redirect' or normal 'displace',either with or without using compute normal/terrain/XYZ? And what if you make the channels by using procedurals and a blue surface shader, adding these in clever combinations to build a vector. Of course you wouldn't need the color channels 'in between', but feed the different procedurals directly into the 'build vector... or not?
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 29, 2013, 03:13:29 PM

......
And probably easier for arches and the like.
.....
That was another good example of me not thinking at all. ;)
We are displacing the surface of a sphere and therefore it is not possible to get holes.
It's a closed surface after all.


Ulco - Yes,experimenting with that seems to be very promising to me,too.

         For the second part,that's beyond me,I'm afraid.I just test until it hurts
         as for stuff like this.
         What is a blue surface shader btw?


Generally - I got it working on close to verticals via camera projection.It's a bit
                inferior qualitywise,some more little black spots,but optimizable methinks.

                I failed getting it onto clouds,though.Tried several conversions,but the
                undercuts got lost everytime.So the results were nearly the same as with
                using depthgrabs.
                For now I've lost the nerve to go on with cloud tests.

               
               

Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 29, 2013, 07:19:49 PM
A blue surface shader is just a surface shader with the color set to blue.
Title: Re: Mudbox displacement maps in T2
Post by: jo on May 29, 2013, 10:50:24 PM
Hi Ulco,

And thinking more about it, what does 'build vector' actually do?

AFAIK all of the blue nodes are documented and the Build Vector node certainly is:

http://www.planetside.co.uk/wiki/index.php?title=Build_Vector

Quote
Of course you wouldn't need the color channels 'in between', but feed the different procedurals directly into the 'build vector... or not?

I don't see why not. I did a simple test using a Build vector with a Perlin noise node connected to its Y input and it worked fine. Instead of using a blue surface shader you would simply use a constant scalar with a value of 1.0 (the equivalent of full blue colour) connected to the Z input of the Build vector.

Regards,

Jo

Title: Re: Mudbox displacement maps in T2
Post by: j meyer on May 30, 2013, 03:13:59 PM
A blue surface shader is just a surface shader with the color set to blue.

 ;D  Doh,I thought it was a new blue node.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on May 30, 2013, 05:03:03 PM
@Jochen:  :D
@Jo: thanks, I always forget about the documentation.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on June 02, 2013, 12:40:19 AM
Hi.

I went a little over board on the model I promised.  ;D

I ended up doing nearly exact replicas of greek and roman ruins in real world scale! Though they are not finished I can tell you that they will be near photo real right out of the box, so to speak.

Here is the "Temple Of Aphaia and Her Splendid Companion Athena". Its got a bit of work left to do on it:
[attach=1]

The hardest part was the column flutes. But they are all proper quads now and an exact match of the real temple.

The part thats most relevant to this thread is the polly count of the so called low polly version. As shown above it is nearly 1,000,000 unfinished/
I expect that the final sculpt and paint will be 20-30 million "p" and 1-3GB per object in TG2 (likely more).
So, not really practical for a lot of users here, I think.
Anyway, the point is that this wont be a perfect example model going by the OP post. But I would direct you to Oshyan's post on the last page in that regard. Also see my mushrooms in image sharing for good proof of what Oshyan said.

Then what I'll do is break off a chunk (one of the corners) and share that... Will look great in a TG2 prairie or garden scene.

Im modeling each of the temples and structures Im making according to the ruins. Once I have the ruins, I copy the file and continue for the un ruined version. Im making an entire city... One at a time. Then to mudbox for the ruins. For the un ruined version, I think image textures will suffice.

Ill tell you that making a column with a corinthian capital is tedious! >:( If anyone knows of a tut for said capital for any modeling app, I would be glad to see it, I need to speed up my process, and anything would help.

P.S.
Ulco, Im working on your heard right now  :)
Title: Re: Mudbox displacement maps in T2
Post by: Dune on June 02, 2013, 07:21:41 AM
 :D
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on June 04, 2013, 10:43:30 AM
Hi guys.

I found this randomly. Made me happy. So I thought I would share it. Its a pretty clear and good explanation of lots of the stuff thats been talked about in this thread.

I think it will be helpful to a lot of people interested in whats going on here. I know it helped to put into words what I was understanding more intuitively. Also some instructions, so thats nice too.

Vector Displacement: Zbrush, Mudbox & Maya Workflow Explained
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 10, 2013, 10:51:42 PM
I've been trying to do this. I can create the vector displacment maps. They will apparently work in Terragen. The problem is the tools I have to do it. It seems Modo can do it but Modo is pretty terrible for scultping. You can't get enough detail and the sculpting tools are just bad. In 3D Coat I can create a massively detailed vector displacement map but the bit where you do the morph in ZBrush for example is eluding me. That part where you take the sculpt and re-apply it to an unaltered plane again. I actually don't get the point of 3D Coat having the vector displacement map capability or maybe I'm missing something.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 10, 2013, 11:04:18 PM
What we want here is a hugely detailed map. Also, why are we seeing those nasty joins at the edges of the map?
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 11, 2013, 12:48:53 AM
There is massive interest in this topic, efflux (2,000 views and 98 replies in just a week or two).

Actually I was a little surprised that with so much interest there was not more experimenting and image posting of those experiments.
I am just guessing of course, but probably everyone just put it on the to do list, and had to focus on things they needed to get done first. Although Ulco managed to get a lot done on it. But he didn't post much detail about his steps. (I know your a busy guy Ulco :)) And of course J and paq!

I really want to get back to this subject very much my self. But I need to finish some other stuff before I will have the time I need to devote to it.

But Efflux, I would love to see you give the kind of attention to this subject as you have a few others recently. One thing I would point out, is that Z-brush and Mud are really different. Maybe the soft you have is more like mud than Z? So maybe you should look at how mud works too?

I think people who use mud for this will have an easier time than Z. But I'm just guessing. Mud is easier in all respects I feel, though not as popular it seems.

Please go at it!

Ohh, Cant you make a vector in blender? Wouldn't that be another way to use your know how there, in Terragen, too?
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 11, 2013, 06:36:49 AM
I have been following this topic with interest too plus I do have Mudbox, not Zbrush though, and am willing to give it a try some day.
However, I think I have to go through the entire thread again, because I'm not sure how it is done in Mudbox and how it needs to be set up in TG.

Perhaps Michael, if you feel up to it, I may ask you for a bit of help.

Cheers,
Martin
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 11, 2013, 07:18:39 AM
It would be most interesting to have a free app that could easily make some nice soft sculpt AND make a VDISP map out of it. It can be done in PS, but needs careful thinking.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 11:00:19 AM
But Efflux, I would love to see you give the kind of attention to this subject as you have a few others recently. One thing I would point out, is that Z-brush and Mud are really different. Maybe the soft you have is more like mud than Z? So maybe you should look at how mud works too?

I think people who use mud for this will have an easier time than Z. But I'm just guessing. Mud is easier in all respects I feel, though not as popular it seems.

Please go at it!

Ohh, Cant you make a vector in blender? Wouldn't that be another way to use your know how there, in Terragen, too?

This has huge possible potential. I say possible because there could be some glitches.

I'm working totally in 3D Coat at the moment so this ties in. Blender can't do vector displacement maps. Blender has only just got experimental proper displacements at render time in Cycles so vector displacement is low on the list of priorities which is completely understandable. As Dune mentioned, it might be possible to make the sculpt in Blender and somehow turn it into vector displacment in another app. 3D Coat probably will be able to do all this. I'm still in learning phase though. Yes, 3D Coat is much more like Mudbox than ZBrush. What I can say is that 3D Coat 4 is awesome. This is a serious breakthrough. Some parts of it were a bit slow in previous versions. Now it all rockets. I've had a few glitches with it but it's looking like this is Linux end and possibly my fault. I won't get into the full details but it seems to be connected with the way I was configuring the Cintiq. Obviously the Cintiq and 3D Coat is heaven.  If it was possible to do the terrain in Blender then vector displace that would be very cool. Blender is not in the same league as 3D Coat, Mudbox or ZBrush in terms of resolution (or at least in real time as you work) but it's fractals and dynamic topology just work adsolutely great for terrains. That's not to say great results couldn't be got from other sculpting apps it's just that almost by fluke Blender is perfect. What we want is to get much more of those kinds of forms into the vector map rather than just a general shape because although that's still cool, the big advantage would be to be able to get all sorts of forms that are way apart from just displacing by graph stuff in Terragen.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 11:16:47 AM
Some people are actually saying that 3D Coat 4 is now faster than Mudbox. I think I'll be upgrading. The paint tools are faster than most 2D painting apps. It's literally on another planet compared to when I first got my old licence. It does everything. Voxels which now have some very cool features to do with dynamically remeshing or not as you wish. Retopologising tools are excellent. UVing seems OK but I've never used them. Mesh tweaking and any form of painting. Painting tools were weak before from a speed perspective.

It may take some time before I work out this vector displacment. I can do it but I need to bring it far beyond what standard displacment maps do. I've watched how it's done in Mudbox. That looks pretty straightforward but the 3D Coat workflow is different even if the sculpting tools and UI are similar.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 11:40:40 AM
Michael, this is not related to this thread in technique but have you seen this video:



You could do this in any of these apps, Mudbox, 3D Coat and Zbrush. So what I'm thinking is that chunks of Blender terrains could be used for this. World Machine is great but Blender is free and quite unique in the way it can create fractal terrains.

I'd be inclined to Choose Mudbox over ZBrush as well. ZBrush has some advantages but I think the ZBrush UI is a total disaster area. I'm biased towards 3D Coat because it's cheap and Linux.

I'm beginning to think that sculpting terrains, whether purely from scratch or mixing in component terrains from ther apps is in fact the best way to create terrains because you have full control to build in complexity of form that pure procedurals can't do. You can blend it up very naturally. For example World Machines erosions are really beautiful in form but actually too perfect and immediately recognisiable as World Machine.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 11:57:26 AM
Now watch this video but relate it to the last one i.e. you build up a terrain with overhangs suitable for vector output and sculpts from Blender etc could be used.

Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 12:09:32 PM
It would be most interesting to have a free app that could easily make some nice soft sculpt AND make a VDISP map out of it. It can be done in PS, but needs careful thinking.

Are Vector maps capable of doing total overhangs in terms of bridges like in that image you posted or is that just overhanging to extreme that ends up looking like a bridge? It doesn't seem logical that it could do that. In 3D Coat voxels you can create holes anbd overhangs and obviously in Blender as well because the underlying achitecture is just like standard mesh.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 11, 2013, 12:49:52 PM
It's just extreme overhang, it won't be possible to make a real bridge from the planet's skin. But you can get quite a way with bridges and tunnels.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 11, 2013, 05:08:58 PM
I've done some more tests,but nothing postworthy so far.
There is one thing though I'd like to mention: be aware that you can't use maps
on VDisp terrains,unless you sculpted a really flat terrain.They won't line up correctly,
because it is not a model,but a displaced image and that doesn't have the required
UV coordinates.Also tried to project a simple mask that was captured orthographically,
on a terrain without extreme overhangs,but no joy either.
Didn't realize it earlier although it seems quite obvious now.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 11, 2013, 05:09:53 PM
Well that's still useful. I'm just wondering how much detail we can get. Obviously it's still a stretching of a flat map. I'm going to have to more less work my way right through 3D Coat before I can get anywhere with this. The info is available on how to to it with Mudbox so if you use Mudbox it's easy. It looks to me like hardly anyone is really pushing this tech to full, just using it to get slightly nicer displacements.
Title: Re: Mudbox displacement maps in T2
Post by: AP on July 11, 2013, 05:47:27 PM
Apologies is this link was poster already.

http://www.neilblevins.com/cg_education/mudbox_vdm_stamps/mudbox_vdm_stamps.htm
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 11, 2013, 07:43:47 PM
@ChrisC
No that was not posted here yet. Thank you. Its a nice thing to download and save for reverence. sometime I forget basic stuff, and searching through video tuts to find answers can take a lot of time. Thats one reason I love having written materials like you posted too.

@efflux
Quote
This has huge possible potential. I say possible because there could be some glitches
Yes indeed!!! But lets figure it all out!
Im actually happy to participate in this one, because I actually understand the basics of it. I dont get to contribute in the technical devopment threads vey much (other than trying to be possitive and suportive) But here I think, in time, I will be able to share some nice bits, and files too. So that makes me pretty happy.
I did see both those links you posted. I have a DT membership now. But the other one I did not watch all the through until you posted here. I have a few vid links that may be helpful as well, and I'll post them when I have a few hours to go through my tut folder in my browser.

I do love Mud over Z. The only thing though, is to use Mud, you have to have another app: Maya, max, soft, modo, and so on. Z can stand alone. But if you have Mud and maya, or one of the others, Z is not really equal to the combo. I don't want to start a fight about "best" soft. Im just speaking from the perspective of someone who hates having to fight to understand software. Mud does not fight with me.
The best advantage to using Z is lots of people use it. So finding help is easier, much easier. On Digital Tutors for example, there are like 1800 tuts for Z, but no where near that many for Mud.

@Dune
Quote
It's just extreme overhang, it won't be possible to make a real bridge from the planet's skin. But you can get quite a way with bridges and tunnels.
Im confused on which part of this you guys are talking about. You are not talking about Vdip are you? Because up until right now, I thought that was one of the clearest uses for this (vector displacement). For example this image I posted in open, a while back (or one just like it):
http://images6.fanpop.com/image/photos/34000000/oz-oz-the-great-and-powerful-34001095-1920-1200.jpg
http://www.all-hd-wallpapers.com/wallpapers/abstract/329067.jpg
http://digital-art-gallery.com/oid/13/640x366_4149_Bridge_2d_fantasy_landscape_bridge_picture_image_digital_art.jpg
http://www.peregrius.cz/ukazky2/melerin/mostek01.jpg

I think I understand the distincion you and efflux are drawing, but please clarify it. "it won't be possible to make a real bridge from the planet's skin. But you can get quite a way with bridges and tunnels." After you apply the map to the planet, then whats the difference exactly? Because as I work, I imagine that once you connect the nodes, than its all terragen.
Like I said, I think I am just missing the distinction your making here.

 
Never mind! I took a nap and read it again. You were saying that you can't do it in TG without the maps, right? That you can only have overhangs, yes? But with the maps you can doit. Sorry ;D

@J
Please keep at it. Im sure you will make more great advances. Finding limitations is also very very important! And thank you for sharing them! You will save others a ton of time, to try other things. I would never get anywhere if I had to stumble through all the same mistakes as you guys who tried first.
Really! thank you!

@T-U
Ha! It is the end of the world! I never thought I would be in a position to help you with anything. I know you say you don't have much experience with other 3D apps. But I doubt you would have much trouble. Anyway, if I can do anything, I will be glad to help out. It would be nice not to feel like the luddite in the group, for once.  ;D


The download file at the bottom here is blank. So don't bother. I tried to delete it, but it would not come off the post. Just ignore it.
Title: Re: Mudbox displacement maps in T2
Post by: AP on July 11, 2013, 09:09:42 PM
No problem.   ;)
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 12, 2013, 12:07:43 AM
Yeah, that link for Mudbox makes it easy. Unfortunately 3D Coat suffers from bad tutorials. There are lots of them but they deal with obvious stuff. It pains me to watch this stuff. An incredibly powerful app and people seem to be treating it like some kind of third rate toy. Doing junk stuff and putting up uninformative videos. 3D Coat is now a hugely underated app. V4 is incredible. One problem it always had was that the voxel sculpting was fantastic and the retopo tools were great but the painting tools were crap because they weren't even multi threaded. Now the painting is awesome. Also, on Linux there is one huge boon. It can talk directly with Krita and applink with Modo and Blender. Krita can also handle high bit depth images unlike Gimp. Krita is a fantastic painting app so this is all working really well. I'll be at this for ages though so don't expect any tests in this direction any time soon. I'll come across how to do it hopefully. Not much point in testing vector displacment in Terragen until I get a truly effective map with overhangs.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 12, 2013, 12:27:52 AM
By the way. That concept picture from the Oz The Great And Powerful. I saw a book of the concept art from that movie and it was really great. Even the pictures on the net don't do justice. The movie is supposed to be crap though. However, the artwork demonstrate the limits of Terragen for this type of stuff. The bridges for example. There are elements that are very Terragen but to me Terragen on it's own in it's present form isn't enough.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 12, 2013, 12:44:16 AM
Just another point about Mudbox. It's Linux. This is worth considering for the future even if you don't currently use Linux. I'm not a fan of Autodesk but I did try Mudbox ages ago and I thought it was good.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 12, 2013, 12:49:28 AM
I saw Oz. I liked it. I had heard it was bad, so my expectations were low. So when I saw it, I liked it a good bit.

I hear you about T2 not being enough on its own. But in fairness, I cant do anything I want to do with any one app. Not even Maya. I need Terragen, Maya, Mudbox, Photoshop, After Effects, autopano, photomatix, premiere/final, geoControl, uvLayout, and host of stuff I don't want to take the time to name including plug-ins.
I have seen films and art projects made with a single soft, most of em' suck. The few real good ones were made by experts in their field, and still not exactly earth shattering.

One soft to rule them all? Maybe one day, but not today.

Yeah, mud is one of the cleaner autodesk apps. I mean it functions well, is stable, and also user friendly. And don't buy into it if you hear someone say you cant save out a map larger than 4k! You can save 35k maps if you want to! The option is just hidden.

Keep at it Efflux!
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 12, 2013, 01:26:59 AM
I've done some more tests,but nothing postworthy so far.
There is one thing though I'd like to mention: be aware that you can't use maps
on VDisp terrains,unless you sculpted a really flat terrain.They won't line up correctly,
because it is not a model,but a displaced image and that doesn't have the required
UV coordinates.Also tried to project a simple mask that was captured orthographically,
on a terrain without extreme overhangs,but no joy either.
Didn't realize it earlier although it seems quite obvious now.

But J, you could just paint in Mud (z too?) and use that map on the Vdisp in the exact same way as the Vdisp in Terragen. because the painted texture will line up exactly with the Vmap. Or no? would you not just place a texture node of the painted map over the vdisp node with the exact same coordinates?
I actually haven't tried it yet. But would that not be logical?


Edit oh wait... Duh. If we are talking about projection, then there is no way for the projection to get under the over hang. Right?
So no I guess.

But procedural color and fine displacement will look better anyway, I think.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 12, 2013, 02:52:01 AM
The problem with Terragen is best decribed by comparing with the end results from other apps in this way - If you do something in Modo, Maya, Max or whatever, it's not really noticeable what app you used. I think even Vue can sometimes be like this although some features can give it away as Vue. However, Terragen renders usually look distinctly Terragen. The reason for this is lack of functions for shaping things uniquely. You start to get used to seeing the same forms. There isn't enough ways to blend things up, distort things, mask stuff etc. It's harder for the artist to put unique looks to scenes. That's why the technique here should definitely be tested further. The more we can bring into Terragen from outside, the better.
Title: Re: Mudbox displacement maps in T2
Post by: paq on July 12, 2013, 05:17:30 AM
I'm wondering if a voxel approach inside terragen could be the next step.

Acropora (http://www.voxelogic.com/) is using this tech, I find the result a little bit too blooby, and the last time I tried is wasnt very fast, especially when modeling large scale terrain.
What is also very important is to have erosion tools working in 3D, so far erosion only work on elevation terrain (2d process).



Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 12, 2013, 06:07:31 AM
The OZ bridge can be done, I'm sure, with a little thinking. I don't have much time, but otherwise....
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 12, 2013, 09:35:00 AM
Im pretty sure that they can all be done ;D
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 13, 2013, 01:53:39 PM
As requested :)

Here's an example of vector displacement from sculpting.

It's a useful technique, but like all, it has it's pro's and con's.
As a base sculpt it has to have a flat uv projection, so you have be careful when sculpting to minimise any stretching in the mesh when sculpting, as this also effects the displacement.
The ideal scenario would be to be able to bring in a mesh with accurate uv's that could be subdivided before displacing, which would also open the gates to uv textures for vector sculpts.
Of course, depending on the shot you can use work arounds for texturing and additional sculpted displacement by setting up projection cameras.

Chris
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 13, 2013, 03:37:25 PM
This is great. Is this a Terragen render? No matter what, this shows exactly why we need this. It shows the awesome openess of form rather than depending on fractals. It means not needing fractals for medium scale surfacing details because if we can get enough detail in the vector displacement then Terragen's fractals can be minimised to smaller details.

My problem at the moment is that I draw or do stuff in 3D Coat. When it comes to creating that in 3D I can do whatever I want in apps such as Modo but with scene size limitations. In Terragen I can't fully realise what I want which constantly drives me away from the app. This is the problem and why Terragen has to be better at handling inporting stuff but it also needs drastic improvement in it's own tools to shape forms procedurally. I have way more control of that in Blender at the moment.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 13, 2013, 04:15:16 PM
Scroll down this page and see how Terragen is being easily surpassed in terms of the variation you can get.

http://www.e-onsoftware.com/products/vue/vue_11_complete/?page=0&PrinterFriendly=1

Then under the Terrains section. Blender can even do that easily as well as Vue. In fact I think Blender is much better be it quite slow but Blender has awesome fractal power for the brushes.

My direction at the moment will be with 3D Coat. 3D Coat does in fact have some fractal brushes but they lack a bit of editing power. Nothing like Blender's insane power but 3D Coat can handle the polys. I'm going to see if Andrew at Pilgway can open up those fractals for a bit more power.
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 13, 2013, 04:41:19 PM
Cheers efflux,

The shot was rendered in terragen, the latest beta of tg3.

My feelings on the subject,
I find it rare these days to complete any shot in just one app alone. I've been using tg as part of my workflow for years now as I find it very flexible, great for layout, and handling heavy complex scenes. Almost everything I do relies on heavy art direction or working from concepts, so I think it's just a case of finding a workflow that works for you.
I've also used vue in production and would always lean towards tg given the choice.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 13, 2013, 04:42:06 PM
Terragen obviously doesn't need sculpting of terrains. That's much better in a proper sculpting app. I don't want everything bundled in like Vue. It tends to end up a jack of all trades master of none. We need to import any kind of sculpted terrain. However, watch this video from around 03.28 and this is Vue 9. Terragen can't do lots of things you see here. Mojoworld did these things probably a decade ago and Terragen still can't. That's dire. I've been on about some of these things on this forum for years.

Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 13, 2013, 04:45:34 PM
I take it then that Terragen 3 handles imported stuff much better. That's good but some of these other procedural things still need improving. Not even a match for Blender,
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 13, 2013, 04:59:54 PM
Hey Chris could you possibly show a screenshot of the sculpted terrain only?
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 13, 2013, 05:05:13 PM
Obviously I can't comment on anything that hasn't been stated in the pre-release material.

I'd just say, don't give up on tg just yet, it's improving in so many ways.
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 13, 2013, 05:12:51 PM
No problem

Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 13, 2013, 05:21:18 PM
 8) Thanks!
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 14, 2013, 06:49:11 AM
And would you also be willing to share (or pm) the actual VDISP map, so I can study how that looks? I'm trying to recreate this in Photoshop, by painting in the three RGB layers.

This is yesterday's result.
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 14, 2013, 08:40:27 AM
Here's a link to a 4k version of the map.
https://docs.google.com/file/d/0B7iMMmOUtdHbNkhqVUJIemJiMDA/edit?usp=sharing (https://docs.google.com/file/d/0B7iMMmOUtdHbNkhqVUJIemJiMDA/edit?usp=sharing)

The original is 8k, and is a 32 bit exr, so I'm not sure it will give you much guidance at that depth.

Hope it helps

Chris
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 14, 2013, 09:32:35 AM
Chris was this sculpted in zbrush?  As I'm having trouble getting details out of zbrush  :(
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 14, 2013, 10:07:30 AM
I'm using j meyer's method of extracting vector disp maps from ZBrush but I'm not getting any of the details modeled at higher subdiv levels. It looks like I'm only getting the base layer.  Is this the best I can expect or am I doing some thing wrong?
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 14, 2013, 10:08:16 AM
Yeah, zbrush.

It can be a tricky process, as you are limited to how many subdivisions you can utilise (until the 64bit version finally arrives).
So you have to be careful with edge flow and avoid stretching wherever you can.

I tend to use it for broad areas and form rather than detail. though if you want to sculpt extra detail there is another workflow, although it can be a little tricky.
After the initial sculpt, and camera set up, you can export a projection camera and base mesh. (I tend to work on a flat plane in tg that matches the scale of the mesh I'm using in maya and Zbrush)
Then I take the mesh into zbrush and re-project a base plane onto the exported mesh (giving you a new base level to morph from that matches the broad strokes you created earlier), you can then subdivide and sculpt again, giving you another layer of detail. Make sure you apply the new displacement after a compute terrain node.

Are you storing the flat base as a morph target? you need to do this and switch back to it before exporting the vdisp map.
Also make sure you are reversing the y direction either in zbrush or tg.

Hope that helps a little.

Chris

Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 14, 2013, 10:31:17 AM
One other quick tip.

Make sure the uv's on the flat plane you sculpt from are not sitting exactly at the uv borders, I always shrink them by a small fraction.
Zbrush throws lots of errors if there's no space at the uv border.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 14, 2013, 11:37:37 AM
Thanks for the tips I'll have to play some more.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 14, 2013, 11:44:42 AM
Quote
Make sure the uv's on the flat plane you sculpt from are not sitting exactly at the uv borders, I always shrink them by a small fraction
This is true in a Mudbox workflow as well.

I am just going to say some bits about what I *think I know* in response to some bits above, and hopefully someone will correct me if Im wrong.

In the little experience I have in sculpting anything, I find the more perfect the quads on the low polly the better looking the high polly will be. That is if you have rectangles on your plane for some reason, you will have stretching. I am not sure how Z-brush works, but I don't understand how you are getting stretching? Just subdivide more? Because from a plane object all quads should be perfect? No matter how/where that plane object was created!

Perhaps the problem is not in the sculpting, but in the map? How much data can a vector disp map hold? And what data exactly that is?

Because I don't see from how mudbox works, why so much of whats being discussed is being discussed. If your working from a plane, than the quads on the plane should be perfect from the get go, and remain perfect to the highest sub level. But once the sculpt is saved as a displacement map, what does that even matter?.. if it looks good as a sculpt, the map should look just like the sculpt?.. Or is there some degradation ones its brought into Terragen? This last idea would be strange to me, because I always get in terragen, exactly what I saw in mudbox...So far anyway.

And on a side note,
Mudbox has a complete PTEX workflow. I am wondering what would happen if a Vector displacement map was generated from a PTEX sculpt and then used in Terragen? Based on what you guys are saying above one is lead to believe that Vector Displacement maps contain UV coordinates. OK, but what does that matter in TG?
Once its projected in Terragen, isn't it the planet's UVs that matter?


@chris_x422
Is the red sculpt a terragen render of the vector with no other nodes added?
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 14, 2013, 12:01:22 PM
^^Sorry if those are dumb questions, but from a beginners prospective, it seems important.

Just a little bit more now.

In Mudbox, you can make a Vector Displacement map of a sculpt, and then use that vector as a stamp brush. The power of this is, you can make a fine detail for a sculpt once and then repeat it easily. So for examples, scales on a dragons back, or horns on a lizards back, and so on.
I guess I don't see yet what the difference for Terragen is.

If I have some time today I will use one of those stamps in mudbox, and post a screen grab. Then I will also post the vector as I found it. Hopefully it will help to create some clarity.
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 14, 2013, 12:06:21 PM
Even when working with perfect quads there is a limit to how much you can subdivide (certainly in zbrush, due to the 32bit memory limitation)
So you are very often working against the natural flow of the edges, which can produce stretching.
Any stretching in the mesh is then always replicated when baking that out in uv space.

Ptex works on a per face basis and bares no resemblance to uv space, and that uv space has to used in order to work and re-project in terragen.
In terragen, I re-project in planar y, at the same scale and aspect ratio as my sculpt mesh and uvs.
The planets uv's are kind of irrelevant as it's a projection and can be placed anywhere.

The sculpt screen-shot is from zbrush, and as you can see there is stretching in places due to working at around 6 million polys.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 14, 2013, 12:42:13 PM
Quote
Even when working with perfect quads there is a limit to how much you can subdivide (certainly in zbrush, due to the 32bit memory limitation... working at around 6 million polys

Ahhh ok. I am not limited in the same way. Not sure yet how much it will make a difference. But Im definitely more free to go over board with polygons. And I am certain that, that is whats allowing me to minimize certain issues, at least visually.

One last request to make of you Chris.
Would you mind terribly, also posting a render of the Vector in terragen, without any added nodes? So just the vector terrain before you started making all of the details and colors.

Thanks for the help Man! And thank you for deconstructing your image for us! It is most generous!
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 14, 2013, 02:28:40 PM
Here you go

Mudbox does have far better memory handling due to being 64bit, but I just prefer sculpting in Zbrush, I've used both quite a bit, and just love the tools and feel of the brushes in Zbrush.
Hopefully not too long to wait before v5 appears and finally goes 64bit.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 14, 2013, 02:51:59 PM
Ok, so that answers my question! The image is what I would have expected to see. I was just confused by some of the talk about the finer points of the process up above is all.

I like Z too from what I have seen. I think its got a ton of nice features. I just prefer the easy UI of Mud. and its relationship with Maya.

Thanks again, Chris.

Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 14, 2013, 03:06:13 PM
Still can't get the same level of detail you are getting in your canyon pic. Guess I'll have to just keep playing.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 14, 2013, 04:06:17 PM
mhaze - what map size do you use?
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 14, 2013, 04:42:29 PM
Good question - I haven't set a map size - that could well be the problem I'll come back to you on that.  My basic plane is 1x1
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 15, 2013, 10:25:26 AM
Problem solved used subdiv of 6 and a 4048 uvmap
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 15, 2013, 02:07:35 PM
Is somebody interested in documenting this process in some kind of understandable way, eventually?

I have been following this 11 page thread so far, but I can't say for myself that it is really clear what you guys are doing or talking about?

Personally, if I may choose, I would be interested in a Mudbox based method as I have a license for it.
Of course any kind of process description is appreciated since I'm not the only one who's interested, I suppose!

Cheers,
Martin
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 15, 2013, 02:44:05 PM
Hi Martin

I used j meyer's process for Zbrush from these pages... works well.   I believe there's info about using  mudbox in this thread on page 4 but as I don't have mudbox I can't be sure if it's enough.  I'm going to post some more images and info later in the images section.

Mick
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 15, 2013, 02:44:49 PM
And would you also be willing to share (or pm) the actual VDISP map, so I can study how that looks? I'm trying to recreate this in Photoshop, by painting in the three RGB layers.

This is yesterday's result.

If this is painted in photoshop then it's quite an accomplishment. This must be very hard to do.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 15, 2013, 03:16:39 PM
chris_x422 - played with your exr yesterday and found I had to set the y-function of
                  the VDisp shader to minus 1 and the image size to 1000 to get the correct
                  result.The Final Multiplier could be left at 1,which is cool,'cause it's supposed
                  to work like that actually.In my tests I always had to set it to something
                  higher than one.
                  I would be interested to know your ZB settings and the size of your plane
                  (inZB) for comparison,if you don't mind.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 15, 2013, 03:27:18 PM
It is efflux, and indeed it was quite some fiddling. Still looking for easier ways.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 16, 2013, 12:44:02 AM
Martin,
I'll do a step by step.
I cant stop what I'm working on now though, or I'll get distracted again and never finish. I'll be done with it at the end of this week and will do a quick start tut then.
But in the mean time, if you like, I will post some video tuts for mudbox that will/should help with that end of things. I suspect thats what you asking about ?(making the vector map/setting up the plane?)... And some other things as well.
Tweaking any nodes in terragen is your domain, and I hope that likewise, you will post info on that part of it too! Once you get going on this I mean.

I have to take my son to the park right now, but when I get home I will make a list of video tutorials on mudbox that relate directly to this subject, and post them here.

Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 16, 2013, 06:05:57 AM
At least part one of this written tut is on topic.
http://bb3d.wordpress.com/2012/11/19/how-to-vector-displacement-map-from-mudbox-to-3ds-max-with-vray/

contains relevant info


saving out your vectors.
http://vimeo.com/44275572#

a process walk through with some good details. Includes some World Machine stuff.
http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture

More advanced stuff that may not be immediately useful.
http://www.mudboxlive.com

I hope this info will be useful to a least a few people. I'll try to locate and post more as I go through my tut folders.
Mudbox can be obtained for free for non commercial use. The non-com version has no other restrictions and is otherwise just like the paid version. At least you can use it with Terragen for your portfolio. And for increasing your experience/knowledge base.
The last time I checked, there was no free version available for Z-brush, even just a learning edition. But that may of changed?

Let me know if there is a specific topic in mud that I can help with getting info on.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 16, 2013, 07:01:28 AM
Quote
Mudbox can be obtained for free for non commercial use.
  Can't find that option. Would be handy, as I would only use it for Vdisp maps, probably.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 16, 2013, 09:41:33 AM
Quote
a process walk through with some good details. Includes some World Machine stuff.
http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture

The good thing about this one is it shows you how you can use WM/GC to get erosion on your sculpt. After doing that you can bring it back to Mud and then do the Vdisp... theoretically.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 16, 2013, 09:30:02 PM
Quote
a process walk through with some good details. Includes some World Machine stuff.
http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture

The good thing about this one is it shows you how you can use WM/GC to get erosion on your sculpt. After doing that you can bring it back to Mud and then do the Vdisp... theoretically.

That terrain is great. It shows how using several different methods can get you something interesting. For example, although World Machine is really great I find terrains tend to look very obviously World Machine. Maybe it's just people not expertimenting enough. I only played with World Machine for a short time a long time ago.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 16, 2013, 10:24:21 PM
^^
I suppose you could load the Vdisp as a hightfield and apply Terragen erosion to it there?
Lots of experimenting to do yet!

Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 12:12:05 AM
Hello,
A possible request here.

I was looking at the nodes needed to use a vector displacement as shown on page 1 of this thread.
With T3 coming I was curious why, perhaps, we need to load all of those nodes manually for this to work? I mean, could Planetside just make a single node thats idea (or more ideal) for this expressed purpose? One where we would import the vector to that new node, and where that new node contains all the parts shown in the image on page one?

Don't know if it would be better or not. Just an idea. seems like it would be simpler though.
Title: Re: Mudbox displacement maps in T2
Post by: paq on July 17, 2013, 07:18:11 AM
Sure, I would love to see a 'true' 3D erosion node, but so far all those terrain generator softwares only works with elevation data.
I did some try to erode one of the color channel (y blue) from a vector displacement, but the result is very unpredictable.

Vector displacement is still very limited imho, you cant go into very extreme shapes.

We need voxels :) ... with voxel erosion  8)





Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 07:19:02 AM
The vector displacement node already exists.  Just plug an image map into it right input and follow with a compute terrain.  Works with a .exr file
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 07:35:05 AM
Vector displacement is still very limited imho, you cant go into very extreme shapes.

This is where you lose me a little. what kind of shapes are you finding just don't work? you haven't posted an example for that particular idea.

On erosion, well perhaps not a vector. But this tut clearly shows you can go from mudbox to Terragen through WM or GC. http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture
That is, I deduce that if you can get to WM, GC from mudbox, than you can get to Terragen from WM or GC.

So I guess perhaps not exactly what I hoped, but still a nice additional option.

Quote
The vector displacement node already exists.  Just plug an image map into it right input and follow with a compute terrain.  Works with a .exr file
Ok, but Im confused. On page one in paq's first image post there is an image of the node network used to make the first vector terrain for this thread. All of those node (including blues) are or are not strictly necessary? I don't know?
If they are, I was suggesting that planetside make a single node for vectors that do what all of those do. But if not, then why are they there exactly?

[attach=1]

See what I mean?
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 17, 2013, 08:12:28 AM
It's better to use all the loose nodes, as you can rewire the way you want it. It's also interesting to add additional VD nodes with different additions/subtractions of the red, blue and green lines inserted. Kind of sculpting from a base map.

I only wish I could get this going procedurally... still trying... must be possible. I don't want to use VDISP maps if not necessary.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 08:13:48 AM
Those blue nodes are not necessary, but you can see that he swapped channels.

The build vector has a main input followed by 3 outputs which are "red" "green" and "blue" respectively.

I suppose that the software he made the vector map in used the blue channel for Y instead of the green channel (like TG).

So splitting the image in its separate channels to then recombine using a build vector allows you to reconstruct the intended vector map as designed in your other software.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 08:19:58 AM
I only wish I could get this going procedurally... still trying... must be possible. I don't want to use VDISP maps if not necessary.

There's one thing I haven't understood through this whole topic: how would this "vector displacement" differ from ordinary powerfractal displacement?
That also spits out vectors with displacement.
I don't see the real difference yet, other than that with the vector displacement shader you can weight each X/Y/Z vector individually.

In other words; isn't it already procedurally present in TG simply in the form of a powerfractal?

I suppose these remarks/questions are a simple consequence of my post on the previous page where I stated I find this topic interesting, but the discussion rather fragmented, confusing and not really clear to me what everybody's doing or talking about :)
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 09:46:37 AM
TU, the real advantage over the powerfractal is that you can precisely sculpt the terrain or feature you need to realize an idea.  Most of the time, I spend hours trying to achieve something akin to idea in my head, now I can achieve exactly what I want it in minutes. Think of a vector map as a sophisticated HF. My beach pic in image sharing begins to show what I mean, the piece I'm working on could not be achieved with powerfractals.


Badger I haven't been able to create holes, edit the .exr in photoshop or get subtle details yet.  You have to create large bold shapes. I'm still experimenting with setting so maybe in the future.  Other apps such as mudbox might be able to produce more detailed maps. I only have zbrush to play with but blender might be a good bet in the future.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 10:30:53 AM
I see some ways through some of these issues. But I have to try it.

T-U
   I cant say its better. I just say if it works its a nice new tool. And for me at least, it will make some things much much easier. And I agree that if it works like I think I can make it work for me, it will make me much faster. I will be able to spend more time rendering and less time building with complex nodes I don't fully understand. And I suppose it would be true for a lot of others also.
   
You are completely right about this thread not answering fundamental questions though. Probably we should split this thread once we get our first Mud and Z step by steps. Then we can just work on refining that info into really useful instructions and versions.

Mhaze,
Quote
Badger I haven't been able to create holes
But both Chris and Ulco did. So we know it can be done. Right? (Chris used Z, and ulco used PS) Ill test mud, and hopefully T-U will too when he has more time.
And hopefully Paq and J will jump back in when they have some time also.
Between all of us we should be able to figure every little detail?

I think I am just going to shut my mouth now until after this weekend, when I have the time to really dive in and prove my ideas. Or disprove them.
But based on what you guys have all already accomplished I don't see why I shouldn't be able to do what I hope to do.  :-X

Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 10:31:57 AM
TU, the real advantage over the powerfractal is that you can precisely sculpt the terrain or feature you need to realize an idea.  Most of the time, I spend hours trying to achieve something akin to idea in my head, now I can achieve exactly what I want it in minutes. Think of a vector map as a sophisticated HF. My beach pic in image sharing begins to show what I mean, the piece I'm working on could not be achieved with powerfractals.

Yes I understand that concept from the beginning of this topic, that's not the problem I'm having.

It's one of the reasons I found a recent CGSociety discussion so good, where one guy started to ask "what the f.... are we doing for years? Working with polygons, UV's etc. It's all such a pain, why the hell are we still doing it this way?" And I couldn't agree more and I suppose it's quite a bit what Ulco meant with "I want to be able to do this procedurally" because then you won't need to worry about UV's and all those other ancient concepts where this whole industry has its foundations built on.
Ghehe, this almost sounds like a rant :D

I'm mostly very confused about the fragmented app-specific discussion and all the UV-stuff involved.
Possibly together with the lack of examples and properly described workflow.
I'm following this at a distance so to say, as I'm not actively experimenting and that definitely means that it can be quite hard to follow from time to time. For me at least.

The fact is that TG procedural noise is not "directable" and that's why you paint maps.
I can create a "build vector" node and attach a colour-PF to each of its axis-inputs and I would create a procedural vector displacement map.
So it's not that you can not do it, but that it is rather impossible because of the lack of "art direction" you can give to your fractals.

That was partially the point I was making with my previous point.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 10:32:47 AM
Thanks Michael, I think that's a great idea to get it all written/worked out for each specific workflow :)
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 11:59:20 AM
I completely agree about the old ways of doing things.  The industry wants precise results fast and there are new ways coming but it will be a while before they get here.  It is not easy to do this in PS we are back to the hours experimenting hence the use of sculpting apps.  I've played with both now and will use both and I've some ideas about how to push sculpting much farther and it will remain my primary approach.  PFs have their uses and I'll continue to use them but in conjunction with more controllable techniques such as VDisp and HF imported and meshes.  I just don't have the brains to do it any other way.  What we need is a voxel app that exports to TG and TG developed to support it. preferably free or very reasonably priced.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 17, 2013, 12:35:53 PM
Quote
it is rather impossible because of the lack of "art direction" you can give to your fractals
That is what I hope to change... find a way to control the way a fractal variation can be used in xyz 'vector displacement' by clever multiplying, color adjustment, transforming...

Just getting fairly decent breakers (again, yes, it's been a while) by using sin and cos functions and some VD....
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 01:58:27 PM
Quote
it is rather impossible because of the lack of "art direction" you can give to your fractals
That is what I hope to change... find a way to control the way a fractal variation can be used in xyz 'vector displacement' by clever multiplying, color adjustment, transforming...

Just getting fairly decent breakers (again, yes, it's been a while) by using sin and cos functions and some VD....

Exactly,..."by clever multiplying, color adjustment, transforming...by using sin and cos functions and some VD"...doesn't really sound like art-directing :)

Of course that's no critique to your approach and efforts, but it's exactly what you are trying to do: making something directable by adding other elements to the equation, but essentially making it more complex and more difficult to direct.

I think fractals are mostly useful for touching up and detailing your displacements, rather than allowing them to guide your main shape (the art-directive way).
Painting a vector map is nice and definitely allows you to get specific results, but like I said before the workflow and UV issues just make me horrify when thinking about starting with this.

Ideally TG should have voxel or iso-surface terrain support at some point which would allow you to entirely sculpt your shape and to not worry about all the other stuff if you don't want to.

Of course I'm acting very lazy here :)
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 02:05:33 PM
Martin the uv and workflow issues are as easy as pie.  I'm not skilled with such things either but managed first try. Have a go it's easy really. 
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 17, 2013, 03:18:52 PM
.....
Mhaze,
Quote
Badger I haven't been able to create holes
But both Chris and Ulco did. So we know it can be done. Right? (Chris used Z, and ulco used PS)
....

It is not possible to create real holes with VDisp!(as mentioned earlier in this thread)
Chris has created a cavern as you can clearly see when /if you load his exr.
Ulcos example is a cave and I'd guess the seethrough part is cheated in the usual
way(transparency/opacity)somehow.
And Ulcos arch is a sphere actually.
You can't displace a real hole into a closed surface(the TG planet)! No way!

T-U - what uv issues are you talking about?
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 03:40:26 PM
I've just managed an arch by curving up and joining wto starting points.  Going for a run now will post later
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 17, 2013, 04:04:51 PM
Quote
Ulcos example is a cave and I'd guess the seethrough part is cheated in the usual way(transparency/opacity)somehow.
No, it was actual VDisp, nothing fancy.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 17, 2013, 04:07:01 PM
Assuming Terragen 3 doesn't have the problem with importing objects that are previously described ( I don't know if that is the case but it seems like it). Then arches and holes would be created from imported objects. The more methods the better because Terragen should be able to act like a rendering environment for anything you want to import. I know dealing with objects in Terragen isn't easy but the more steps in this direction the better.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 04:31:51 PM
.....
Mhaze,
Quote
Badger I haven't been able to create holes
But both Chris and Ulco did. So we know it can be done. Right? (Chris used Z, and ulco used PS)
....

It is not possible to create real holes with VDisp!(as mentioned earlier in this thread)
Chris has created a cavern as you can clearly see when /if you load his exr.
Ulcos example is a cave and I'd guess the seethrough part is cheated in the usual
way(transparency/opacity)somehow.
And Ulcos arch is a sphere actually.
You can't displace a real hole into a closed surface(the TG planet)! No way!

T-U - what uv issues are you talking about?

AHHHHHHHH, you mean a hole through the plane/world! Duh! I thought you guys were talking about a hole in the ground like a pit  ;D ;D ;D Well I thought you were all crazy! I was like it is right in front of you! Sheeesh.

Ok, now that I finally got on the bus. What do you need to make a hole through the world for. I mean maybe I have a hole in my head. But I just never seen a hole through a planet before, so why want to make one? Just the tech involved or what?

Anyway, I know you can make a hole in the plane. But you would have to render the sculpt as an object. But why *may* someone want to do that?

On the arch, well, you don't need to make a "hole". There are a bunch of ways to sculpt up to form a bridge or an arch. On one of the previous pages I posted some images of bridges to Ulco. I know I can sculpt all of that in one mesh. Just do a little trickery is all.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 17, 2013, 04:36:18 PM
Arches,Michael,arches.

Ulco - I was talking about that one http://www.planetside.co.uk/forums/index.php/topic,16154.msg158475.html#msg158475

If that is just VDisp and not cheated please explain.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 04:38:39 PM
^^
Sorry, I was editing while you were responding. A bad habit. But I didn't think anyone was on who would be posting here. My bad.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 05:07:42 PM
Here's a quick zbrush arch imported and VDisp in TG
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 05:09:42 PM
Very cool! Keep going, mhaze!
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 17, 2013, 05:26:49 PM
That arch is excellent because it blends in with the ground. It looks natural.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 17, 2013, 05:28:07 PM
Nice one mhaze.
Just to avoid more confusion,please mention again how it was done,so that new
readers can follow easily.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 06:17:28 PM
Can I see the two separate sections meet at the top centre? It's a great arch nonetheless!
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 17, 2013, 06:21:44 PM
I was just about to say; they MUST meet somewhere. But it's nicely disguised. I know this can 'easily' be done with outside made maps, but I wish it were possible from within TG.

And @ Jochen: it is just VDISP (painted map), the light in the end of the cave is a light source, not light from 'the other side'. 
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 06:37:51 PM
I was just about to say; they MUST meet somewhere. But it's nicely disguised. I know this can 'easily' be done with outside made maps, but I wish it were possible from within TG.

Yes indeed. I just mentioned that a couple of posts ago that it would be great if TG some day would have a voxel based system for iso surface terrains.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 07:22:05 PM
Just two areas of displacement nudged over until they meet.  Will be better disguised with some TG displacement
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 07:38:43 PM
Quote
Anyway, I know you can make a hole in the plane. But you would have to render the sculpt as an object. But why *may* someone want to do that?

You know, I have to take this back. You can make a hole and render it as a vector in terragen, I believe. Its just the hole cant be going down into the planet.

Here is how (maya mud)

1) Start in maya with a Maya plane.
2) build a bridge (low polly) in maya with both ends connected to the plane. So the base ends of the bridge extruded out from the plane. (you will have to add at least one, probably two smoothing levels in maya to do this)
3) "Send to Mudbox"
4) sculpt
5) continue as "normal"

See?

No need to "blend two ends. No need to sculpt up from nothing.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 17, 2013, 07:51:24 PM
I'm waiting in anticipation to see the result of that experiment Michael :)
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 17, 2013, 08:09:57 PM
Me too ;D but it will work.

Im looking forward to doing stuff like this:
http://gitacademy.tripod.com/GodsInTraining/NumenorStatues.jpg
http://24.media.tumblr.com/09a8af783d7a411e33d5eca2ebc50673/tumblr_mhbn5mp67V1s3bfv5o1_1280.jpg
http://cdn.desktopwallpapers4.me/media/wp_1366x768/2/11631.jpg
http://www.fuzzywaffle.com/data/508/Fantasy_Dark_Castle_Tower.jpg
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 17, 2013, 08:30:09 PM
This can be done with Xnormal from any 3D program as far as I can see. Xnormal can create a vector displacment from base mesh to sculpt mesh.

In theory it's possible with Blender but I haven't solved that yet. I'm giving up on it because Blender Windows is a disaster area and I'm tired rebooting from Linux to Windows just to get the decent Blender version. This is amazing because a majority of people are using Blender Windows. I can't currently export from Blender Windows without crashes. Maybe Xnormal will work under Linux wine but I can't be bothered trying.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 17, 2013, 08:41:04 PM
Occurred to me that I don't need to use a simple plain as abase mesh - just haven't got round to it. Tomorrow
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 17, 2013, 08:45:25 PM
I'm downloading a newer Windows Blender version to give this another try. I'm not going to use xnormal for this but I'm just seeing if it works.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 17, 2013, 09:09:15 PM
I can't get this to work. Wow, I'm out of this OS for sure. Spinning blue circles, Ctrl ALt Del. Blender is terrible. Anything resembling a big mesh is disaster. Doing a UV unwrap takes about 20 times longer. I can feel the Windows road rage coming on. Fortunately Terragen is pretty stable. I just upgraded Modo for Linux version and there no comparison. the Windows version is crash city.

Maybe someone else can try this with Xnormal.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 18, 2013, 10:48:47 AM
I created an arch as a base mesh in silo - imported into zbrush and added detail. Imported into TG and it does not work! I guess the displacement needs the base mesh to work on and goes crazy if you  try to apply it to a plane. Not surprising really but worth knowing. Maybe we'll be able to import a mesh and use vector displacement on it in the future.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 18, 2013, 01:44:30 PM
I am not so sure. There should not be any difference. Can you identify a definable difference? THis is strange!
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 18, 2013, 03:23:10 PM
Ulco - thanks for explaining,a light source would have been my next guess.

Michael - You don't leave out any chance to produce more confusion,don't you? ;)



           
I was just about to say; they MUST meet somewhere. But it's nicely disguised. I know this can 'easily' be done with outside made maps, but I wish it were possible from within TG.
...

As far as I can remember Old Blaggard already did that some years ago.(in TG)
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 18, 2013, 04:11:02 PM
The technique Old_blaggard used is based on displacing a section of terrain upwards and then bending it in steps downwards to shape an arc.
In the end it's still a pinched piece touching the terrain where the arch meets the terrain.
It's inherently not possible to get it "true" 3D.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 18, 2013, 04:20:58 PM
Martin- Didn't we talk just about that?
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 18, 2013, 05:49:30 PM
This thread is a good advert for Mudbox and not so good for everything else. I still haven't managed to achieve it. 3D Coat will be able to do it but I haven't figured out how. Why is this so difficult? I don't think Modo can do it at all.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 18, 2013, 05:59:30 PM
And now for something completely dif...no wait it's not completely different,but it's not
directly related to my last post.

Something you actually can do to help you sculpting is to alter your base mesh a bit.
Like this for example
[attachimg=1]

In ZB
[attachimg=2]

as you can see the mesh is not stretched as much as it would had I sculpted from a
normal plane.

and in TG with a little PF displacement applied
[attachimg=3]

It's just a test,so excuse the low quality.

Hope I could contribute to the general confusion ;) ;D.

Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 18, 2013, 06:01:00 PM
efflux - read what paq wrote in the beginning.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 18, 2013, 06:09:03 PM
Nice trick will have to remember that one.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 18, 2013, 06:09:25 PM
That's a very nice example, Jochen. But I don't know why the base mesh should be altered. I do encounter some problems though, using mudbox. I sometimes have to subtly adjust the ZYX variation in the VD node to get the exact sculpt. And the base is always a bit dipped as soon as it's displaced in TG.
I now use the 'world' space to save the exr in. That right?
If you multiply the XYZ too much in TG the mesh gets displaced too much, there's a balance between the size of the square image and the displacement.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 18, 2013, 06:22:11 PM
It's better for sculpting on verticals,less stretching of polygons.
World space is what I am using too.Tangent is for animated stuff afaik.
Yes there is such a balance and there might be more like the size of the
plane,but I have to test some more before I can tell.
I have no idea about that dipping,have to think it over.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 18, 2013, 08:07:18 PM
efflux - read what paq wrote in the beginning.

I've seen that paq used Modo yet apparently Modo doesn't do export of vector displacement from what I've read but I'll have to look into it. Why this is so difficult to deal with is beyond me.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 18, 2013, 09:03:54 PM
I'm just going to plough on with other things in Modo at the moment. When I eventually find the way to do this I'll try it. It would be good if there was a cheap way using xnormal or something but I just couldn't get that to work from Blender even when I got the meshes out of Blender.
Title: Re: Mudbox displacement maps in T2
Post by: paq on July 19, 2013, 02:48:33 AM
Well in modo just add a displacement map (top menu / texture / add displace texture) ... and sculpt your model.
Dont forget to save the texture when you are done.

With modo you dont actually sculpt, but you are in fact allready painting the vector displacement map ... so there is no baking needed. The bad side is that the sculpting tools are a little bit weird sometimes, especially the smooth tool.

I'm not really sure what you are trying to do with xnormal, extracting a vector displacement from an highres to a plane for example requiere all the in between subdivision level.  You cant just import an highres and do an extract. So the baking, or let's say the vector map creation, has to be done in your sculpting application (zbrush or Mudbox).

Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 19, 2013, 04:44:55 AM
There is most definitely a difference in working in Mud and Z for this purpose, from what Im seeing in this thread.
Namely, 32bit vs 64bit. And the amount of polygons you can work with... so ultimately detail created and available in the vector. However, if your adding power fractals for color and displacement then thats not too big a problem as Chris proved with his image and files that he posted.
So working on detailing a sculpt with 6 million polygons vs 20 million.

We should also try to post some facts about simpler file issues
1) What is the difference in quality when using a vector made from a sculpt with relative small number of polygons VS a high number?
2) What is the difference in quality when using a vector made from a sculpt, when the vector is saved out at 1K VS 2K, VS 4K, VS 8K VS 16K, VS 32K?
or more simply, 4K VS 16K?
3) If there is any benefit from using a 32K vector, what if any issues arise in terragen when using a 32k vector? How heavy is the file? Any problems?

I know we are still working out workflows and very basic things, but at some point we should have the answers to the above questions too. I would think there important, but Im just thinking out loud ;)

@J
lol! Yeah, making things more complicated is my job. Until monday that is, then I will be able to actually help you guys sort through all of this by testing too.
But truthfully I thought that idea about using a more complex planes would make things easier not harder. I was really surprised by your post on the last page showing the problem and fix. I simply don't understand why that problem would happen in the first place? I mean, I don't understand what the fundamental difference in the two planes are. Also, its more complex because of the amount of software we are using, but even then shouldn't a plane in Mud vs a plane in Z, Vs a plane in Maya, ultimately be the same thing?.. Yet we are beginning to see some differences I think.

Maybe there is something about the vector when its created, that makes a difference? Or maybe Terragen views a difference. For example, OBJs made in different software have different issues in Terragen. On the OBJ, we know from threads in this forum that different softwares write out OBJs slightly differently and we know what problems that causes and does not cause.
Can one of you who has the understanding look at the vector code and see what difference there is if any? And somehow define what any difference means?
Perhaps not now, but once we are all ready to make step by steps or concrete conclusions about this workflow?

Or maybe Im totally off the bus again? I don't know.

This is fun as heck though ;D 8)

By the way J. That face you made in your example sculpt is AWESOME! It looks like Moses, or maybe a Greek statue of Poseidon. Anyway, its very god like. Very cool face.

@Efflux
Take your time man. Once you get things worked out, it will be nice to have the additional workflow. Im not familiar at all with 3D coat, but I see from reading on line that lots of people use it. So probably some of them use terragen too.
Title: Re: Mudbox displacement maps in T2
Post by: Tangled-Universe on July 19, 2013, 02:01:58 PM

...

We should also try to post some facts about simpler file issues
1) What is the difference in quality when using a vector made from a sculpt with relative small number of polygons VS a high number?
2) What is the difference in quality when using a vector made from a sculpt, when the vector is saved out at 1K VS 2K, VS 4K, VS 8K VS 16K, VS 32K?
or more simply, 4K VS 16K?
3) If there is any benefit from using a 32K vector, what if any issues arise in terragen when using a 32k vector? How heavy is the file? Any problems?

...


I guess a nice systematic way to find this out would be too:

Make a plane with a certain fixed size, say 50x50 metres.
Use a fixed amount of subdivision so that polygon size is constant.
Sculpt details.
Export to 1k, 4k and 16k (4-fold increments).

Repeat this with either 2 lower or higher levels of subdivision.

Then investigate on what's the limiting factor.
There must be an ideal resolution for each situation, of course, but since you work with quite constant and predictable size-effects you should be able to derive a kind of rule of thumb like:

use 2k for subdiv2 on 50x50m grid
use 4k for subdiv3 on 50x50m grid

Just to name something of course, but something along that line.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 19, 2013, 02:55:57 PM
Last one for now.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 19, 2013, 03:38:22 PM
....

We should also try to post some facts about simpler file issues
1) What is the difference in quality when using a vector made from a sculpt with relative small number of polygons VS a high number?
2) What is the difference in quality when using a vector made from a sculpt, when the vector is saved out at 1K VS 2K, VS 4K, VS 8K VS 16K, VS 32K?
or more simply, 4K VS 16K?
3) If there is any benefit from using a 32K vector, what if any issues arise in terragen when using a 32k vector? How heavy is the file? Any problems?

....

1.one difference is that you would have a more faceted sculpt - visible polygons - and
   thus you would have those facets visible in the VDisp too.
2.to make it simple the higher the resolution the higher the detail.
3.Don't know,never used a file of that size.File size would be huge.

Btw you can utilize up to 500 millions of polygons inZB via HD sculpting.
6 millions was just an example,20 would be possible too,no problem.

If you don't understand the difference between those planes it would be a good
idea to make some simple basic experiments like taking a normal plane in a low
subdiv state and just pull up the middle and sculpt vs a modified one,things
like that.Experience beats theory you know.

Thanks for the compliments.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 19, 2013, 05:37:08 PM
Almost forgot to mention:size does matter.
Setting the plane size to 200m in my modeler before taking it to ZB and then
sculpting and extracting the map did it.In TG I set the image size to 200m and
indeed the final multiplier of the VDisp shader could be left on 1 just as it
should be.
Title: Re: Mudbox displacement maps in T2
Post by: efflux on July 19, 2013, 09:05:08 PM
Well in modo just add a displacement map (top menu / texture / add displace texture) ... and sculpt your model.
Dont forget to save the texture when you are done.

With modo you dont actually sculpt, but you are in fact allready painting the vector displacement map ... so there is no baking needed. The bad side is that the sculpting tools are a little bit weird sometimes, especially the smooth tool.

I'm not really sure what you are trying to do with xnormal, extracting a vector displacement from an highres to a plane for example requiere all the in between subdivision level.  You cant just import an highres and do an extract. So the baking, or let's say the vector map creation, has to be done in your sculpting application (zbrush or Mudbox).

OK. There is a video on youtube where a guy uses xnormal with Modo. He does create the vector displacement map in xnormal. I think that's because he bakes down to lower res mesh.
Title: Re: Mudbox displacement maps in T2
Post by: paq on July 19, 2013, 10:49:09 PM
Do you mean the head baking example ?

In that example the shape of the lowres is allready very close from the hires one. In fact even 'classic' displacement map could do the job. Sure vector displacement is giving much better result (especially for the ears).

But that example is very different that starting from a flat plane (what we are doing here in terragen). If you are starting from a flat plane, you need the intermediate subdivision to build an accurate vector diplacement, that's why you need to do it in you sculpting software.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 20, 2013, 07:22:50 AM
If you use basic shapes, just to get the specific caves or outcrops, you can do the rest in TG. Then you wont need very high resolution, I'd say. You may need an extra compute terrain before you apply additional displacements to calculate the initial terrain after VDISPing the cave.

Note on this one: needed to increase displacement tolerance to get the high billow to render alright. Funnily, it did appear in the prepass.
Title: Re: Mudbox displacement maps in T2
Post by: paq on July 20, 2013, 04:33:59 PM
Hi Dune,

That's some really great extreme example.

Just wondering, on the last pic, did you add a local light or something ?
There is something really weird with the lighting, at first sight I didnt really get the shape .
Title: Re: Mudbox displacement maps in T2
Post by: chris_x422 on July 20, 2013, 10:12:40 PM
Hi guys,

been missing from this thread all week due to working away from home. I've not fully caught up, but will try to add a few more thoughts, so forgive me if any of this has already been said.

j meyer has it spot on as to how the workflow pans out in terms of setting scale and keeping the one to one height relationship.

I always set my scale in maya before exporting for sculpting, and out of habit always export 32 bit floating point maps for the sake if it's higher accuracy and detail.
It's all really no different to the normal creation of any sculpted displacement map. It's just essentially the calculation between one state and another, the base and the sculpt.
The base being a representation of what coexists inside terragen, ie a flat plane or a sphere (globe). It's for this reason say, that you can't work from a base shape that does not already represent what you plan to displace in terragen, as when you re-displace in terragen you are essentially recreating that difference again from original state to sculpted state. Hope that makes sense. The only difference between a vector map export and traditional grey-scale is that the vector displaces in xyz as opposed to just the one direction in grey-scale.

As I think I mentioned earlier, if the functionality of being able to subdivide imported meshes arrives in terragen, then your base shape can be anything you wish, with the ability to then do additional displacement, even on individual areas.
The technique I outlined after working on Snow white is relevant as to producing hybrid workflows with meshes already existing in terragen. http://1isok.com/huntsman_workflow_01.htm (http://1isok.com/huntsman_workflow_01.htm)
It enables you to take any part of a landscape from terragen, either procedural, dem based etc, then export areas for sculpted treatments, and re-apply in terragen. It's a powerful and flexible technique as it allows you to focus and reshape any area you wish, as well as concentrate detail where it's needed.

The map size and density of any sculpted mesh you might need is usually dictated by how close the camera is to the area in shot, it just has to hold up to scrutiny, I usually subdivide to a level that I know is producing the detail I require for sculpting, then test a couple of exported map sizes to test how it's holding up. With experience it comes pretty quickly, but it's a good idea to test, as you can save a bucket load of memory and render time by not exporting higher resolutions than are needed.

Hope that all makes some sense.

Chris
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 21, 2013, 07:59:49 AM
I have tried making a plane in Lightwave, subdivide it a few times and export that through Poseray as obj to Mudbox. Then did some sculpting and exported a vdisp map. Didn't work, I got all small ugly displacements.
If I don't set any size to a plane in Mudbox, and sculpt, export and vdisp in TG, I can set any size to that sculpt, as long as there's a cohesion between map size and vector overall displacement magnitude.
What would be the straight lines occurring in the map? Blue and red I think. And why would I have to rotate the vector -90 degrees, and switch green and blue channels (green as Y, blue as X, red as Z). I don't quite get it yet....
Does anyone else work from mudbox? Can you subdivide parts of the mesh, and how?
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 21, 2013, 06:57:57 PM
Quote
Does anyone else work from mudbox? Can you subdivide parts of the mesh, and how?
If you mean half the mesh and not the other, than no. It is all or nothing.
However, you can freeze parts of the mesh while sculpting so that the area you want to effect is effected, but no other part.

Mudbox and Z are different in this way. You should be able to get up to 10-20 million polygons in Mud with little or no problems if you have a good graphics card and memory. So you should not need to worry about limiting subdivision to one area.

here are some links that contain stuff you need to know:

http://forums.autodesk.com/t5/Autodesk-Mudbox/ct-p/area-c3
http://area.autodesk.com/tutorials?word=&where=1&software=11&tutotips=&level=40
http://www.mudboxlive.com

^^ all free.

Ulco, you can also work in non destructive layers just like photoshop.


Also, don't worry about the key code. THey WILL send it to you. IF you download from registering a student account, and the download worked, then you were approved and they will send the key. Otherwise re register online for a immediate response.


Also, I like the image above of the rocks in the sand. Some good color there too.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 21, 2013, 07:28:50 PM
Also,
if you just google "mudbox terrain", and go to images, then click on an image that interests you, you will also find a ton of info that may help.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 21, 2013, 08:21:32 PM
Thanks Michael!!
Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 24, 2013, 03:01:45 AM
You guys have been producing some fantastic work.  I've been playing with zbrush a little but am object challenged.  It always comes out wrong, I think my base plane object is no good -    j meyer, if you could upload one for me, it might set me straight.

I've always wanted to be able to apply TG surface shaders in their fullest glory to objects, and the idea of capturing the vector displacement of the final object against a plane is genius!  I just wish there were an easy (or not) workflow that would allow any given object to be converted to a vector displacement exr file (where you could pick the direction of displacement, top view, front view, etc).. 

And I imagine that it would be possible to stack multiple exr files on top of each other (by bringing them in one at a time in TG) - that would likely produce even more interesting (though unreal) shapes.

Anyway, enough sad rambling from me and congratulations you guys for a super breakthrough!!

Piet
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on July 24, 2013, 12:24:45 PM
Hi pfrancke,

Were you asking for a vector that works the way it should or a Terragen file with a vector in it thats working properly?
If you just need a Z-brush vector that you know was done right to experiment with, Chris posted a beauty a few pages back
http://www.planetside.co.uk/forums/index.php/topic,16110.105.html
There are two posts, one link works the other does not

A step by step for vectors created in Mud is on the way, too.

Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 24, 2013, 01:33:06 PM
Hi Badger -- no, I've got zbrush and was exploring the flat plane object into zbrush,  Sculpt in zbrush.  Create vector displacement in zbrush, exr into tg workflow and just keep getting bad/mixed results.  My suspicion is that my beginning plane object is not up to par.
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 24, 2013, 02:53:35 PM
You sometimes have to play with the image map size and vector disp settings.  I've found that if you use a modelling program such as max or silo to create your plane you must make sure you use meters as a unit.  Then when you set up Terragen 3 set the image map size to the size of your plane and everything in the vdisp shader to 1 although I sometimes have to play with the final multiplier.

If you started with a 32 x 32 plane, the displaced terrain should be 32 meters square and you may need to zoom in or you can  to scale it up to whatever size you want. You can do that in the vdisp shader or with the transform shader.

I've been using a 128 x 128 plane lately as it allows more detail to be sculpted.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 24, 2013, 03:12:42 PM
pfrancke - Do you try with ZBs procedural plane? That definitely has some problems.
               Of course I could post a plane,but at which size and resolution? May be
               it would be a better solution for you to get a free app like Wings3D or
               so,thus you could do it according to your needs,not only now,but for future
               projects also.
               Otherwise let me know the resolution (16x16 squares e.g.) and the size
               in meters.


I've tried to rotate VDisp via transform shader and found that it gets distorted.
Good to see especially the closer you get to 180°.
Could someone confirm,please.
Also found a solution,but first I'd like to make sure that it is not a "my machine only"
thing again.
Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 24, 2013, 04:05:09 PM
thank you guys -- when I see the terrain in TG, but it is very small.  Probably my plane was not in meters.  I created the plane in blender and am confused easily.  I tried dynamesh on a zbrush primitive also, but ran into a variety of difficulties.  I'm with you about having to modify the multiplier on the vector node and the size on the image shader and the linear indicator.  But my issue is that the displacements that I DO get are just crazy wrong.

My starting plane would almost always be used in a scene like the Mhaze beach scene.  So bigger is better.  I'm thinking 256x256 in meters would be great (unless 512x512 could work).  In Zbrush, since we have to do the morph target switch anyway, it probably doesn't matter how many subdivides we do on the sculpted object (that started with the plane), since the vector displacement is intended to go back to the morph target starting off flat plane anyway.  So I'm thinking bigger is better for "landscape" type work.  J Meyer, if you could upload a starting plane, I would be in your debt.   No question, getting proficient with objects has to be something that I get better at!
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 24, 2013, 04:14:22 PM
Hi

I can confirm, over 90 there's distortion increasing as you get nearer 180
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 24, 2013, 05:02:18 PM
Thanks Mick.
I'll say some more in a few minutes.

pfrancke - Here you go a 32x32squares plane set to 512meters.
Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 24, 2013, 05:17:44 PM
thank you so much!  I'll play with it later tonight and see if I do better.  Much appreciated.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 24, 2013, 05:33:33 PM
As for the rotation and scaling of VDisp the solution is you have to use a rotate y vector
node before the transform shader for rotation and a multiply vector together with a
constant scalar for scaling.So for a 120° rotation you'd have to set the rotate y vector to
120 followed by the transform shader set to 120(Y-slot) also.
Scaling:for a half size scaling for example use a multiply vector with a constant scalar set to
0.5 followed by the transform shader with all scaling slots set to 0.5.
There might be other solutions as well.So if you find another one let us know.
Translation works fine just like it is apparently.

And for those who want to make "populations" I've prepared a simple example to show
how you can go about that.

[attachimg=1]

[attachimg=2]

Of course you have to figure out yourself which kind of distribution you want and set up
the nodes accordingly.
Confusing enough for you guys? ;) ;D

pfrancke - you're welcome.
Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 25, 2013, 01:22:27 AM
for me, key was using the plane object jmeyer uploaded for us.  Pretty much the only thing I had to do was set the size to 512 in the image map shader.  I'm going to import the 32x32 object into blender and see if I can make it larger and have it still work.  J - a zbrush question..  what workflow/procedure would you use if you already had an interesting object?  Would you append it to the plane and go from there?  Would you work in 2.5 mode and create 3d and then append to plane?  Or pretty much do you need to start all sculpts from the imported plane staying away from dynamesh, etc.  Thank you guys much for creating these workflows, it might be a cool way to get complex objects into TG as terrain.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 25, 2013, 06:56:28 AM
It's funny that I found the same issue with rotating a map, and also found the same solution as you did, Jochen. Also, if you want to place it elsewhere and rotate, it seems better to move it by transform shader than setting the map location, but I'm not yet sure about that.
But it's a major step ahead if you can use this feature.
Next I will try  to use Sculptris instead of Mudbox, as in Mudbox the pulled out shapes don't update on 'vertex finesse' (it gets lower poly), then load the obj in mudbox to complete the map....
Title: Re: Mudbox displacement maps in T2
Post by: mhaze on July 25, 2013, 09:50:41 AM
Looping and a random node would make bigger pops(and recursion possible) so much easier!  I hate to try and use more than 10/15 copies would take forever.
Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 25, 2013, 03:26:53 PM
One more thought about vector displacement from me..  Having seen Dune's efforts to create the displacement from scratch just using a photo editing program that can work with exr files, the thought crossed my mind that if a program like zbrush or mudbox creates and exr file with vector displacements, I wonder how effective editing such a file with photoshop type filters might be.  I know the types of things you can do to an exr file is limitted, but if you could use a blur filter for example, it might remove blockiness that a lower resolution sculpt might have produced.  And if you gently add certain colors, it might  produce certain types of effects.  Anyway, I can see that I'm going to have to reread this thread to see what hints Dune might have provided regarding "how to edit" an exr file.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on July 25, 2013, 03:29:51 PM
You're correct, Piet. I did some editing of existing exr's. You can't really paint unless you temporarily switch it to 16-bits, but you can use blur and use lasso and fill. It's  very interesting to explore these possibilities.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 25, 2013, 04:13:02 PM
Ulco - yes using the transform shader to move it instead of the image location slots
         is what I found to be the better way,too.Even setting the map to center instead
         of bottom left caused some problems.


mhaze - I don't know what you want to create,but you can do a lot of stuff that way,
            you just have to come up with a good distribution.


pfrancke - I would use Projection and actually I did already.That's another thing where the
               modified plane comes in handy.Thus you can use Dynamesh before projection.
              But remember:no holes! or break throughs.
             


Title: Re: Mudbox displacement maps in T2
Post by: pfrancke on July 25, 2013, 06:21:39 PM
Thank you for clues!

I'm still a little (or a lot) confused.   Morph Targets require the number of points to remain static, so geometry can’t be deleted or added without destroying the Morph Target.  If you do dynamesh, or whatever and then projection and the model changes, how do you get the morph target back to the flat plane, so that the vector displacement is from flat to final?   In your sample workflow, you started with the plane and the Morph Target.  Can you describe a simple workflow where you are trying to get a vector displacement for a model that has different geometry (number of points) than the plane?  (I'm thinking I'm missing a big step - I've only had zbrush for a month and am in the early chapters of figuring it out).
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on July 25, 2013, 07:23:49 PM
No problem Piet,it's quite easy.If you have an already existing model you want to use
and maybe a second one (just to bring in Dynamesh here) you just take model no.1 and
append model no.2 as a subtool,than combine subtools,than dynamesh them with an
appropriate resolution to get all the desired detail.
Now take a modified plane like shown here
http://www.planetside.co.uk/forums/index.php/topic,16110.msg160304.html#msg160304
append your new mesh as a subtool to the plane and project the sculpt onto the plane.
As for the modified plane: the way to go is make two versions,one flat the other already
stretched/pulled out to the cube like state.In ZB you load the flatversion,store the morph target
and than simply import the 2nd version into it.You should have the 2nd version visible
now (and when you click switch in the morph target subpallette it should show the flat
version again).Subdivide as needed.
Most of the time it's better to project step by step through the subdiv levels,starting with
the lowest of course.
You find more details about Projection and other stuff in the online documention/ZB-wiki pages.
Hope that helps,J.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 04, 2013, 05:34:36 AM
I apologize in advance if this is a stupid question, but...

Has anyone already stated, or discovered and not stated, that a plane must be a square?

Heres what Im curious about:

Suppose you have a a plane that is the exact shape of a moon image map. And then sculpt (which would be really fast) the image map onto the plane (I did this with my broken moon thing: http://www.planetside.co.uk/forums/index.php/topic,14529.15.html )
THe thing about what I did before was I was projecting a part of a moon image map onto a deformed broken sphere *like* object. What I'm curious about now, is if I could do a vector map that will wrap around a Terragen "planet02" Object, the same way a image map does? Then show the displacement the same way we have been doing in this thread?

Also, in terms of my broken moon project, I would think I need to be able to export Terragen's moon planet object to do what Im imagining now. But I think I remember reading that a planet object cannot be exported. Is that correct? Anyway, this last bit is a separate, but somewhat related question.

If there is a way to do what I asked, I know I can get much better results for my broken moon!
Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 04, 2013, 06:54:48 AM
@Michael: why not try it. Theoretically I'd say, sculpt a sphere, use a second sphere as base mesh, and map the difference. Then apply this to a planet's surface. Don't know about the projection type though, not Y I suppose... I might give this a go.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 04, 2013, 03:48:49 PM
I've tried it with a TG-sphere and it should be possible with spherical projection,
if your VD map generating app is capable of doing 1:2 (2:1?) rectangle maps,that is.
Haven't found a way to do this in ZB,only square maps.And thus you get a square
where only one half (of the square) is the actual map and the other is wasted space.
And so far TG (2.5) can't deal with those.
So,if mudbox can produce 1:2 rectangle maps it should work.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 04, 2013, 06:09:49 PM
I think it can. I'll try.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 04, 2013, 08:53:48 PM
Hi guys. Thanks.

Im still quite far behind on this (vdisp)
Frankly, I dont even know anything about: "if your VD map generating app is capable of doing 1:2 (2:1?)"
So I cant say anything on that yet.

I am able to reason based on what I do know, that some things should be/are possible. But I don't know how to do them yet.

If in experimenting you learn solid answers please share it!

@Dune
Cool, thanks! I think if it works, it will be another great use for us.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 05, 2013, 08:13:43 AM
I can't make it work for a sphere. I'll try a plane of 2:1... and project that into a sphere.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 06, 2013, 12:41:02 AM
Do you mean project it in TG?
Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 06, 2013, 08:50:23 AM
Yep. But it's not really working as I expected, so I'll drop it. Too much hassle, taking too much time.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 06, 2013, 08:22:16 PM
There might be more to it than I initially thought.
Keep in mind while reading,that I had problems with side z projection and Ulco
didn't have these.So you better test for youself to be shure that it's not machine
specific.
To find out what's causing trouble I took a sphere (in XSI) and a checkerboard texture
of 8x16 squares and set it up like one would do for HDR backgrounds or IBL only that
it was projected on the outside of the sphere.(Double checked it with a panorama
HDRI).
Then I had a look at the UVs and it was similar to what I've tried before with Wings
and ZB.
After that I launched TG and took a sphere and loaded my 8x16 texture into the
default shaders colour image slot,set projection to object uvs and rendered.
Then spherical projection and render.
Both looked different compared to each other and compared to the results in XSI.
To be shure I tried the same with a planet of the same size as the sphere.
Same results.Results here showed a 4x8 texture in spherical mode.
Then I tried the image shader,again with object uvs and spherical(don't forget to set
the coordinates to be the same as the planets/spheres) different results compared
to the results attained with the default shader.
Result now showed a 8x16 texture in spherical mode,but still different to what you get
in an app like XSI.
The difference is in the polar regions and seems to be due to the mapping methods.
It's an interesting test and not only in regard to VDisp.
Have no idea yet how to solve that.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 07, 2013, 08:10:45 AM
The maps that are produced are quite strange actually, and I now realize why you can't really paint them. You paint with white, but the 32bit maps have floating depths, so extend beyond white.
I even tried cutting the produced map in half for a 2:1 ratio, or stretching it to 2:1 before using it in spherical projection or UV projection, etc, all to no avail (I knew but nevertheless tried).
I'm quitting  >:(
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 08, 2013, 03:29:36 PM
Found a working solution,.....uuhmm err sort of.
It has two problems at least,the polar regions and a visible seam.
Polar regions have the same problem you get when projecting an unmodified
panorama shot on a sphere,some distortion.Often taken care of in some image
editing software.
I doubt that it'll be possible to correct a VD map like that.
The visible seam is also something that is most likely hard to get rid of,maybe
lessened a bit.

So,if you want a custom made/sculpted moon or planet you are definitely better
off to use your sculpted highpoly object or a lower poly object and a tradtional
disp or bump map,at least from my point of view.

The solution was to make a spherical mapped sphere (1:2 ratio) and in to use
spherical projection in TG,too.
I learned the correct way of mapping while/by doing the tests mentioned in
my previous post.
(btw,that's what I mean by experience beats theory Michael ;))

Feel free to ask if you got questions.

Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 08, 2013, 07:36:33 PM
Hi J.

1) I am curious if this seam can simply be placed on the non visible side of the object?

In the last image in the last post of the thread I linked, if you look closely you will see some issues with the "northern pole". I could have easily fixed this as its just a paint angle matter. But nonetheless shows if your not carful, there are issues the way I did it too. But yes, based on yours and Ulco's response, the first way I did it does sound more straight forward now.


2) It sounds like the seam is the biggest problem you ran into. How ugly are we talking here?

3) You said you just learned mapping. For clarity, your talking about mapping to a object, and not UV mapping?

Any images you can post that you think are relevant would be nice.

Quote
that's what I mean by experience beats theory Michael

lol. Yes but theory is immediately gratifying. Practice only pays off in the end  ;D

In all seriousness Im a little distressed by the results of all your testing next to my expectations of what the results should have been. I feel like Im being logical in my way of thinking. I feel like the results I was asking about here and earlier in this thread were and still are reasonable. I cant deny though that there is much I do not know, and therefore cannot include in my thinking. But I do have a Mudbox/Maya workflow to compare to.

I have been playing with all this as much as I have found the time to try things on my own. And I have to say that I feel like its all a bit more complex then it should be. I mean, once you get to the terragen part of things.
Do I dare make a request?

All Ill say is look at the number of views of this thread in comparison to all other threads and topics (and this has only been here for about 2 months). Dose anyone deny the immense interest level?

The fact is that Z-brush and Mudbox are not loosing ground as software, the user bases are only growing. It stands to reason then, that rather then Planetside implementing some sort of in app sculpting tool (which would still be nice). It would be at least more expedient to make working between Terragen and Z-brush/Mud a tad more direct/simple. Couldn't more be done to expand on the possibilities? Is there some way for Terragen to recognize a Mud or Z Vector, and know what to do with it (customized nodes?) That is, what we are doing here, does not appear to be the first reason for terragen to imports vectors. More like a benefit of some other idea?

I dont know though. I have no idea what happens behind the curtain. I only know what I see happen in the UI(s).

At any rate. If I have to keep to the workflow in the moon thread. Then I hope to see multi UV tile support soon. Its the next best way to get huge detail.

Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 09, 2013, 04:18:08 PM
Hi,
1.yes,of course it can be placed on the non visible side.I just thought you would like to
animate your moon maybe,or a fly around or so.

2.see picture.  the poles could be problematic,too,depends on what one wants to have
there displacement wise.

3.I said I just learned the correct way of mapping.That refers to the way the UVs have to
be set up to make use of a 1:2 ratio image (my 8x16 squares) and still be in 0...1 UV space
and square.
I did it wrong before and thus got a square map with one half of the space wasted.
At the moment I don't have any pics that could illustrate the UV thing,but if there is interest
I can quickly prepare some and we can discuss that,too.


Yes it is complex and it takes a lot of time.
As for getting huge detail you could look at some methods they used for avatar for example.
And there are some good tips/hints in some of the production interviews you can find on the
pixologic homepage.There was something about continuously swapping maps and stuff.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 10, 2013, 01:52:03 AM
J,
that is in no way the failure you seemed to imply. The seam is not even so bad.

Yes I would animate a camera and such. But I never had any reason to fly around the entire moon. So even with a issue at the polls and a seam in the back, you could still do a lot of camera moves and not be affected.

I will take a look at pixologic for the information you mentioned.

Also, while were still on the topic..
It was either the new tom cruse movie, or the new will smith movie, I saw a preview of. The clip showed the earths moon was destroyed.
Has anyone seen these movies? which one had the destroyed moon?
Im waiting for blue ray.

Quote
but if there is interest
I can quickly prepare some and we can discuss that,too.
Well Im certainly interested.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 10, 2013, 07:59:34 PM
Now for the UVs then.
We want to map a 1:2 ratio image (8x16 squares) to a sphere.
I like to do that in Wings3D and it's spherical map unwrapping results in this:
[attachimg=1]
The blue frame marks the 0....1 UV space and the background is a default one.
For that UV mapping layout a texture like this is required:
[attachimg=2]
Wasted space!
To avoid that some apps (in my case XSI) simply stretch the displayed UV grid,so that you
can see your undistorted texture in the UV editor.But this is virtual,actually the UV space
is still square (0....1,remember?).
Other apps,like Wings3D,use another approach.Here the texture is displayed distorted,
like this:
[attachimg=3]
So the unwrap from the first image would produce a result where the upper half of the
texture is missing:
[attachimg=4]
The simple solution is to scale the unwrap vertically:
[attachimg=5]
Now the squares of the unwrap are stretched to a 2:1 ratio rectangles.
Not that much wasted space anymore.So that is the "correct way" I was talking about.

Then there is the difference between a correctly mapped import sphere and TGs sphere,
have a look:
[attachimg=6]
See the difference?
The TG sphere has the 8x16 squares texture mapped onto it via image map shader set
to spherical projection btw.

Don't know what approach apps like Maya or Lightwave or whatsoever use,so you have
to do some thinking on your own. ;)

I can only recommend simple tests like this!
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 12, 2013, 02:12:58 AM
A great little lesson, J! Thank you again.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 29, 2013, 07:39:06 AM
Hi,
Apologies, I have a question that may have already been answered, but I could not track the answer down in this gigantic thread.

I saw that people found a way to use a Vdisp multiple times on a terrain. But my memory is that it was the same vdisp. Does anyone know for sure if you can or cannot use multiple different Vdisp s on the same terrain, as like multiple HFs?

I thought I remembered someone saying that you cannot (matt?) But I cant find the post I thought I was remembering.

My hop is that I am wrong, and I can do what Im asking about.

Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 29, 2013, 08:05:35 AM
I wouldn't know why you can't, but it will be difficult to control. Say you displace the first from ground zero level (flat), then you get strange displacements. Fit the next in and it will displace as if from a flat level (the way it was built), so you may get unpredicted displacements. Using them in different sections of terrain is no problem of course.
I tried a vdisp map made from a flat plane on a mountain side to make a cave, but that's also hard to control. At least in my quick and short experiments.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 29, 2013, 08:09:58 AM
Thank you.

I'll probably end up trying several different things.

So much time spent just learning :-[ I hope it pays off.
Title: Re: Mudbox displacement maps in T2
Post by: Dune on August 29, 2013, 08:12:47 AM
It all takes an awful lot of time, but it's usually worth it. I didn't even dare starting on your reindeer, by the way, a bit daunting and little time.
Title: Re: Mudbox displacement maps in T2
Post by: TheBadger on August 29, 2013, 08:18:48 AM
by the way, Im nearly finished (no really, this time I mean it)

Im adding controls to the rig so it will be really simple and easy for you to pose it. And Im making a short video for you showing where everything is and how to do it (hence the screen capture thread).

Of course Im going to use it my self, so you may just end up wanting to use those models. But at least you'll have plenty of options.

Sorry for the off topic :-X
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on August 29, 2013, 04:57:02 PM
If you want to use several VD maps it depends on how and what,methinks.
Tiling (one big VD-terrain split up into parts) should be rather problematic,
because of the ugly outer edges the VD maps tend to have.
Using it on top of each other requires the approach Chris mentioned earlier,
if you want predictable results,that is.(see page 15 of this thread)

Ulco,a variation of that tech should help with your cave on a mountain side,too.
Title: Re: Mudbox displacement maps in T2
Post by: oysteroid on February 06, 2015, 08:56:39 PM
A heads up for anyone who might use ZBrush for making vector displacement maps for TG:

If you get the new ZBrush 4R7 64bit, the number from the diagnostic test that you need to put in has changed, much to my annoyance. The value for the flip and switch settings is no longer "3". Now it is "43". Why it changed, I can't begin to speculate. I only figured this out after much frustration, assuming that it had to be the same.

I haven't tried it in 4R7 32bit, so you might find different results there.
Title: Re: Mudbox displacement maps in T2
Post by: j meyer on February 08, 2015, 02:19:21 PM
Thanks for the heads up.Confirmed.

Maybe that caused Ashley's problems,too,a while ago.