Renderbump: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
mNo edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
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 ;)
This tutorial explains how to use the built-in renderbump command in the Doom3 console (or in DoomEdit) to generate a normalmap for your low-poly models.


* Create your mesh - make it as high-poly as you like
* Create your mesh - make it as high-poly as you like
Line 5: Line 5:
* Create a U/V map for your low-poly mesh and take care that no face is sharing the same texture space.
* 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.
* 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)
* Hit "Apply Scale and Rotation" ({{key-ctrl}}+{{key|A}})
* Export your two meshes to ASE (using goofos ASE exporter script) to '''test.ase''' and '''test_hi.ase'''
* 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.
** Enable these options for the low-poly mesh: '''Face UV''', '''Selection Only''' and '''UV Image as Material'''. Disable the other ones.
Line 21: Line 21:
* Check your normalmap if it looks choppy or something. You might want to tune the -trace parameter or manually edit the normalmap.
* Check your normalmap if it looks choppy or something. You might want to tune the -trace parameter or manually edit the normalmap.


[[Category:Models]]
 
[[Category:Editing]]
A few other things that might be important:
[[Category:Tutorial]]
 
The name for the texture in the hi and lo poly model must be different.
 
Remove the uvmap for the hipoly model?
 
 
{{tutorial-models}}

Latest revision as of 12:20, 4 August 2012

This tutorial explains how to use the built-in renderbump command in the Doom3 console (or in DoomEdit) to generate a normalmap for your low-poly models.

  • 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.


A few other things that might be important:

The name for the texture in the hi and lo poly model must be different.

Remove the uvmap for the hipoly model?