Parallax mapping
by john lomax · in Torque 3D Beginner · 10/20/2009 (6:19 pm) · 14 replies
I am having some issue getting parallax to work correctly within torque 3d. I am positive I am create the map correctly which is by taking height information and within the normal map and placing it within a newly created alpha channel. when i save it out and use it in torque I use the parallax slider and I get odd results. I am exporting the mesh I am applying it to from maya. I feel as if it has something to do with the change of up axi but at the same time i am just unsure. I would really love for someone to help me out, I really am looking to use parallax from this new project I am working on because the results I have seen from it are amazing. Any sort of help or tutorials from any of you would be a great help.
#2
Sounds like you're rendering your normal map from a mesh in Maya, then converting that to a parallax map in another program. Have you tried just rendering out a parallax/displacement map from Maya the same way you're rendering out a normal map? I would think it would give you much better results than converting your normal map to parallax afterwards.
xNormal is a good suggestion though, as is CrazyBump. I use CrazyBump, and I've found that when I'm creating normal/displacement maps from a diffuse map, I have to tweak the values separately for normal maps and parallax maps. Just exporting from one to the other never gave me very good results. I know this isn't what you're doing, but my point is that normal and parallax maps need different finessing, in my opinion.
10/21/2009 (10:50 am)
Sven is right, a little parallax goes a long way.Sounds like you're rendering your normal map from a mesh in Maya, then converting that to a parallax map in another program. Have you tried just rendering out a parallax/displacement map from Maya the same way you're rendering out a normal map? I would think it would give you much better results than converting your normal map to parallax afterwards.
xNormal is a good suggestion though, as is CrazyBump. I use CrazyBump, and I've found that when I'm creating normal/displacement maps from a diffuse map, I have to tweak the values separately for normal maps and parallax maps. Just exporting from one to the other never gave me very good results. I know this isn't what you're doing, but my point is that normal and parallax maps need different finessing, in my opinion.
Quote: And - a screenshot of what is not working is ALWAYS more helpful to try and help :):)
#3
sven: The way I am creating my Parallax maps is by taking the height map and normal map created in crazy bump from a diffuse and brining them into photoshop. I then Take the height information and copy and paste that into an alpha channel within the normal map and get the below result.

and this is what I get in torque with a tad bit of the parralax slider adjusted.
]
The problem is that the bricks are going the wrong way, they are being pushed in instead of out so I dont know if it has anything to do with the way that normal maps are read in torque or what. Also I have messed with x normal before but did not know if they where capable of spitting out paralax and viewing them.
Russel: Im currently not rendering from maya to get the parallax all of it is done from crazy bump and photoshop. How in your opinion would you go about tweaking the height map ? just using level adjustments in photoshop ?
Thanks again for all your help guys I really appreciate the feedback, sometimes its really hard to get a response out of people so when guys like you come along it is very appreciative :)
10/21/2009 (12:31 pm)
Hey guys, first off thank you so much for your replies i am really thankful for getting some help on this. sven: The way I am creating my Parallax maps is by taking the height map and normal map created in crazy bump from a diffuse and brining them into photoshop. I then Take the height information and copy and paste that into an alpha channel within the normal map and get the below result.

and this is what I get in torque with a tad bit of the parralax slider adjusted.
]The problem is that the bricks are going the wrong way, they are being pushed in instead of out so I dont know if it has anything to do with the way that normal maps are read in torque or what. Also I have messed with x normal before but did not know if they where capable of spitting out paralax and viewing them.
Russel: Im currently not rendering from maya to get the parallax all of it is done from crazy bump and photoshop. How in your opinion would you go about tweaking the height map ? just using level adjustments in photoshop ?
Thanks again for all your help guys I really appreciate the feedback, sometimes its really hard to get a response out of people so when guys like you come along it is very appreciative :)
#4
And just as a matter of opinion, I think your normal map is way too strong. I would pull it back about 40%.
10/21/2009 (12:59 pm)
One thing I haven noticed about T3D is that the way normal maps are read has been changed slightly. Before you do anything else, invert the green channel in your normal map and look at it in-engine again. I've had to do that on CrazyBump-generated normal maps recently. You may need to move a light around in your scene to make sure that helps.And just as a matter of opinion, I think your normal map is way too strong. I would pull it back about 40%.
#5
10/22/2009 (3:23 pm)
Hey Russel, So i did invert the green and that Did help a bit but for some reason I do not know why but when I pul the parallax slider to the right the height on the map goes inward instead of outward where the bricks are supposed to be pointing. I dont get it it just keeps doing that for some reason and I have no clue why.
#6
Edit: Oh, sorry... I just looked at the image of the displacement map that you posted above. Looks correct, actually.
10/22/2009 (3:33 pm)
Quote:Hey Russel, So i did invert the green and that Did help a bit but for some reason I do not know why but when I pul the parallax slider to the right the height on the map goes inward instead of outward where the bricks are supposed to be pointing. I dont get it it just keeps doing that for some reason and I have no clue why.Are you sure your parallax maps are using white for high areas and black for low areas, instead of the other way around? It sounds like this problem might be fixed by simply inverting the values of the parallax map in Photoshop.
Edit: Oh, sorry... I just looked at the image of the displacement map that you posted above. Looks correct, actually.
#7
parralax map:

