PDA

View Full Version : Zbrush displacement map in Cinema


flyingP
02-14-2005, 09:30 PM
I have come across this once before as I first got ZB2 just can't remember what I did to solve it.
I am trying to get this into cinema using a displacement map generated in Zbrush
http://www.bjread.joice.net/fposts/ZBhead.jpg

I keep getting these blasted contours though
http://www.bjread.joice.net/fposts/badSPD.jpg

anyone know what I have to click to get rid of them ?, it's slowly driving me nuts

Darth Mole
02-14-2005, 09:43 PM
For whatever reason, this is symptomatic of an 8-bit image file rather than 16. The lower resolution creates these stair-stepped regions - like banding in a low-res colour image.

I'm just guessing, but it's probably more to do with the way you're exporting the file from ZB2 - make sure it's a 16-bit TIFF. Hope that helps.

AdamT
02-14-2005, 09:44 PM
What version of Cinema are you using?

flyingP
02-14-2005, 09:47 PM
R9 have just DL'ed the update have yet to instal though :bounce:

AdamT
02-14-2005, 09:57 PM
Hmm, you shouldn't be having this problem then. Did you save the map as a 16 bit .psd file? Did you open the file in BodyPaint by any chance?

flyingP
02-14-2005, 10:00 PM
make sure it's a 16-bit TIFF.

they are, doesn't seem to be the problem, thanks for the suggestion all the same :D

flyingP
02-14-2005, 10:01 PM
Did you open the file in BodyPaint by any chance?

has just occurred to me too, I have indeed loaded the textures, will try again :)

AdamT
02-14-2005, 10:07 PM
has just occurred to me too, I have indeed loaded the textures, will try again :)
That's it then. BP will smash your 16 bit textures down to 8 bits without so much as a "by your leave".

flyingP
02-14-2005, 10:10 PM
well DOH.... a trap for noobs it would seem, BP was indeed the problem. well at least having loaded the map was, another lesson learned, now it just seems as if the UV map has not come over so well from Zbrush.......WAHAHAHAHA some days ya just can't win :D

segart
02-14-2005, 10:26 PM
I just had the same problem a couple of days back. I couldn't make the disp. map again so I placed the disp. map inside a distorter with a random noise to distort the texture. I had to try different distort values. Of course you get a very bumpy displacement but al least the bands are gone and in my case it improved the texture.


I use this trick (adding noise) in Photoshop to get rid of color bands after a gaussian blur for example.

MrBraun
02-15-2005, 07:45 AM
Just one try: when cinema export a obj mesh, it invert the normal !

Try to invert normal to your mesh or set the negative displacement value !! ;)

flyingP
02-15-2005, 10:12 AM
nah the normals seem to be OK, the problem was really because I had loaded the textures, as I was checking that if I had remember to flip the disp map or not :blush: .
in the meantime I seem to have done something odd with the UV's it would seem (using Zbrushes for the displacement), but hope to get that sorted with a bit of playing around.

AdamT
02-15-2005, 01:50 PM
One note: make sure "Txr" is checked in the ZBrush export options. Otherwise UV mapping won't be exported.

tilo.kuehn
02-15-2005, 03:23 PM
Just one try: when cinema export a obj mesh, it invert the normal !
;)
that should be fixed in 9.1 ...
tilo

flyingP
02-15-2005, 03:56 PM
One note: make sure "Txr" is checked in the ZBrush export options. Otherwise UV mapping won't be exported.

nice tip thanks.

on another note, have you ever experienced any crashes when rendering disp maps in ZB.
Damn thing want let me render out to 2048 pixels (keeps crashing) it's fine by 1024 though.......just wondering if it's a memory problem or not. I am not getting any real detail on with the displacement in Cinema atm and are wondering if it is down to the map size :hmm:

