Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Generating normal maps for high resolution models...

Discussion in 'General Discussion' started by Jonathan Czeck, Jul 20, 2005.

  1. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Hello,

    Does anyone know of a 3D package that would allow me to do this? Basically the idea is to start with a high polygon model, make a normal map from it, then stick that on a low polygon model. I think Unreal 3 is going to do this, maybe Doom 3 did it too. It isn't hard in Unity once you've got the model and normal map... but...

    Anyone have an idea of how to get it in the first place?

    Mega bonus points if it can be done with Cinema 4D or Blender. :D

    -Jon
     
  2. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
  3. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    I know Maya has built-in tools for it, but that probably doesn't get you that far...

    How large are your hi-poly models.... If they're less than 65K verts, you can actually generate the normalmaps in Unity...
     
  4. dingosmoov

    dingosmoov

    Joined:
    Jul 12, 2005
    Posts:
    559
    So then you can bring in the low-poly model and apply that map to it inside Unity?

    Is there a way to re-align the map to the low-poly model in Unity?
     
  5. Guest

    check out melody at nvidia (boo it's windows only). but it's free. there's also a photoshop plugin that creates on off your texture (i think) - also win only.

    zbrush 2 looks really cool but i haven't used it. supposedly you can generate hi and low poly models at the same time and export out a mesh, normal map, displacement map etc. $489 and has a mac version.

    name's pete but i can't register on the forum for some reason... :eek:
    hi david - yeah it's me...
     
  6. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hi,

    it normally works like that you need a high-poly-model and a low-poly model. The software then calculates out the difference which results into the normal map.

    As for 3d-packages 3dsmax7 is doing it for sure. I thought maya 6.5 would also be able to do it. But as one said before there are cheaper ways to get it done as there are already tools from ATI and nVIDIA.

    http://www2.ati.com/developer/NormalMapper-3_2_2.zip
    http://download.nvidia.com/developer/Tools/Melody/1.2/Melody_1.2.0630.1500.exe


    Greetings,

    taumel
     
  7. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Yeah, I saw the windows only tools. I have an x86 but no windows. :)

    One of the neat things about Unity is that you can create the normal map automatically off a grayscale image.. . so you don't even need that photoshop plugin. That Melody app would be nice, though.

    The model I have right now is only a few thousand vertices... well under 65k.

    You might ask, "Why bother if it is only a few thousand vertices?" The answer is that it is a skinned mesh with maybe.. 16 bones. I get about 6 fps with one of those in Unity... and Shark tells me 16% of the time is being spent on I think it was SkinMesh()... so I'm thinking it's too complicated.

    This isn't a high priority project for me, it's mostly just playing around. However, I expect people are going to come across all of these issues soon enough anyways, so I might as well ask about it all. :)

    -Jon
     
  8. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Thanks for all the Windows only tools... but... isn't that a bit silly given the domain of discourse?

    -Jon
     
  9. Guest

    yeah nvidia and ati both gotta support mac tools better!

    the thing i think is cool about zbrush 2 (aside from the way you model in it) is you can create a 5,000,000 poly model and a low poly model at the same time. "paint" your details on the hi poly and generate your normal map. take it into blender to clean up and animate your low poly. $489 compared to the price of maya or max.

    check out the movies on this page to see what i mean about modelling in zbrush. looks very cool. (no i don't work there! but if anyone's used it, let me know if it's really this cool!):
    http://pixologic.com/zbrush/media_links/movies.html

    ps to anyone looking at melody for normal maps and lod generation... aside from windows only, you also need a vid card that supports pixel shader 2 or it won't run.

    it's pete again...
     
  10. vineeee

    vineeee

    Joined:
    Jul 10, 2005
    Posts:
    40
    Normal Mapper from the above link claims to be able create a normal map from a low and high poly model. The download does contain a Mac version but it appears to be the source code so if someone who knows about such things could make it do something they could perhaps post the app for all of us :D
     
  11. dingosmoov

    dingosmoov

    Joined:
    Jul 12, 2005
    Posts:
    559
    Unity can't handle that model? Why? It doesn't seem that complex.

    A skinned mesh with 16 bones isn't that complex of a character why is Unity only getting 6fps?

    Does Unity always slow down with boned models? Does this mean we can only have Balls or Cars as characters in our games? That statement is a little scary to hear.
     
  12. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    @aarku

    Well maybe i've misunderstood you or my english wasn't just good enough but as you described it in your first post it sounded like the creation order would look like high-poly, normal map, low poly.

    So just to get sure i wanted to give you a short description of what the tools i know are doing.

    And for bringing up windows-only-tools most of the mac-users i know also have a pc. And when they have one they mostly run windows on it, so...

    But as Pete said there also is zbrush for both platforms but i've never used it so you will have to look it up on your own. I think there are also plugins for the different render-packages as well, so you also might want to look for these?!

    This reminds me of the talk i had with Daveyjj and as i said there: The best is if software is multiplatform! :O)


    Greetings,

    taumel
     
  13. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Regarding the 16 frames per second for a skinned model in unity.

    The current implementation is slow and unoptimized.
    The skinning support in unity is new, we wanted to get character support into unity before 1.0. The first implementation was done so that people can start using characters in unity. By no means will we keep performance at the low level it is at the moment.

    We will replace it with vertex shader based skinning and a much more optimized software fallback.
     
  14. dingosmoov

    dingosmoov

    Joined:
    Jul 12, 2005
    Posts:
    559
    How far off is this?

    I know you guys are working on many things. But Independent Game Festival deadline is Sept 1st, and I was planning on entering a character based game made with Unity. If optimization is a couple weeks away I can move forward, if it's 6 months away, then I should scratch my current design doc.

    Should I stop planning for a character based game?
     
  15. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Whoops. The artist who made the model just mentioned that the model was 20k polygons, not 2k polygons like he thought.... (Don't have a way to check an fbx at the moment here) :eek: :eek:

    Anyways about the Windows-only stuff. Sorry if I seem a little frazzled about it all. It's probably similar to the feeling of Unity being Mac only to some of you. . . it's just that it happens much more to me. I'll see what I can make of this source code. Thanks for the tip on that.

    -Jon
     
  16. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Sorry... artist mentioned now it was 20k instead of 2k like he originally said. Heh. :eek:

    *needs to get something other than Unity that can read fbx files*

    -Jon
     
  17. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Ok good 16 fps seemed a bit low to me.

    That said, i can put a few more optimizations into the skinning within the next 1.5 months.
     
  18. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Actually, the source code contains an xcode project... Here is the compiled command-line tool. compiled on tiger, so your milage may wary...

    Cheers,
    Nicholas
     

    Attached Files:

  19. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Reduced the ragdoll to 1700 triangles and performance was up to like 40 fps... on my slow old thing.

    So, carry on, move along. :)

    I still want to do the normal map stuff... Will give it a shot... if that command line program works nicely I'll throw a GUI on it for everyone.

    -Jon
     
  20. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Maxon just announced Cinema 4D version 9.5. Amongst other things it will support the creation of normal maps from the sub-polygon displacement function. This could be very useful for game creation. In fact, the info page specifically mentions game development:

    http://www.maxon.net/pages/products/c4d/95features_e.html

    I guess I need to start saving money for it.
     
  21. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
  22. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I've got this, thanks. The next version of Cinema 4D looks good because of the ability to use the deformation created by sub-polgon displacement as a normal map. In the meantime I'll stick with version 9.1.
     
  23. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
  24. Guest

    Hello
    Just evaluating the demo and came across this post. ZBrush 2 does indeed allow you to create both normal and displacement maps from highly detailed SubD models. I haven't tried the normal map yet but the displacement map works a treat bringing it into C4D. I was just wondering if Unity supports normal mapping.
    Cheers
    Boxy
     
  25. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Exuse me if I am being thickheaded; But can Normal maps be used in skinned characters? Is this the waqy they achived the models in doom3? (though it was sub-D at first :D )
     
  26. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    It most definitely supports normal mapping. Choose any of the bumped or bumped glossy or whatever shaders. Those use normal mapping. I think there may be an example or two in the Physics Demo world. Might have to switch the shader or something. But let me tell you, it's sweet. :)

    -Jon
     
  27. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Yeah should be fine on skinned characters. Yeah it seems this is how Doom 3 and the upcoming Unreal do it to make it look like models have more polygons than they actually do. Works really well for some things I think.

    Here is a really old test I did in Unity.



    -Jon
     
  28. nmceri

    nmceri

    Joined:
    Aug 4, 2005
    Posts:
    56
    That looks more like traditional bump mapping to me. I'm not an authority on these sorts of things but I thought what sepperates normal mapping and bump mapping is that normal mapping will deform the mesh itself, While bump mapping is creating the illusion of a form on the surface that can be influenced by light sources.
     
  29. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    http://en.wikipedia.org/wiki/Normal_mapping
     
  30. nmceri

    nmceri

    Joined:
    Aug 4, 2005
    Posts:
    56
    Man, Wiki is the best. Thanks for that link.
     
  31. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Can anybody tell me how to operate the Normalmapper command-tool? Do you just drag a model on to it or what?
     
  32. tripdragon

    tripdragon

    Joined:
    May 7, 2005
    Posts:
    38
    ya can some one make a gui for this tool >? It is confusing at best
     
  33. I believe that you're supposed to export models into .nmf format(or something like that) before you can generate normal maps from them...and how to export to that format I don't know(it'd be nice if somebody could make a .3ds to .nmf converter) and once they are exported, I don't have a clue how to use them with the normal mapper utility...but if somebody with the know how could produce a program that does this, I'd love them...and maybe even work on a game project with them...
     
  34. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Well luckily Maya can do the normal mapping for me, but a Gui for that command line tool would save a lot of people for a lot of work (exept those making the Gui of course! :D )
     
  35. Guest

    If thats the case, then how about someone start a small little site that just lets us upload models and have them get normal mapped by some generous user...

    Errrr well untill someone sees that lack of a basic small tool for osx. Hell why does blender not have one yet ?
     
  36. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    I don't know the cost of blender, it's creators or what they are planning to do with it, but Of course I want everybody in the world to have the ability to create normal maps! I really don't think the utility being offered here in the forums are THAT hard to cope with (and it's offered free, wow!).

    If you are very serious about normal maps, and you want to stick to blender, I bet you could learn it in reasonable time, and Im sure if you email it's creators for serious Q's about it they would be glad to answer you back with some kind of answer..

    And the website idea is a good idea, hope someone out there will do that sometime (maybe you could be the admin?)..

    Good Luck!
     
  37. Guest

    Blender free Open Source, works directly with Unity
    http://blender3d.org/cms/Home.2.0.html

    The developers there are a bit nerdly and hard to convince to make a feature no matter how hard a group of dedicated users beg and send examples untill a developer themself desides that they want such and such a feature.

    The fact that the command line tool is free is great but we are still without a method of exporting the correct format, and then test after test of trying.. OSX has very few tools that help out indie 3d artists comparred to the windows platform. But again, we are a smaller bunch.

    Building the site would be great but it will take someone dedicated and legal crap will insue on if someone gives out a model that they dont want stolen and such...

    But that said, more tools more tools !
     
  38. vineeee

    vineeee

    Joined:
    Jul 10, 2005
    Posts:
    40
    Just discovered that the SimpleMakerPro plug-in for Cinema 4D (here - http://www.cinemax4d.de ) will create normal and height maps by comparing high and low poly models. Not tried it but the demos look pretty good. It also does poly reduction and occlusion maps.
     
  39. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I have been discusssing this recently on a C4D board; C4D9.5 now directly supports the creation of normal maps from spd displaced objects or ones inside a hypernurbs. It creates the normal maps via the new (much improved) Baker - however there is a current bug which means the creation of Tangent normal maps isn't working - typical, as that is what Unity supports :) Someone said that so far SimplemakerPro is the only way he has found to create a Tangent normal map that works as it should, but of course I just spent the money on the 9.5 upgrade...
    The plugin looks very useful though - anyway I'm sure it won't take Maxon that long to fix the bug.
    Boxy
     
  40. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
  41. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Or maybe thats just the source for the same normalmapper that was posted here earlier? Dough! :slap:
     
  42. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
  43. guategeek_legacy

    guategeek_legacy

    Joined:
    Jun 22, 2005
    Posts:
    659
    Ok so someone said Maya 7 had good noramal maping tools. I have two meshes of diferent Poly numbers exported from Bryce (Its a terain) and I have acess to Maya 7 as I'm learning it. So I was wondering how I create a normal map from the higher modle for the lower one? Any help would be great, thanx. Jeff
     
  44. guategeek_legacy

    guategeek_legacy

    Joined:
    Jun 22, 2005
    Posts:
    659
    I figured it out :) now to try it out in Unity. Jeff
     
  45. Just a dood

    Just a dood

    Guest

    hi all,

    Just for your information, Zbrush is what the doom and unreal people are using to make their normal maps. ZBrush specializes in dealing with VERY high poly model making. Normal maps are created from high poly meshes. They are mapped on to low poly meshes to make them look high poly and save lots of render time in the process.

    ZBrush has taken over in a lot of movie efx houses because it allows an artist to make their 3D models with the same kinds of techniques a sculptor might use rather than using subdivision, or fiddling with individual polygons, and the like. Although a really powerful tool, it as yet, has no animation support, so you will still need something like Lightwave, Max, Maya, C4D, etc, to do your rigging.

    A lot these other programs are adding normal mapping in order to be able to use Zbrush maps because it is so popular right now. Well, that and the technology just makes sense. Most 3D apps simply can't handle high poly counts the way Zbrush can, so using normal mapping is a way around that. Can you tell I'm a ZBrush fan :)

    See what other 3D artists have to say about it. They have a lot more info than I do.
    http://www.cgtalk.com

    I'm sure you can find some other application specific normal mapping tools as well

    Good Luck

    Peace
     
  46. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    A few quick questions:
    * Can you get ZBrush to generate the high->low tangentspace normal map?

    * Do you know if it's possible to get ZBrush to generate an ambient occlusion map from the hires mesh, using the lowres cage for UVs?
     
  47. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Are you looking to buy Zbrush Nich? :D

    Well It certainly makes real nice Normal-maps! I heard the Doom guys used it to make their normal maps so I would guess it's the same for the other Q as well.. Why don't you take a look at http://pixologic.com/

    Im sure they know more what you are talking about, but Im using a demo of Zbrush 2, and Im seriously thinking of buying it!
     
  48. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    We already have!
     

    Attached Files:

  49. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    All this normal map generation for substituting polygonal detail seems really great and exciting for next gen. But I have to wonder what the performance gain is. Doesn't it take a comparable amount of cpu cycles to calculate all this "artificial" normal data? Is this something that has been built into the hardware of next gen GFX cards that speeds this process up so much that it's faster than the actual polygonal data?

    Just a general realtime 3d question... it really baffles me when the guys from say the Unreal team say something like, "here's a 2 million poly character that has been reduced to 5 thousand polys and normal mapped... and now all that detail is in the normal map, and it looks identical." Well ok, but all that datal still has to be processed somewhere... what makes it so much faster?

    Just a general question that I've been curious about :?
     
  50. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    I think the speed comes because normal mapping is basically just a lighting trick and not computing actual geometry and then the lighting of said geometry.

    The only thing is, unless I am mistaken, normal mapping in unity requires per-pixel lighting for anything to show, which of course results in lower perfomance. If there was some way to hack normal mapping with vertex lights that would be ideal.

    -Jeremy