Davaris Posted September 5, 2010 Share Posted September 5, 2010 Hi, I'm having a little trouble understanding what is going on here. As you can see, when I have a light in the scene, the object appears black. http://img243.imageshack.us/img243/4549/cactusblack1.png When I delete the light, its texture becomes visible. http://img525.imageshack.us/img525/1593/blackcactus2.png The shadow you see is a light map, so there is no light source in the second image. This is its mat file. *********************************************************************** Material Generated by ADN 1.1 R3 SetShaderFloat(GetMaterialShader(mymaterial),"alphatest",0.50) *********************************************************************** texture0="abstract::cactus4_color.dds" clamp0=0,0,0 texture1="abstract::lma_cactus12.dds" clamp1=0,0,0 color=1.00000000,1.00000000,1.00000000,1.00000000 blend=0 depthmask=1 depthtest=1 alphatest=1 overlay=0 zsort=0 cullface=0 castshadows=1 specular=1.00000000 bumpscale=1.00000000 gloss=0.500000000 shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular_alphatest.frag" shadowshader="Abstract::mesh_shadow.vert","" Can anyone tell me what I should be looking at? Do I have the wrong combination of shaders? Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Joh Posted September 6, 2010 Share Posted September 6, 2010 Do you have bones on it? Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Davaris Posted September 6, 2010 Author Share Posted September 6, 2010 No, its just a mesh. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Joh Posted September 6, 2010 Share Posted September 6, 2010 Could you post your normal map to dl? Maybe something wrong on it? You could also try to test it without normal map (changing the shader too). Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Davaris Posted September 6, 2010 Author Share Posted September 6, 2010 Could you post your normal map to dl? Maybe something wrong on it? You could also try to test it without normal map (changing the shader too). I can't post it because it is commercial. However you have given me a couple of ideas to try. I'll post any progress I make soon. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 Okay I learned a couple of things about which frag and vert files to use, which I'll post in the pureLIGHT forum soon. However the problem with the lights remains. I did learn this though: Lights that work: Spot, Ambient Ambient has no effect. Lights that turn it black: Point, Directional This only affects the cactus. I have a plane and a box in the scene which work fine. EDIT: Could you post your normal map to dl? Maybe something wrong on it? You could also try to test it without normal map (changing the shader too). One thing I just remembered, I didn't have the normal map as active and I was still getting the black parts on the cactus. It had the same shaders as the box and the plane. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 This is what the point light does when part of it intersects the cactus. As you can see it is half black half texture. http://img827.imageshack.us/img827/6220/spotweirdness.png Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Joh Posted September 7, 2010 Share Posted September 7, 2010 Did you try to remove the normal map? Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 Did you try to remove the normal map? No normal, no gi, it works with all lights: shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_alphatest.frag" shadowshader="Abstract::mesh_shadow.vert","" No normal, but with gi, it works with all lights: shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_gi_alphatest.frag" shadowshader="Abstract::mesh_shadow.vert","" Diffuse bumpmap, it goes black! shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_alphatest.frag" shadowshader="Abstract::mesh_shadow.vert","" I could have sworn it was black without the normal map before! I just opened up the .dds file for the normal map and it says, (A8, R8, G8, B8 Mip 1 of 10) I have two other kinds for the normal map, tga and png and they look the same as the dds. I used the tga files and pureLIGHT did the conversion to dds. I have a file ending in H which I assume means height map, it is black and white. The normal map is shiny blue and pink. I see Lumooja says in another thread that: Black means the textures don't have mipmaps. I don't know what to do about this. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Joh Posted September 7, 2010 Share Posted September 7, 2010 Mmm, i saw this type of error when the map have no (or bad) mipmap. Don't you have another way to convert it? Gimp is free maybe you could give it a try? I don't have pureLight so i can't check.. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
macklebee Posted September 7, 2010 Share Posted September 7, 2010 In one of the old SDK's there's a tool that Josh made called TextureTool.exe, and it works just fine for making mipmaps. Also the current Tools folder has MakeDDS.exe which also has an option button that will allow you to save mipmaps. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Joh Posted September 7, 2010 Share Posted September 7, 2010 EDITED: Removed comment.. Don't mind i was drunk Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 In one of the old SDK's there's a tool that Josh made called TextureTool.exe, and it works just fine for making mipmaps. Also the current Tools folder has MakeDDS.exe which also has an option button that will allow you to save mipmaps. Mmm, i saw this type of error when the map have no (or bad) mipmap. Don't you have another way to convert it? Gimp is free maybe you could give it a try?I don't have pureLight so i can't check.. Okay thanks for your help guys. I'll give it a try and report back. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 Okay I just tried MakeDDS.exe to convert cactus1_N.png and cactus1_N.tga to cactus1_N.dds and no setting I tried made a difference. I tried ticking 'save mipmaps' and it had no effect. I tried ticking every other box and no effect either. This is a shrunk down version of the normal map. Is this what they are supposed to look like? http://img337.imageshack.us/img337/9328/25728215.png Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Joh Posted September 7, 2010 Share Posted September 7, 2010 Well it's seem right.. Could you try to invert the Y value of the normal map, maybe it's simply reversed.. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Davaris Posted September 7, 2010 Author Share Posted September 7, 2010 Well it's seem right.. Could you try to invert the Y value of the normal map, maybe it's simply reversed.. Thats a good idea. I'll download this plugin for Gimp and see if what I can do with it. http://code.google.com/p/gimp-normalmap/ Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Davaris Posted September 8, 2010 Author Share Posted September 8, 2010 Well it's seem right.. Could you try to invert the Y value of the normal map, maybe it's simply reversed.. Turns out there was nothing wrong with the normal map at all. I'm not sure if it was my experimentation with different combinations of .frag and .vert files, because while some look like they should be compatible, they aren't. For some reason mesh_diffuse_bumpmap.vert does not work. Anyway it works now and I've learned quite a bit. Here it is: http://img62.imageshack.us/img62/8853/0cactus.png Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.