AdamT
02-15-2005, 04:06 PM
Lucky for you I've already broken my ankles on all these snares. :) ZBrush will crash when rendering displacements if there are any overlapping UVs in your model. Nice feature that. :/ You can check for this by running Tool>Texture>Uv Check. Overlapping UVs will appear in red on your model. You can fix it in Z by running GUV or AUVTiles. Of course that'll splinter your UV map pretty well....

flyingP
02-15-2005, 04:11 PM
stupid thing is that I am using GUV tiles for the disp map and it is only crashing at 2048 pixels not the 1024

flyingP
02-15-2005, 04:22 PM
You can check for this by running Tool>Texture>Uv Check. Overlapping UVs will appear in red on your model. You can fix it in Z by running GUV or AUVTiles. Of course that'll splinter your UV map pretty well....

hmm just tried that too.....they are all red, and most of them even after using GUV tiles :argh: :banghead:


edit: oooooooK, seems it mave been because SmoothUV was selected

flyingP
02-15-2005, 05:23 PM
hmmm it actually just worked with 2048 and SmoothUV selected :surprised .......damn this stuff is giving me a headache :banghead:

JamesMK
02-15-2005, 05:36 PM
So happy to see you're enjoying yourself at least, pig :D

flyingP
02-15-2005, 05:41 PM
shuddup Wabbit I's not haven a good day :banghead:

flyingP
02-15-2005, 07:12 PM
OK what am I doing wrong here?
http://www.bjread.joice.net/fposts/DisProb.jpg

1. low poly model created in Cinema and exported as .OBJ

2. Zbrush tool loaded into ZB

3. moved down to subdivision 1

4. Original .OBJ imported into tools subdivision 1 a texture with 2048 x 2048 pixels is assigned GUV Tiles activated, object is exported as OBJ with texture. A Displacement map is created at 2048 x 2048 pixels, with smooth UV activated, flipped vertically and exported as a .Tiff

5. Exported model is opened in C4D, the displacement map is loaded into into the displacement channel , the object has been placed under a HM object with 4 sub divisions, and I have had to set a height here of 100m in the displacement to get anything, activating sub-poly displacement doesn't help.

the displacement is wonky and soft as hell......am I doing something stupid here ?

AdamT
02-15-2005, 07:22 PM
Not sure, but I don't know why you're importing the original mesh before generating the displacement map. It works best in my experience if you don't do that, and if you click the click the "Cage" button in the Tool>Geometry tab prior to creating the displacement map. Then export the cagified geometry and use that in Cinema with the displacment map. Still, what you're doing should give better results than you're getting. Can you send me your ZBrush file? adamt [at] 3danvil [dot] com.

paulselhi
02-15-2005, 07:41 PM
Import your model into ZB from C4D

create a morph target in ZB, you need these so that you can create a disp map from the raw untouched model, if you don't and just model on from the direct import then when you drop back to level 1 SD you will not be at the original state since the action of creating SD's permannetly alters SD level 1)

Do your ZB modelling then drop down to SD level 1

Switch to the morph target and do the material/create UV map thing and generate a displacement map for that

Export the object from ZB as a new object it will have the UV map you created

In C4d put the disp map into the disp chanel texture but add it under a filter and up the contrast to about 80 %

If you didn't do the flip texture for the alpha map ( disp map) in ZB then in C4D you would have to mirror the texture vertically

flyingP
02-15-2005, 07:48 PM
ADAM the cage version of this is UGLY I tried.

paulselhi creating the morph target just stores the original geometry, which is exactly what I am reimporting, there should be do difference :shrug:

AdamT
02-15-2005, 07:55 PM
If the caged version is super funky you might take that as a sign that your starting mesh was a little too low-poly. It's also magnified if you reimport the model or use the level one morph target. Why do you want to start with level 1 mesh you imported rather than the level 1 mesh generated by ZBrush?

flyingP
02-15-2005, 08:00 PM
Why do you want to start with level 1 mesh you imported rather than the level 1 mesh generated by ZBrush?

ummmm.......because I read the manual :shrug: ....the telephone example to be exact

