Handling displacement...

JonnyRayJonnyRay Posts: 1,744
edited December 1969 in Carrara Discussion

As I still get several views to my blog page a week, I figured I'd mention again here that I did some experimenting with trying to get displacement maps designed for DAZ Studio to work in Carrara. Granted my experiments were done in Carrara 8. Not sure if some of the displacement improvements in 8.5 would make these steps unnecessary, but here it is for anyone who is interested...

DAZ Studio Displacement in Carrara 8

«1

Comments

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    Very nice article. Thanks for sharing :coolhmm:

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    In 8.5 beta displacement works. But I find that I prefer the speed of the bump channel.
    I've even found enjoyment out of creating a second map and mixing, multiplying or otherwise blending them together - which is where I've often found the need to crank up the bump value.

    I really enjoyed reading your experiment - especially all of your thoughts and process. Really fun and well presented.
    Phil W, in his Advanced Carrara Techniques training video, builds an entire city from a flat plane using nothing more than a shader containing displacement - a very fun exercise, indeed!

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    Thanks, Dartran.

    I agree that bump maps are certainly more efficient (as ar Normal maps when they are available). The exercise I went through in this case was necessary, however, because Stonemason had created the Streets of Asia set with the expectation of displacement adding a certain level of detail to the model which a bump map couldn't achieve on its own. Specifically the carving of the glyphs on the wall didn't look right with a bump map.

    If I get some "spare" time (yeah right! :p) I may try again in 8.5 to see how improvements in sub-division and displacement may affect the results and rendering speeds.

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    Yeah...
    I've now noticed (from messing around with the shaders) that those awesome low-res people from Predatron - at least the MU Workers, come with normal maps! Sweat! As if those models aren't already worth their weight, right?!!! I have them all except for Cardinal, Monk and the new Casual... so if you'd like me to check on any of them - let me know. But for scenes with the need for many people, those guys and gals are perfect - as are his Goblins, Troglodytes and Troll - which also come with low-res versions. I have his Dragon, but not the low res one.

    Stonemason is a true expert at using 3d tech to get efficiency into his products. It's really nice that we can find such quality at such a value. I'm certainly glad that he chooses to do this rather than do work for Weta Digital. We need him more.

  • Rhian-SkybladeRhian-Skyblade Posts: 223
    edited February 2013

    Thank you for sharing this! :-)
    Most bump maps give me the hissy fit... because of the unwanted noise. Especially on character skin it is a huge issue.

    Currently I am experimenting with scaly skin for V4 (I wonder, anyway, that no one has tried to sell a elegant and fully scaled MAT for V4... most I found as asymmetrical and only partial scaled or so extremely colorful that the texture map was useless.)

    I found a nice tutorial at youtube how to create my own normal maps from textures: http://www.youtube.com/watch?v=KG3pTxgZdsI

    Post edited by Rhian-Skyblade on
  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    Rhiana said:
    Thank you for sharing this! :-)
    Most bump maps give me the hissy fit... because of the unwanted noise. Especially on character skin it is a huge issue.
    You're welcome. :) I hope it helps some people.

    As for the bump maps, what I've found helps is to load them into your image editor of choice (I use Gimp) and apply a Gaussian Blur filter of various strengths to even out the tone some. One trick I learned from the (now lost) original thread where I experimented with this was to actually use multiple layers like that, combined with Multiply so the details of the original bump map aren't totally lost, but the blurred layers help to filter out some of the noise issues.

    I found a nice tutorial at youtube how to create my own normal maps from textures: http://www.youtube.com/watch?v=KG3pTxgZdsI


    That is a nice find. :) The only issue I've had with using texture maps to generate normal maps is that they tend to create one dimensional normal maps. In other words, they only simulate a change in the z axis. True normal maps generated by comparing a high density mesh to a low density one are able to simulate deflections in all 3 dimensions.

    Still, depending on the rendering engine, as my experiment shows with Carrara 8, even those limited normal maps may create better results than dump or displacement.

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    JonnyRay said:
    Still, depending on the rendering engine, as my experiment shows with Carrara 8, even those limited normal maps may create better results than dump or displacement.
    I agree. As long as we can feed the normal map creation method the info we want it to use, then we should be able to find ways to totally improve appearances.

    I do mostly animations. Until recently - and only because I wanted to show examples on the forum, I never really do stills - since I use the spot render to check the frames. Anyways, for this reason, I saved my normal resolution shader set to the browser - in case I ever want to do a super detailed still or closeup filming shot. Then I gimped the resolution down to 500 x 500 for the big ones, 320 x 320 for the smaller ones. So sometimes it can be useful to reverse what's going on here - which is really interesting. Because what we can learn from one definitely aids the other!

    I've not tried Normal maps with the low res yet - but that would be the best next step to try, I think.

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    I've always been a proponent of people experimenting to see what effect various changes can have. I know for most people in this hobby, loading content, maybe a preset light set and hitting the Render button is as much as they care to do. And I don't see anything wrong with that. They're having fun, which is what a hobby is all about.

    But I've also been strong on the idea that to really get the most out of your 3D programs, it helps to understand WHY a change has a certain effect on the result. Understanding how shaders interact with the rendering engine and what the various surface shader parameters mean and such is going to help the artist make better decisions about how to use their tools.

    It's just like in the physical world that a painter picks water colors or oils or acrylics for the specific qualities that those types of paints add to the final product.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi JonnyRay :)

    I don't know if you've tried this yet,. but one thing you can do in carrara, is jump into the vertex modeller,. and turn on smooth for an object, or if it's made of separate parts (poly-meshes) then you can select the part where you need displacement, and crank up the subdivision smoothing, (you may need to crease edges to keep them straight) then the subdivision in the model adds more to the displacement subdivision in the shader options.

    I actually only found this out recently when making a Head model, and dabbling with the Displacement painting in the modeller.
    you need to crank up the subdivision smoothing before you can paint a really detailed surface.

    D54post.jpg
    1000 x 750 - 226K
  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    3DAGE said:
    Hi JonnyRay :)

    I don't know if you've tried this yet,. but one thing you can do in carrara, is jump into the vertex modeller,. and turn on smooth for an object, or if it's made of separate parts (poly-meshes) then you can select the part where you need displacement, and crank up the subdivision smoothing, (you may need to crease edges to keep them straight) then the subdivision in the model adds more to the displacement subdivision in the shader options.

    I actually only found this out recently when making a Head model, and dabbling with the Displacement painting in the modeller.
    you need to crank up the subdivision smoothing before you can paint a really detailed surface.

    Great head, Andy!!! Loved that movie enough to buy it, so I can watch it over... and over....
    Very nice model.
    So this one is smoothed, creased and displaced. This is the epitome of what they refer to as SubD modeling, isn't it? That's nearly exactly the way Genesis works. The low res model, prior to subdivision, is known as the cage. Many people were a bit confused when they opened Genesis, a really detailed figure, in a modeler, which only reveals the cage! lol I couldn't believe my eyes!

    Johnny,
    Me too. I'm a fan of tweaking every little aspect, but it doesn't bother me if peeps would rather avoid the process. I still think you should conduct more experiments if it means that you'll do another beautifully crafted article explanation for each afterwards. That is one sweet article. I linked to it in the forum manual. If you're not okay with this, PM me and I'll remove the link. You obviously put a lot of work into it, so I wanted to help it get seen.

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    I had actually looked at doing that as well 3DAge, I ran into two issues, though. First, Stefan's modeling ability is well beyond me. :p Trying to properly add polygons without totally screwing up his work ... well, I could have gotten there, but it was going to take me a LOT longer. :) Second, my goal with the experiment was to try to bridge between people who are comfortable doing their own object and material work and people who are coming from the DAZ studio / Poser side of the house who may be able to tweak their settings a little bit, but opening the vertex modeler was going to be well beyond their comfort zone.

    Dartan: No issues at all with the link. I had originally planned on turning it into a tutorial for DAZ's site, but at the time they were under a lot of changes in the tutorial / artzone / wiki area and so I put it off for "when they got settled." And since things that are postponed rarely get finished... Anyway, no issue with letting other people know about / learn from the stuff I did. :)

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    With what 3dage was taking about, you don't need to perform any modeling. You simply open the model in the modeling room, hit cntrl/A (select all), and on the right side panel, select smoothing. The model subdivision slider will automatically move the render slider with it, I believe - or is it the other way around? Hmmm. Anyways, you have just entered the model into subD mode, which, as Andy points out, should give more detail to your bump settings within the shader. You woundn't actually be making any other changes to the model.

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    Actaully, as 3DAge mentions, if all you do is hit "smooth", you're going to round off any edges which should remain sharp. Which means you have to find those edges, extract along them to add additional vertices / edges and then use the smoothing. It would work great for surfaces that are supposed to mostly be smooth (like heads / faces). It is a bit more complicated with buildings and other objects with hard edges. And with something like Stonemason's Streets of Asia, just finding the right surface to work with can be a challenge. :) It took a fair amount of trial and error just to figure out which surface affected the front of the arch in my example / experiment.

    Doing a manual subdivide is actually what I tried first. Because I knew that the underlying issue is that the subdivision which DAZ Studio does on models with displacement maps is different than how Carrara was doing it. Then in the first test, even cranking up Carrara's dynamic subdivision factors didn't help so much because DAZ Studio was smoothing out some of the noise in the displacement map while Carrara was faithfully re-creating the map exactly as it was presented.

  • DartanbeckDartanbeck Posts: 21,326
    edited December 1969

    I thought that sounded too simple. You can't do like in smooth edges command, and select all edges beyond xx degree?
    In Carrara displacement of a shader, you can add subdivision there - but that may just be 8.5?

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    I thought that sounded too simple. You can't do like in smooth edges command, and select all edges beyond xx degree?
    You can, and with some experimenting with the various options, you can probably get something that would create acceptable results. But with most architectural models (and even more so something as complex as what Stefan creates), it's going to be a tricky thing.

    In Carrara displacement of a shader, you can add subdivision there - but that may just be 8.5?

    Exactly. :) That was the very first thing that people pointed out to me in the original thread about this. Unfortunately in this case, the displacement map has many tiny features in it which Carrara either rendered with too much fidelity (creating a bunch of random lines and bumps) or smoothed over. I couldn't find a happy medium. Which is why I started investigating the Normal map option instead.

    If we keep going, we'll recreate all the information that only exists in my head now that the original forum thread is lost. :)

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    Perfect Kevin! :) I didn't even know about the ForumArchive site. Really glad all that theory information isn't lost as we had a great discussion at the time about bump / displacement / normal maps.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi JonnyRay :)

    Thank you Kevin, for adding the details I missed :).

    I thought I'd do a quick / rough example pic,. which was also an excuse for me to play with some multilayer shaders. so,..

    In this pic, I'm using a Vertex Grid (plane) at the default setting.
    I've selected the outer edge and set it to "Crease edges" (Model / crease edges)
    I've then set the smooth slider on the right to 5 levels,. which also adjusts the render setting slider

    Then I played around, making a Procedural Brick shader using the new multilayer shader in the 8.5 beta.

    As Kevin noted, any object you set to "Smooth" in the vertex modeller, will smooth the whole thing, so if it's a cube, it'll become a rounded cube, which may not be what you want,. so,.. to prevent that,..you need to select the outer edges and set them to creased, and that should keep the cube, a cube, but still allow it to be smoothed.

    NOTE: in models with a High poly count, like M4/V4 etc,.. adding sub division smoothing to the entire object can be the wrong way to go, since you don't really need the eyes, or lashes, or some other parts, to be included and calculated, so, I normally only select the parts which I want to smooth and displace.

    Even when you're using displacement on buildings, it's prudent to select only the parts of the model that you'll see in your render,

    There's no point in having the roof of a building subdivided, smoothed, and displaced, ..if you don't see it in the final image :)

    hope it helps :)

    Disp_Wall_Bricks2.jpg
    1000 x 750 - 168K
    Disp_shader.jpg
    992 x 796 - 143K
    Disp_model.jpg
    1280 x 1024 - 275K
  • JonnyRayJonnyRay Posts: 1,744
    edited February 2013

    Thanks Andy! :)

    As you show and as was pointed out in that archived thread, displacement maps can work in Carrara just fine. The issue doesn't seem to be the processing of displacement itself, as that maps which are designed for and work great in DS Studio (which uses a 3Delight rendering engine based off the Renderman standard) don't necessarily translate directly into Carrara because of the differences in how the two rendering engines treat these maps.

    Two main important differences...

    3Delight automatically applies very fine grained subdivision (actually as Age of Armour pointed out it is more akin to retopology than simple subdivision) for the specific surface to which a displacement map is assigned.

    Carrara, on the other hand, when a displacement map is applied in the shader and you dial (for example) 6 passes of subdivision on the shader settings, it actually applies that subdivision to the entire model, not just the surface with displacement.

    For example, if you have a 3D model of a car wheel and tire, and you decide to use displacement mapping for the tire tread only, you could define that as a separate material zone. In DS, when the rendering engine sees the displacement map being applied, it generates a new topology of micro-facets (teeny triangles) only for that particular surface. Then the effects of displacement are calculated on that re-topologized (new word?) surface.

    If you were to simply import that prop into Carrara, C8 would see the displacement map and load it correctly, but dialing up the subdivision in the shader parameters would generate new polygons on the entire model of the wheel. So the rim, hubcaps, etc. surfaces would all also be subdivided. This could, of course, produce some unwanted results.

    So the better way as Andy points out here (and in the archived thread by the way ... nice to know we're being consistent ;) ) would be to use the vertex modeling room to select the tire tread surface and use the crease and smooth operators to manually add polygons to just the portion of the model where you needed them.

    My experiments with the normal maps and other methods at the shader level were more for people who may pale at the thought of having to open that scary "modeling" stuff. :cheese:

    Post edited by JonnyRay on
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI JonnnyRay :)

    not really,. there's no need to add any more polygons to the object and no modelling required,. but the displacement does depend on the geometry, and so does sub division smoothing , which actually add's "Virtual" tesselation to the model,.

    An example would be a simple 6 sided cube, with one polygon per face,.
    Adding subdivision smoothing of one level will split each face into 4 polygons (virtually) so, no actual geometry has changed in the model, but it's been sub divided (re-topolgised) :) by the sub division smoothing,

    Each level of smooth, subdivides each virtual polygon again and again,.. so, 5 levels of subdivision smoothing turns one polygon into 1024 polygons. (virtually) without changing the original model or effecting the UV mapping.

    There's also a "convert" option in that same panel, which takes any virtual sub-division smoothing, and applies it as real polygons to the model, which Does change the real geometry of the model, ...and is a one way trip. (apart from undo)

    If a model, such as the Wheel / tyre combined, has separate shading domains, then displacement can be applied to the tyre and not the wheel, even if the whole object has sub division applied to it,

    Also,. in the case of One wheel and tyre model, with more than one shading domain,.. then that tyre shading domain can be selected, and then separated (detach polygons) from the wheel model,.

    In the C8.5 Beta,. the sliders for subdivision smoothing have now been added to the Assembly room in the right hand panel, mainly because genesis is a Sub-D model,. and if you increase the smooth then you'll get a more curved shape, and avoid any flat edges on areas like the shoulders, or a baldy head, where, sometimes these would be visible.

    So, any model you make in the beta, which has sub division "enabled" in the modeller, will now show sliders to adjust that smoothing in the main assembly room. which makes it easier for those with a fear of the modellers :)

    There's still a big difference in the way that DS and Carrara handle displacement,. but the main difference (for me) is the depth, or strength,.. Carrara does BIG depth well,... and DS does small depth well.

    many people want to do skin effect, and want to use displacement map modelling, and in carrara,.. that's tricky.
    you'll get a much better effect using a good normal map in the bump channel, rather than a displacement map

    Normal maps are also much faster to work with, (See example pics)
    wall with texture map only.
    Wall with texture and normal map.

    Never fear the Vertex modeller,. it's your friend :)

    Embrace the dark side.

    wall_normal.jpg
    640 x 480 - 43K
    waltexture.jpg
    640 x 480 - 24K
  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    That makes a lot of sense. Thanks Andy. I think maybe that's a difference with 8.5 and it's support for sub-D? Way back when I was doing this, the only way I recall (it has been over 1.5 years now after all) was to actually do the Convert type thing. But I could be mistaken.

    As for me personally, I've dabbled with modeling in Carrara, Hexagon and Maya; so I'm ok with it, I just feel bad for the person coming from DAZ Studio or Poser and they get the impression the only way to get the results they want in C8 is to go into the modeler, which is why I messed with the materials / shaders in my experiment. :)

  • thoromyrthoromyr Posts: 452
    edited December 1969

    To be fair, I don't think DS or Poser allow you to do things you can in Carrara (I don't use either so I'm not particularly familiar with their capabilities). My point being that having the modeling room to go into is kind of the point with Carrara.

    For example, if the UV map is wrong causing distortions, what can you do about it in DS or Poser? In Carrara you can go into the modeling room and improve it. Or a model is good, but not quite right. Editing a model takes some skill, but not as much skill or time as creating a model from scratch. Sure, a new user coming from DS or Poser may not be used to the idea or have the necessary skills: but if they don't fear the modeling room and learn it they will get a lot more value from Carrara.

    And, best of all, you don't even have to be in the modeling room. Whether its 3d painting, doing some on-the-fly morphing to fix poke through, or some tessellation to improve results in the non-photorealistic renderer -- you can do all of that directly in the assembly room.

    Not to say there's anything wrong with exploring displacement mapping from the shader side -- far from it. I think its very worthwhile to understand the different ways (and their respective limitations) to achieve results. I've been following this with some interest as displacement mapping and I don't get along that well. So I very much appreciate all the discussion and backlinks to the old forum.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi Thoromyr :)

    Good point,. I keep forgetting you can model directly in the assembly room,. (my bad) :(

    Jonny ;)

    I agree, there's a lot of DS users, and some Carrara users, who are either "used to", or "prefer to" use Hexagon as a modeller, and there's nothing wrong with that, but personally I find it easier and simpler to build directly in Carrara, rather than importing from another application.

    There's also many Poser and DS users who haven't done much, or any modelling, since those two programs don't really have any modelling tools built in,.
    Poser started out as a Posing tool for artists to replace the standard "Wooden" artist's mannequin, in a digital environment, and Daz Studio, is pretty much the same,. load, pose, and render.

    Whereas, Carrara is a Full 3D application, with all the tools to make your own figures, paint them, ..pose, or animate them, and render the results. but as Thoromyr points out ,. it's easier and quicker to use pre-built "content" and that, unfortunately, becomes the first hurdle which inhibits people from modelling.

    In most of the "BIG" 3D applications, like 3D-Max,. there are no models,. ...So,. you need to learn to build things.

  • Salem2007Salem2007 Posts: 513
    edited February 2013

    Not to derail this discussion, but can someone explain how to create a Normal Map? The examples I've seen online other places don't make much sense to me.....I tried an NVIDIA plug in for photoshop, but I couldn't find instructions for what all the options do...

    Post edited by Salem2007 on
  • DartanbeckDartanbeck Posts: 21,326
    edited February 2013

    Best way I know of is to use Z-Brush or higher, like 3ds max or Maya, perhaps Modo, Lightwave or Blender -
    You create an ultra high res figure, then you build a lower res version of the same figure and proportions. I believe that Z-Brush has a Normal Map option - where you can do it right in there. Never done it, myself - but that's the down and dirty of it.

    If you check out the Free Software thread, they have a pile of links for the other kind, where you make a "fake" Normal Map using Photoshop or Gimp and a plugin - I even think they have a link for a stand-alone app that can make a Normal Map for you without Photoshop or gimp.

    Hope it helps, Salem. Good to see you round here again!

    Post edited by Dartanbeck on
  • Salem2007Salem2007 Posts: 513
    edited December 1969

    Thanks Dartanbeck--I'll check some of those out...and thanks for the greeting--I appreciate it!

  • JonnyRayJonnyRay Posts: 1,744
    edited December 1969

    I'll work up a better answer, Salem, but here's the quick one...

    A normal map basically tells the rendering engine "If you had all these extra polygons to work with and they were sculpted like this, then the surface you're trying to render would be changed in this way."

    The best way to generate a normal map is to have a really high resolution model with many many polygons in it (say like V4 is out of the box) and then have a lower-polygon version of the same model. Let's say you took Vicky and smoothed out 90% of her polygons. Then you feed both copies of that model into a tool (many modeling tools these days which are aimed at the game creation market can do this) and the tool generates a normal map for you.

    Unfortnately, for most of what we're working with as end-users of 3D models, we don't have those two versions to work with very often. So we have to fake it. The most common way to fake it is to use a tool which can convert a bump or displacement map into a normal map. As Dartan mentioned, GIMP and Photoshop have plug-ins to do this. There is also a freeware standalone tool called XNormal (http://www.xnormal.net/1.aspx) which I happen to like better. It also has the benefit of if you DO happen to have the high and low polygon versions of the model, XNormal can also generate a true normal map.

    I'm going to work on a rework of my old Understanding Maps tutorial to better explain Bump vs Normal vs Displacement maps for adding detail to a 3D surface.

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    Very interesting discussion:)

    Just as a matter of interest, our very own Hexagon can generate a bump map to be used on a low-poly version and you don't need two models.

    You take your model up a couple of smoothing levels without collapsing Dynamic Geometry, paint with the displacement tool. Export the bump map, take it back down to unsmoothed, collapse DG and export as .obj.

    This quick example was done after converting the bump map to a normal map in Gimp - same sphere, both 1280 polys. Using the bump map as displacement also works, but really rough result. I guess it could be refined by someone who knows how to do these things:)

    sphereren.png
    640 x 480 - 78K
  • Salem2007Salem2007 Posts: 513
    edited December 1969

    Thanks for taking the time to explain...I look forward to trying some of these techniques soon...

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Salem2007 :)

    I had a look at the Nvidia Photoshop plugin and tried a few experiments,. As far as I can see,. the default settings will take an image and convert the R,G,B, info, into a normal map, but It's not very good when compared to making a surface texture (including normal map) in Filter-forge, which is what I'm using. ...There's much less detail in the Nvidia normal map.

    As the others are saying,. there are several freebie programs to make normal maps from images, but the real way would be to create a low poly base model,. then use subdivision to create a "virtual" higher poly model which can have all the high detail, then export that as surface as a normal map.

    If you're using photoshop,. then Filter forge has a full function trial version available. which you should at least look at and experiment with. it's an expensive plugin, but (IMO) if you want to make textures and normal maps or, create your own photoshop filters for image processing or effects,. then it's worth it

    Note: "Baker" can create a Normal map from a "displaced" or modelled object in carrara.

    Normal maps use three values to represent the surface normals of the object, (x,y,z) and that's represented as a colour in the image.
    this is used to create a lighting and shadow effect, to give a low polygon model, the details of a high polygon model, but without the memory overhead of using a high polygon model.

    Bump maps use 256 shades of grey-scale to create a similar lighting and shadow effect.

    Displacement maps also use grey-scale images, but they physically alter the shape of the model by adding subdivision to "virtually" create the High polygon model at render time, which does use a lot of memory and processing power.

    All three methods are useful, and which one you use depends on what you want to do

    hope it helps :)

Sign In or Register to comment.