Normal map:

Height map:

The odd results from using the slider:

Not using the slider:

link to the files:
www.sendspace.com/file/v5hy77
10/22/2009 (3:54 pm)
Thanks for the help Russel, I tried doing that and still had the same issue even though that really seems as if that would solve the problem. Here I am attaching some screenshots of my maps and the oddness in torque. Also, if you had time thier is a link at the bottom to the .dae file and the textures maybe I am doing something wrong that I am unaware of. This is my first time using torque at all so I could very well be missing something. Thanks again for your help I really appreciate it so much, thank you. parralax map:

Normal map:

Height map:

The odd results from using the slider:

Not using the slider:

link to the files:
www.sendspace.com/file/v5hy77
#8
10/22/2009 (4:14 pm)
Hm. How exactly are you using the map you've labeled "parallax map" in the engine?
#9
10/22/2009 (4:29 pm)
I am placing it within the normal map input, I believe that is what need to be done right ?
#10
Give that a shot.
10/22/2009 (5:08 pm)
The normal map should have a grayscale parallax (essentially, your "heightmap" map as its alpha channel. That file is loaded into the normal map input, then you use the slider to dial in the amount of parallax. The rgb image above that you've indicated as "parallax" is not needed.Give that a shot.
#11

sorry for bugging you so much, I really do appreciate the help a lot Russel.
10/22/2009 (6:10 pm)
Thats the thing is that thats exactly what I am doing. I take the height information and take the gray scale image (the height map) and place it within an alpha channel of the normal map. Here is the image you can see in the bottom right hand side of the screen that its thier in the alpha channel. 
sorry for bugging you so much, I really do appreciate the help a lot Russel.
#12
I would be interested to see what your brick wall would look like if you inverted the heightmap. Not that it would solve your problem overall.
This is a long shot... but is there a possibility that your geometry has the UVs flipped? I'm not even sure that would cause the backwards parallax problem you're having. Just thought I'd ask.
I'm running out of things to look at, unfortunately.
Just curious... which version of Torque 3D are you using? Your profile page doesn't list you as an owner.
10/22/2009 (6:18 pm)
Oh, you're not bugging... this is exactly what the forums are for. :)Quote:Thats the thing is that thats exactly what I am doing. I take the height information and take the gray scale image (the height map) and place it within an alpha channel of the normal map. Here is the image you can see in the bottom right hand side of the screen that its thier in the alpha channel.Oh, sorry. I misunderstood.
I would be interested to see what your brick wall would look like if you inverted the heightmap. Not that it would solve your problem overall.
This is a long shot... but is there a possibility that your geometry has the UVs flipped? I'm not even sure that would cause the backwards parallax problem you're having. Just thought I'd ask.
I'm running out of things to look at, unfortunately.
Just curious... which version of Torque 3D are you using? Your profile page doesn't list you as an owner.
#13
10/22/2009 (6:24 pm)
Thanks I appreciate that :) I did try inverting the height map, and nothing :( I inverted everything just to test and nothing worked lol But I am glad you told me about inverting the green for the normal maps because that definitely gave it a lot more pop. I will check the uv's and see if that could be an issue also we will see. LOL I didnt pirate it or anything my proffesor actually told me that someone would ask about that on here sooner or later. I am running torque 3d sdk 1.0. The reason that it does not show is because my school (Columbia college Chicago) has a license agreement with garage games so the school paid for the licenses, don't worry I'm not a pirate.
#14
Normally parallax will go into the surface and not out of the surface. This is normal behavior. So the alpha channel of the normal map is more of a depth map from the surface.
10/22/2009 (9:32 pm)
Quote:when I pull the parallax slider to the right the height on the map goes inward instead of outward
Normally parallax will go into the surface and not out of the surface. This is normal behavior. So the alpha channel of the normal map is more of a depth map from the surface.
Associate Sven Bergström
Luma Arcade
Also, try taking the normal map texture into something like xNormal, where you can see the results in a different renderer.. If the results are the same its most likely the texture/height map.
Another note is the GUI in the editor - Its parallax Range is WAAAAY to big, and should be tiny. The values extremely close to zero, are the ones where it will work.
And - a screenshot of what is not working is ALWAYS more helpful to try and help :)