flyingP
02-15-2005, 08:35 PM
what I do not get with that though the talk about "loading" the original model back into level one, just you can't...well I can't.... Import of the original .obj into level one....yes....loading a .ztl just creates a new tool :shrug:

AdamT
02-15-2005, 08:35 PM
Doh! Never read the manual!! Just kidding. There are legitimate reasons you might want to do that, like if you were using Z to generate displacement maps for morphing. Otherwise I think you're better off using the Z-modified mesh. It relies less on displacement so it's less likely to come up with errors.

flyingP
02-15-2005, 08:46 PM
yeah just what I am doing is noted as being one of the better methods, apparently for the displacement maps to be generated properly the original mesh is required, Dammit this shouldn't be looking this odd, I am doing something wrong just can't see what I am missing :banghead:

edit and I just watched the phone Zscript again there "import" was mentioned not "load"


I have a few 'vague' ideas of what might have gone wrong but will need to test a bit before I comment on those. :shrug: ......... talk about a PITA though

tjnyc
02-15-2005, 09:28 PM
I have yet to get anything close to what was made in ZB at that extracted resolution of 2K. You should extract at least 4K to get the higher level detail showing in your rendering test. You should also try turning adaptive on for your extracted displacement maps, it is a better solution to get better detail in your displacement map than the sub-pixel accuracy option in the displacement menu. You can also try hi-freq and mid-freq setup, so you wouldn't have to increase the sub level to get the finer higher level of detail, which will increase your rendering time in C4D. Mid-freq would be an extracted displacement map at a level or 2 lower from your highest level in ZB, you will used this in C4D for the displacement channel. The hi-freq extracted map will be your highest level map from ZB, use that in your bump channel.

Another thing you might want to do is bring your extracted map into Photoshop and adjust the brightness and contrast to bring out the detail more from the map. In messiah there is a shader node that helps to accomplish that, but I don't know if C4D has such a filter that will work with 16-bit map, so you might need to do that in PS instead. But when you resave the map, make sure it is saved as 16-bit.


Cheers,

flyingP
02-15-2005, 09:37 PM
You can also try hi-freq and mid-freq setup, so you wouldn't have to increase the sub level to get the finer higher level of detail, which will increase your rendering time in C4D. Mid-freq would be an extracted displacement map at a level or 2 lower from your highest level in ZB, you will used this in C4D for the displacement channel. The hi-freq extracted map will be your highest level map from ZB, use that in your bump channel.

sounds like an interesting solution, don't suppose you could elaborate on how I go about doing that? I understood you have to come down to level one to create the map :curious:


thanks for the other tips too will give those a go :thumbsup:

tjnyc
02-15-2005, 09:49 PM
Yeah sure.

Say you have your model in ZB at the highest level at 6, you lower down to 5 or 4 and press the delete higher res button, which will delete the higher level, so if you are at 5, it will delete all the levels past 5. Go down to level 1 and extract. This will be your mid-freq map.

flyingP
02-15-2005, 09:51 PM
Yeah sure.

Say you have your model in ZB at the highest level at 6, you lower down to 5 or 4 and press the delete higher res button, which will delete the higher level, so if you are at 5, it will delete all the levels past 5. Go down to level 1 and extract. This will be your mid-freq map.

ohhhhhh ........clever

thanks :thumbsup:

AdamT
02-15-2005, 10:04 PM
Ahhhh, very interesting! I know Taron was doing that but I couldn't understand his explanation. Regarding the contrast, I don't find it necessary. Could be a bad idea if it causes clipping, although that shouldn't be too much an issue at 16 bits.

Concering which mesh to export, try it both ways and see for yourself which looks better.

tjnyc
02-15-2005, 10:12 PM
Ahhhh, very interesting! I know Taron was doing that but I couldn't understand his explanation. Regarding the contrast, I don't find it necessary. Could be a bad idea if it causes clipping, although that shouldn't be too much an issue at 16 bits.

