hey jogshy...i just downloaded your program. i haven't gotten to use it yet but i just want to thank you for keeping everyone up to date so much and adding so much.
Weird, it gave me a mighty crash... I thought it was the new windowed mode but I had the same trying it fullscreen. Older version still works fine for me.
Win XP pro SP2, QuadroNVS285, PIV 3.6GHz, 2 Gigs of ram.
Hey jogshy, I like the new preview window! One problem though, when I load in multiple meshes to make a normal/ao map it crashes during rendering (when it gets to calculating hipoly vertex normals).
Yes, I was also getting that problem with multiple high-poly meshes when trying to render a normal map.
Also would it be possible to change the default model loading format to the last one that the user chose?
I keep my models in .OBJ format but the model loader always defaults to the type at the top of the list, so I have to change it every time. If there's a way of making it set the last used file format as the default, that'd be good.
Very impressive! I can't believe that you're STILL pumping out regular updates and fixes. Thanks again, Jogshy! I'll be sure to have a go at normal mapping on my next project.
Hi I haven't tried this yet but I definately intend to next normal mapped model I make. I just want to add to everyone elses thanks for spending your time on what appears to be an excellent tool for us to use
This is great! I haven't tried this out yet, but I just read through the thread and I'm very excited to try it. Thanks a lot Jogshy.
Did you ever get the diffusely convolved (blurred) cube maps that you were looking for to use for environment lighting? I have a library of them that I use for lighting with my shaders. I created them all using the HDRShop to CubeMapGen process that Eric posted about. They're all saved in 16 bit HDR DDS format. I'd be willing to donate them to the cause if you want. You can download them here: HDR Lighting Cubes
If you're interested, I also have the non-blurred versions of each of those as well - although the file size is Much larger. I guess if you wanted to get really fancy you could give the option to load the cube maps as a pair - the blurred one for the lighting and the non-blurred one for the background. Just a thought.
By the moment the blurred ones will be ok thx
But hey a question! Is a good idea to use other cubemaps different to do the specular lighting too or just need the diffuse ones? I see HDRShop allows to generate a different cubemap for specular. If I can perform a multiply for diffuse and then add the specular will be good?
And yep you're right.. I think I must let the user to choose a cubemap for lighting and other for the skybox or background, yep. I have the Devebec's probes here for that no problem.
Yes, diffusely convolved cube maps are different from specular convolved ones. It works exactly the same as a specular exponent. A diffuse convolve is like using a spec exponent of one. So if you want to do your diffuse lighting and your specular lighting both with cube maps, you'll need two cube maps - one diffusely convolved and one specularly convolved. You'd use the model's normal to look up into the diffuse one and the reflection vector to look up into the specular one.
I'm not doing it that way in the shaders that I've written so far. I'm using a hybrid approach where I use a diffusely convolved cube map just for ambient light. Then I use point lights for the diffuse and specular.
Atm is not possible to load and use DirectX .fx shaders.
This is because xNormal uses Open GLSL shader language which doesn't include "semantic annotations" ( UI-to-shader and shader-to-UI thing ). Neither includes "FX-states" ( disable zwrite, enable alpha test, blah blah ). There is a very-experimental design in mind ( called COLLADA FX ) but is pretty immature atm. I could change the graphics driver to DirectX but I don't wanna use it because is not portable and that will grow the deployment +50Mb ( what occupies the DirectX runtime installer ) because that puts xNormal to 75Mb and is a complete excess.
Also, can be hard to implement and design and I don't wanna complicate more the things. Meanwhile, you could implement your custom xNormal graphics driver( using DirectX and to define/load custom shaders with the "Configure" feature ) using the xNormal SDK to use your 3D engine shaders and see a more-accurate result in the xNormal 3D viewer.
I know that will be a nice feature so I write a note here to implement it in the future, sorry.
Is it possible for batch render to isolate/mask the current object in the list from the rest? That way intersecting objects don't get rendered as it's going down the list.
Is it possible for batch render to isolate/mask the current object in the list from the rest? That way intersecting objects don't get rendered as it's going down the list.
[/ QUOTE ]
Atm nope. Batch render starts at top on the list and continues to down overwritting the normal map. You need to set your UV's in a way the new batch won't overwrite the old pixels, sorry ( well or tweak it manually in Photoshop rendering two different normal maps )
The isolate/mask is another feature I wanna implement in a few
Hey Jogshy, I think I may have come across a bug? I've tested quite a few things to find out if it's just me being silly, but the error keeps happening.
Here's a screenshot:
You can see the test models I have, just a simple box, 12 triangles, and a similar box with rounded corners and edges.
The UV layout with the xNormal-generated normalmap is on the right.
As you can see, it's getting two sides of the box right, but the ends, and the top and bottom, are being crazy!
I've tried it with .OBJ and .3DS format, with and without smoothing groups, and the same thing always happens, I can't figure it out!
Edit: Also, here's a screenshot of the lowpoly box in xNormal 3d viewer, showing tangents and lowpoly normals with no normalmap applied:
Are you using the "Smooth normals" option or using the vertex normals exported? Can you send me those models to do some test pls MoP?
I think can be one of these things:
1) I touched the tangent basis computation in the last version so problably a mistake broke something
2) Some exporters are REALLY bad ( 3dsmax2obj vertex normals are really bad exported for cubes. See inside the .OBJ for "vn" elements... All are (0,0,-1) tons of times ). Sure your lowpoly OBJ model vertex normals are good. You can open the OBJ with the notepad. Exporting like a 3DS won't solve the problem because is a 3dsmax internal thing. Maya 7.0 can act strangely sometimes too.
3) Try triangulate and weld manually positions and UVs and then retry
4) Pass a XForm + Edit mesh modifier to your objects BEFORE to export to OBJ, so the transformation matrices will be correct
5) Sure the object uses only ONE material for all the faces
6) Sure the model radio is almost 0.5 units. Too small objects can cause floating point errors.
7) Sure your vertex normals are well set inside Maya, max or whatever.
8) If you are using the xNormal "smooth normals" option, try configure the tangent basis calculator unchecking the "use triangle area for smooth" and too set the "Normals threshold" and "Tangent threshold" to 0.0
jogshy , i want to congrat you for this amazing piece of software ! will you include a "F.A.Q" with these issues ?
so far this is very interesting ! rock on !
Oh, Jogshy, you were right - it was 3dsmax's OBJ exporter screwing up the normals. I exported the same object from Maya and it works fine now... thanks!
Version v3.6.1 is out. Basically added the diffuse cubemap lighting to simulate outdoors, added fresnel reflections, now the last importers/exporters used are saved so you won't have to re-select the file filter in the combo boxes and the isolate/mask normal map ( see the "batch protect" in the docs )
Here you can see the diffuse cubemap lighting in action with the MoP's xemakos example ( notice the light intensity is almost zero and it is using only a white base texture + the diffuse cubemap lighting + glow effect )
I really wanna thank to Ben Cloward for his diffuse ligthing probes
I'm preparing some tutorial videos with voice( fear my spanglish! ) commenting all, but unfortunally the CamStudio application produces too much desyncronization between voice and video so I'm buying a video capture card to make this.
Awesome, Jogshy!
I love this new ambient cubemapped lighting ... it really helps make stuff look better in the viewer
I just thought ... maybe a little button somewhere (or a keyboard shortcut maybe) to "Hide UI" in the 3d viewer would be nice, because in windowed mode a lot of the text and stuff covers the screen where the model is.
[ QUOTE ]
I just thought ... maybe a little button somewhere (or a keyboard shortcut maybe) to "Hide UI" in the 3d viewer would be nice, because in windowed mode a lot of the text and stuff covers the screen where the model is
[/ QUOTE ]
MoP, Try >> F1 << See the bottom-right text inside the 3D viewer ( yes must be there tons of confusing text if you didn't see it really hahahaha )
And hope you don't mind I destroyed your model adding it that diffuse probe in the example mwaaaa!
hmm yea i was thinkin something a long those lines aswell.. will take a look at it monday when i get back to work. Anyways, i did get the normalmap out of there alrigth it was just lacking the "127, 127, 255" blue for some reason. Will see if i can figure out what im doin wrong later
However i still cant get the cages to work properly. If i uncheck the closest hit if ray fails it renders gray. Its weird cus ive positioned my plane (im rendering down a texture) on all possible sides with its normal pointing to all different directions I also increased the cages distance for both front and back etc etc.. Not really sure whats up.
Another problem im having is that i dont get a Heightmap rendered out. I see it in the final result but its not in the alphachannel of the texture. Can these two probs be related?
The problem is that you are not setting well the ray distances. You put 2.50(front) and 0.5(back) in the settings file I received. If you open your file with, for example, 3DSMAX you will see why:
Notice the tape I used to measure the distance marks 125... If you specify ray distance = 2.50 ray won't hit the highpoly mesh never. You have to specify like 125/2=62.5
I divide the distance by two because the tape measures total distance and xNormal uses sepparate front ray/back ray distances. For your example then 62.5 for the front and 0.0 for the back will be ok(0.0 because you set the lowpoly normals pointing to bottom, where is the highpoly model so no need to define ray back distance really)
If you check the "Closest Hit if ray fails" option then the distances are ignored and will get the closest ray hit, which explains why if you check this option all is good. If you uncheck it then you need to specify good ray distances like indicated.
After making that, these are the result I got ( unchecked the closest ray option and setup cages manually... notice 0 rays failed and and appears to be ok )
See the max height detected is like 59... You can use this value too to measure the ray distances. Just put an arbitrary value as ray distance value and check the closest hit if ray fails options.. Then use the preview "Max height" value the next time.
Notice you must choose an output format with alpha channel if you want to save the heightmap. If you choose a format without alpha channel ( like is the JPG ) you won't get any height/displacement map saved. Also, CAUTION with old photoshop version editing TGA files because it had a nasty bug with the alpha channel... See this patch
ps: The version 3.7.0 is almost finished with soft dynamic shadows, command-line automatic renderer(yes to integrate it in your 3d engime map compiler with no user interaction), ase loader, heavy documentation improvements, optimizations in the viewer, video tutorials and much more!!! Also I'm waiting Microsoft to release the public Windows Vista Beta 2 to compile xNormal for x64 and avoid the 3Gb memory limit!
just checked out Xnormal and i gotta say i'm pretty impressed.
a couple of things that I would like to see ( they may already be implemented but I havent had chance to read all the help yet) are
1. the option to turn off all individual maps. not just the parralax map.
2. the option to change the map files without having to exit the viewer.
3. support for more lights.
Thats all I've noticed so far.
This looks to be a really cool app and it's lightning fast. wicked.!
I have some problems with the fine detail map:
Whenever I add a fine detail/bump-map, the intensity on my normal-map is decreasing very stong. I don't know if this is a bug or sth or maybe I did sth. wrong. But I tried a bit around with it, but didn'z came to a solution. (In the bomp map, the background-color is black, and only where the bumps are are some greyscale-details.)
Does anyone know a solution for this ? because the polybump normalmapper of crytek does the fine-detail-bumps much better
edit: here are some pix for explayning, what my "problem" is
with bumpmap:
1) Increase/decrease the "scale factor" of the detail. More scale means the normal calculated from the heightmap will be unnormalized, allowing you to set more "weight" o the detail normal than the generated normalmap.
2) Increase/decrease the "blend factor" of the detail. A blend factor of one means the full detail will be added. 0.5 means half detail will be blended with the normalmap. 0.0 means no detail will be blended to the normalmap.
If after touching this you don't get the desired results:
1) Notice the detail heightmap MUST BE signed. A height of zero means emboss. 127 means flat. 128+ means elevation.
2) Caution with the type of file you use for the detail. Try to use a lossless one like a TIF. If you use HDR formats like OpenEXR, caution with the alpha premultiply and exposition.
3) Sure your detail heightmap is NORMALIZED. Min color must be 0 and max 255 if you are using 8bpp. If you use non-normalized color then is very possible that you won't notice too much detail. Try to use "auto-levels" in photoshop to achieve this.
Looking your bump map, gamePat, I think the problrm is that you are using low contrast heightmap(is too much gray, you need to level up the contrast) and that why you are getting so poor elevation. Try to use max height 255 and min 0 and then touch the "scale factor"/"blend factor" options until is ok.
Replies
Win XP pro SP2, QuadroNVS285, PIV 3.6GHz, 2 Gigs of ram.
Still, thanks for the even better feature list!
Btw, after solving a few problems I will release a new version this Sunday
As usually:
Change log is in http://www.santyesprogramadorynografista.net/archives/xNormal_changes.txt
Download links are in
http://www.santyesprogramadorynografista.net/projects.aspx
All comments are welcome
Also would it be possible to change the default model loading format to the last one that the user chose?
I keep my models in .OBJ format but the model loader always defaults to the type at the top of the list, so I have to change it every time. If there's a way of making it set the last used file format as the default, that'd be good.
Cheers again, great work Jogshy!
to MoP:
yep yep, I will put the OBJ filter first and save last used mesh type too for the next version
thx
Did you ever get the diffusely convolved (blurred) cube maps that you were looking for to use for environment lighting? I have a library of them that I use for lighting with my shaders. I created them all using the HDRShop to CubeMapGen process that Eric posted about. They're all saved in 16 bit HDR DDS format. I'd be willing to donate them to the cause if you want. You can download them here:
HDR Lighting Cubes
Enjoy!
But hey a question! Is a good idea to use other cubemaps different to do the specular lighting too or just need the diffuse ones? I see HDRShop allows to generate a different cubemap for specular. If I can perform a multiply for diffuse and then add the specular will be good?
And yep you're right.. I think I must let the user to choose a cubemap for lighting and other for the skybox or background, yep. I have the Devebec's probes here for that no problem.
I'm not doing it that way in the shaders that I've written so far. I'm using a hybrid approach where I use a diffusely convolved cube map just for ambient light. Then I use point lights for the diffuse and specular.
Is it possible to use own shaders (.fx) in the viewer?
This is because xNormal uses Open GLSL shader language which doesn't include "semantic annotations" ( UI-to-shader and shader-to-UI thing ). Neither includes "FX-states" ( disable zwrite, enable alpha test, blah blah ). There is a very-experimental design in mind ( called COLLADA FX ) but is pretty immature atm. I could change the graphics driver to DirectX but I don't wanna use it because is not portable and that will grow the deployment +50Mb ( what occupies the DirectX runtime installer ) because that puts xNormal to 75Mb and is a complete excess.
Also, can be hard to implement and design and I don't wanna complicate more the things. Meanwhile, you could implement your custom xNormal graphics driver( using DirectX and to define/load custom shaders with the "Configure" feature ) using the xNormal SDK to use your 3D engine shaders and see a more-accurate result in the xNormal 3D viewer.
I know that will be a nice feature so I write a note here to implement it in the future, sorry.
thx for the feedback
Is it possible for batch render to isolate/mask the current object in the list from the rest? That way intersecting objects don't get rendered as it's going down the list.
Is it possible for batch render to isolate/mask the current object in the list from the rest? That way intersecting objects don't get rendered as it's going down the list.
[/ QUOTE ]
Atm nope. Batch render starts at top on the list and continues to down overwritting the normal map. You need to set your UV's in a way the new batch won't overwrite the old pixels, sorry ( well or tweak it manually in Photoshop rendering two different normal maps )
The isolate/mask is another feature I wanna implement in a few
Here's a screenshot:
You can see the test models I have, just a simple box, 12 triangles, and a similar box with rounded corners and edges.
The UV layout with the xNormal-generated normalmap is on the right.
As you can see, it's getting two sides of the box right, but the ends, and the top and bottom, are being crazy!
I've tried it with .OBJ and .3DS format, with and without smoothing groups, and the same thing always happens, I can't figure it out!
Edit: Also, here's a screenshot of the lowpoly box in xNormal 3d viewer, showing tangents and lowpoly normals with no normalmap applied:
Any ideas?
I think can be one of these things:
1) I touched the tangent basis computation in the last version so problably a mistake broke something
2) Some exporters are REALLY bad ( 3dsmax2obj vertex normals are really bad exported for cubes. See inside the .OBJ for "vn" elements... All are (0,0,-1) tons of times ). Sure your lowpoly OBJ model vertex normals are good. You can open the OBJ with the notepad. Exporting like a 3DS won't solve the problem because is a 3dsmax internal thing. Maya 7.0 can act strangely sometimes too.
3) Try triangulate and weld manually positions and UVs and then retry
4) Pass a XForm + Edit mesh modifier to your objects BEFORE to export to OBJ, so the transformation matrices will be correct
5) Sure the object uses only ONE material for all the faces
6) Sure the model radio is almost 0.5 units. Too small objects can cause floating point errors.
7) Sure your vertex normals are well set inside Maya, max or whatever.
8) If you are using the xNormal "smooth normals" option, try configure the tangent basis calculator unchecking the "use triangle area for smooth" and too set the "Normals threshold" and "Tangent threshold" to 0.0
9) Send me that model please, I wanna play
so far this is very interesting ! rock on !
Here you can see the diffuse cubemap lighting in action with the MoP's xemakos example ( notice the light intensity is almost zero and it is using only a white base texture + the diffuse cubemap lighting + glow effect )
I really wanna thank to Ben Cloward for his diffuse ligthing probes
As usually, change list at http://www.santyesprogramadorynografista.net/archives/xNormal_changes.txt and the downloads at http://www.santyesprogramadorynografista.net/projects.aspx
I'm preparing some tutorial videos with voice( fear my spanglish! ) commenting all, but unfortunally the CamStudio application produces too much desyncronization between voice and video so I'm buying a video capture card to make this.
somethings probably wrong since if i untick "closest hit if ray fails" it renders only grey..
awesome proggie otherwise, keep up the good work
1) Align your high and low models
2) Define good ray uniform distances ( use a "tape" in 3dsmax to measure a good distance ) or use the "cages" inside the viewer
3) In the final preview window see the number of rays failed. If are too many then something is going bad hehe
4) Load and examinate the acid and parallax wall examples. See the cages and how are put the ray distances and other settings.
5) Take a look to the user PDF help, specially the "low poly model" chapter.
Hope this helps
I love this new ambient cubemapped lighting ... it really helps make stuff look better in the viewer
I just thought ... maybe a little button somewhere (or a keyboard shortcut maybe) to "Hide UI" in the 3d viewer would be nice, because in windowed mode a lot of the text and stuff covers the screen where the model is.
Thanks again! Great work!
[ QUOTE ]
I just thought ... maybe a little button somewhere (or a keyboard shortcut maybe) to "Hide UI" in the 3d viewer would be nice, because in windowed mode a lot of the text and stuff covers the screen where the model is
[/ QUOTE ]
MoP, Try >> F1 << See the bottom-right text inside the 3D viewer ( yes must be there tons of confusing text if you didn't see it really hahahaha )
And hope you don't mind I destroyed your model adding it that diffuse probe in the example mwaaaa!
I went looking through the help file too instead of just looking at the actual screen ... silly me!
tnxs for the quick response man!
However i still cant get the cages to work properly. If i uncheck the closest hit if ray fails it renders gray. Its weird cus ive positioned my plane (im rendering down a texture) on all possible sides with its normal pointing to all different directions I also increased the cages distance for both front and back etc etc.. Not really sure whats up.
Another problem im having is that i dont get a Heightmap rendered out. I see it in the final result but its not in the alphachannel of the texture. Can these two probs be related?
Are you using 3DS files? There is a small bug with the 3DS files atm related to local transformation matrix that will be solved in a few.
thx
"Can't call the UI lua file init() function: \Xnormal\xN_ui\ui.lua:837: attempt to call global 'nx_get_diffuseGI_intensity' (a nil value)"
That doesn't make sense to me, since that LUA file does in fact, contain the information about the GI rendering.
***EDIT***
Uninstalling and reinstalling the app solved the problem. Odd!
The problem is that you are not setting well the ray distances. You put 2.50(front) and 0.5(back) in the settings file I received. If you open your file with, for example, 3DSMAX you will see why:
Notice the tape I used to measure the distance marks 125... If you specify ray distance = 2.50 ray won't hit the highpoly mesh never. You have to specify like 125/2=62.5
I divide the distance by two because the tape measures total distance and xNormal uses sepparate front ray/back ray distances. For your example then 62.5 for the front and 0.0 for the back will be ok(0.0 because you set the lowpoly normals pointing to bottom, where is the highpoly model so no need to define ray back distance really)
If you check the "Closest Hit if ray fails" option then the distances are ignored and will get the closest ray hit, which explains why if you check this option all is good. If you uncheck it then you need to specify good ray distances like indicated.
After making that, these are the result I got ( unchecked the closest ray option and setup cages manually... notice 0 rays failed and and appears to be ok )
See the max height detected is like 59... You can use this value too to measure the ray distances. Just put an arbitrary value as ray distance value and check the closest hit if ray fails options.. Then use the preview "Max height" value the next time.
Notice you must choose an output format with alpha channel if you want to save the heightmap. If you choose a format without alpha channel ( like is the JPG ) you won't get any height/displacement map saved. Also, CAUTION with old photoshop version editing TGA files because it had a nasty bug with the alpha channel... See this patch
Photoshop TGA lpha patch
Photoshop 7.0.1 Patch
Hope this helps.
ps: The version 3.7.0 is almost finished with soft dynamic shadows, command-line automatic renderer(yes to integrate it in your 3d engime map compiler with no user interaction), ase loader, heavy documentation improvements, optimizations in the viewer, video tutorials and much more!!! Also I'm waiting Microsoft to release the public Windows Vista Beta 2 to compile xNormal for x64 and avoid the 3Gb memory limit!
just checked out Xnormal and i gotta say i'm pretty impressed.
a couple of things that I would like to see ( they may already be implemented but I havent had chance to read all the help yet) are
1. the option to turn off all individual maps. not just the parralax map.
2. the option to change the map files without having to exit the viewer.
3. support for more lights.
Thats all I've noticed so far.
This looks to be a really cool app and it's lightning fast. wicked.!
cheers.
the tga bug had totally slipped my mind!
Whenever I add a fine detail/bump-map, the intensity on my normal-map is decreasing very stong. I don't know if this is a bug or sth or maybe I did sth. wrong. But I tried a bit around with it, but didn'z came to a solution. (In the bomp map, the background-color is black, and only where the bumps are are some greyscale-details.)
Does anyone know a solution for this ? because the polybump normalmapper of crytek does the fine-detail-bumps much better
edit: here are some pix for explayning, what my "problem" is
with bumpmap:
without:
the bump-map:
1) Increase/decrease the "scale factor" of the detail. More scale means the normal calculated from the heightmap will be unnormalized, allowing you to set more "weight" o the detail normal than the generated normalmap.
2) Increase/decrease the "blend factor" of the detail. A blend factor of one means the full detail will be added. 0.5 means half detail will be blended with the normalmap. 0.0 means no detail will be blended to the normalmap.
If after touching this you don't get the desired results:
1) Notice the detail heightmap MUST BE signed. A height of zero means emboss. 127 means flat. 128+ means elevation.
2) Caution with the type of file you use for the detail. Try to use a lossless one like a TIF. If you use HDR formats like OpenEXR, caution with the alpha premultiply and exposition.
3) Sure your detail heightmap is NORMALIZED. Min color must be 0 and max 255 if you are using 8bpp. If you use non-normalized color then is very possible that you won't notice too much detail. Try to use "auto-levels" in photoshop to achieve this.
Looking your bump map, gamePat, I think the problrm is that you are using low contrast heightmap(is too much gray, you need to level up the contrast) and that why you are getting so poor elevation. Try to use max height 255 and min 0 and then touch the "scale factor"/"blend factor" options until is ok.
How does FarCry this? I'm open to suggestions!