Mudbox displacement maps in T2

Started by TheBadger, May 17, 2013, 10:25:30 AM

Previous topic - Next topic

paq

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.

Gameloft

paq

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 :)
Gameloft

j meyer

Thanks for the info,gonna try again now.

j meyer

Thanks again,got it working now! ;D
Not sure as of yet what it was,though,maybe later.

TheBadger

Quote from: Matt on May 22, 2013, 06: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

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.

It has been eaten.

Dune

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.

mhaze

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.

j meyer

#52
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. ;)

TheBadger

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.
It has been eaten.

Matt

Quote from: TheBadger on May 23, 2013, 09:23:51 PM
Quote from: Matt on May 22, 2013, 06: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

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
Just because milk is white doesn't mean that clouds are made of milk.

TheBadger

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.
It has been eaten.

Dune

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.

Tangled-Universe

Quote from: Dune on May 25, 2013, 02: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.

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.

TheBadger

#58
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 :)
It has been eaten.

j meyer

#59
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.