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.