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

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Mudbox displacement maps in T2
« 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.
It has been eaten.

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #1 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?

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #2 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?
It has been eaten.

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #3 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.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3545
  • I'm the crazy one
Re: Mudbox displacement maps in T2
« Reply #4 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
Just because milk is white doesn't mean that clouds are made of milk.

Offline gregsandor

  • Member
  • *
  • Posts: 774
Re: Mudbox displacement maps in T2
« Reply #5 on: May 18, 2013, 02:46:20 AM »
When can we expect displacement on models with raytracing?

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #6 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
Gameloft

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #7 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)?

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Mudbox displacement maps in T2
« Reply #8 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

Offline j meyer

  • Member
  • *
  • Posts: 2156
    • orkwarts
Re: Mudbox displacement maps in T2
« Reply #9 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.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #10 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.

It has been eaten.

Offline paq

  • Member
  • *
  • Posts: 223
Re: Mudbox displacement maps in T2
« Reply #11 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.



43056-0
« Last Edit: May 18, 2013, 09:22:02 PM by paq »
Gameloft

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Mudbox displacement maps in T2
« Reply #12 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?
It has been eaten.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3545
  • I'm the crazy one
Re: Mudbox displacement maps in T2
« Reply #13 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.
« Last Edit: May 18, 2013, 10:23:33 PM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3545
  • I'm the crazy one
Re: Mudbox displacement maps in T2
« Reply #14 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
Just because milk is white doesn't mean that clouds are made of milk.