Jump to content
  • Advertisement
  • entries
  • comments
  • views

Normal Mapping

Sign in to follow this  


Just a quick one to show that I am working hard on a big update to 3D Paint. Although for myself I only currently needed diffuse painting and rendering, it become clear to me it would be more useful for others if I could integrate some multi-channel painting. So since the last release I have switched to a later OpenGL and reworked the main viewport to use shaders. I was very pleased to find I could still use the old school OpenGL code alongside (I'm sure they will phase this out, but for now it is more convenient). :D

Being a maths retard it took me a while to fix the bugs in my shaders and work out my tangents from my bi-tangents, but touch wood it now seems to be mostly working and looks alright to my eye. :blink: At the moment I have a simple blinn-phong shader, and you can move around the light and change the diffuse / specular contributions.

My first thoughts were to bandit the alpha mask for each layer and at present you can use this to affect a bump/displacement map which is converted to a normal map for rendering. The normal map is 16 bit to help prevent banding, I may convert the alpha masks to 16 bit also. You can also of course use the procedural masking effects to affect the normal map. This is all far quicker than building high poly geometry in a modeller for a lot of normal mapping effects, which is good because I am lazy.

Of course I recognise that the process for most people will be to build a high poly model for normal mapping, then bake this to the low poly model in something like xnormal. I support this by allowing you to load an external normal map, which then can be combined as desired with the normal map created by 3D paint. :lol:


In this example you can see a simple procedural layer combining with a pre-baked normal map.

Next I will be adding support for the specular (gloss) map, and perhaps a roughness map and another channel such as mirroring.


Being a nOOb to PBR etc I'm now facing the issue that there is no standardized shader model in games / vfx. :blink: Unreal seems to have a metallic channel, other systems may use other channels in their shaders with a different workflow.

Not sure on the best solution for this, ultimately I might have to have the shader model selectable, and this changes the channels that are available. But to start with I might just go for something similar-ish to unreal. But have no idea whether my shader will output anything resembling what you would see in unreal .. might have to do some research, see whether there are any standard shaders I can use for a WYSIWYG appearance.

Sign in to follow this  


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!