Renderbump: Difference between revisions
From The DarkMod Wiki
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
Line 23: | Line 23: | ||
[[Category:Models]] | [[Category:Models]] | ||
[[Category:Editing]] | [[Category:Editing]] | ||
[[Category:Tutorial]] |
Revision as of 12:36, 21 April 2007
Use the built-in renderbump command in the Doom3 console (or in DoomEdit) to generate a normalmap for your low-poly models. These are some barebone notes to prevent myself from forgetting how this works, so beware ;)
- Create your mesh - make it as high-poly as you like
- Create your low-poly mesh and try to meet the shape of the high-poly model as far as possible.
- Create a U/V map for your low-poly mesh and take care that no face is sharing the same texture space.
- Place your two meshes such that they are sharing the same 3D space - the high-poly model should "envelope" the low-poly one.
- Hit "Apply Scale and Rotation" (Ctrl-A)
- Export your two meshes to ASE (using goofos ASE exporter script) to test.ase and test_hi.ase
- Enable these options for the low-poly mesh: Face UV, Selection Only and UV Image as Material. Disable the other ones.
- Disable all options when exporting your high-poly mesh: just tick the Selection Only option.
- Create a shader definition containing the renderbump keyword:
textures/darkmod/test { renderbump -size 1024 1024 -aa 2 -trace 0.5 -colorMap textures/darkmod/test_local.tga models/test_hi.ase }
- Change the material information (the *BITMAP one) for your low-poly mesh to point at this valid shader:
//base/textures/darkmod/test
- Run DEdit or Doom3 and type this in the console:
renderbump models/test.ase
- This will take some time (up to several ten minutes) and will create the textures/darkmod/test_local.tga.
- Check your normalmap if it looks choppy or something. You might want to tune the -trace parameter or manually edit the normalmap.