Concering which mesh to export, try it both ways and see for yourself which looks better.

Yeah, contrast has to be used with some care. If you can get the result you want with just adjusting the brightness, then don't use contrast.

If you can use a normal map you could possibly use that for the bump channel hi-freq detail instead.

Cheers,

AdamT
02-15-2005, 10:15 PM
Or better yet, use the normal map with Remo's normal shader. :) I'll definitely be giving this a try soon.

edfenner
02-15-2005, 10:27 PM
Sounds like there is a video tut in all this somewhere.

rubyscooby
02-16-2005, 01:06 AM
You need to set the res to the highest possible when you export your displacement map. (DPRes at 4096) Also use the adaptive as it is a huge time saver. I got great results after changing just that. I was also having problems with Z and cinema 4D v9 before. I was also told from pixolator it's a good idea to divide your object as much as possible to get really good detail before creating your map.

ruby

flyingP
02-16-2005, 08:36 AM
I was also told from pixolator it's a good idea to divide your object as much as possible to get really good detail before creating your map.


makes sense :thumbsup: , hope to play a bit more with this today, will see what I can get putting all together, thanks guys :thumbsup:


EDIT: hehe have just bumped it to 7 sub d's in ZB and are rendering the disp map using the adaptive setting........looks like taking a weeeeee while :scream: :D ....ahhh what the hell I am curious to see if this is any better :)

flyingP
02-16-2005, 10:39 AM
ok maybe going to a sub d of 7 was a bit over the top after rendering a hour and a half ZB is estimating another 23 :eek: that is just a wee bit over the top IMO

Edit: back to six now.....just chopped about 22 hours off that render :D ....you live and learn I guess :rolleyes:

flyingP
02-16-2005, 12:41 PM
OK I guess I am going to have to put this down to learning the hard way, the map is better but still too soft IMO. The tearing I can only put down to maybe using the wrong tool in ZB I had sculpted parts using Move in Edit mode but out of Draw (hope that makes sense).... looks like it was a bad idea :eek: :D .......back to the drawing board

edit: whoops forgot the picture

http://www.bjread.joice.net/fposts/zugly4.jpg

flyingP
02-16-2005, 07:46 PM
OK I am redoing this in ZB, this is just a quicky disp map brought into C4D to test that things are working, and they seem to be........me happy pig now :bounce: :D
http://www.bjread.joice.net/fposts/headtest.jpg

flyingP
02-17-2005, 07:50 PM
just thouight I'd share a bit more of my pain with you, figure it might save someone else having to go through the same :shrug: .

Anyway still having some fun

http://www.bjread.joice.net/fposts/tearing1.jpg

this time I am assuming because my base geometry is too low poly in the areas here where things are screwing up :hmm:

EDIT: may also actually down to a wrong choice of tool again in ZB, will need to experiment some more :hmm:

paulselhi
02-18-2005, 12:36 AM
Are you useing the pinch tool and /or the nudge tool ? I think these may give prpblems with external renderes. I am not sure but i think auv tiles and guv tiles handle the pinch and nudge in the uvmap in different ways

AdamT
02-18-2005, 05:28 AM
You can get these kind of problems if you have too much overlapping in the Z mesh. The displacement map only works on normal direction, so if you have overlaps it can't be properly represented.

flyingP
02-18-2005, 08:06 AM
You can get these kind of problems if you have too much overlapping in the Z mesh. The displacement map only works on normal direction, so if you have overlaps it can't be properly represented.

that'll be the one, I've been using the inflate tool for the most part, just as it moves the poly's along their normals as I understand it, it has indeed caused a bit of overlapping in those places methinks, the mesh is simple and has quite strong angles there, i have since adjusted the base mesh in those places to soften things up a bit and will have another go in ZB later, also maybe using the standard tool in Zadd in such places and see if that handles it better.....all part of the learning process :D

CGTalk Moderation
02-18-2006, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.