Jump to content

Texture turns partially black in editor


AggrorJorn
 Share

Recommended Posts

I've seen this problem before on the forum but I can't find it back. I have a boiler which has a texture apllied to it. (See image). The 'rings' on the boiler turn partially black. If I rotate around the boiler, the black color folows.

Also a part of the box on front of the boiler has this problem. I tried exporting again with another texture, but the results are the same.

 

The texture I use is 512-512, DXT5 with mipmapping. I use the following .mat.

texture0="abstract::boiler large copper.dds"
texture1="abstract::boiler large copper_N.dds"
blend=0
depthmask=1
zsort=1
overlay=1
cullface=1
shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular.frag"
shadowshader="abstract::mesh_shadow.vert"

Link to comment
Share on other sites

Try it with just a diffuse map, no normal map. If the problem goes away then it might be that the Y component of the normal map is inverted. If the problem doesn't happen when only using a diffuse then you can try adding:

 

normal.y *= -1.0;

 

right after:

 

normal = bumpcolor.xyz * 2.0 - 1.0;

 

in mesh.frag and see if that fixes it. If so, then you can leave it like that if all your normal maps are generated the same way, or use -Y in your normal mapping program and leave the shader the way it is.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

Sounds like the normal problems I had with models from dexsoft.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Try it with just a diffuse map, no normal map. If the problem goes away then it might be that the Y component of the normal map is inverted. If the problem doesn't happen when only using a diffuse then you can try adding:

normal.y *= -1.0;

right after:

normal = bumpcolor.xyz * 2.0 - 1.0;

in mesh.frag and see if that fixes it. If so, then you can leave it like that if all your normal maps are generated the same way, or use -Y in your normal mapping program and leave the shader the way it is.

Thanks for the help but unfortunatly removing the bump causes the same problems. Removing every texture and the mat shows a correct shape of the model. Problem is somewhere in the texture, matt or shader.

 

Sounds like the normal problems I had with models from dexsoft.

What did you do to solve this issue, besides remodeling and texturing.

 

I'm trying the same textures and mat files on different object, but that all seems to work. I think I'll start over with the model. Maybe there is just something wrong in my model.

Link to comment
Share on other sites

Check the faces that are appearing black. If your modeling program supports it, have it display the normals or turn off two sided rendering. Then you can see if those faces are facing the wrong way and flip the normals on those if needed.

 

Actually looking closer at that picture, it seems that it's definitely just that those faces just need to be flipped.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

What did you do to solve this issue, besides remodeling and texturing.

 

I did a quick fix in UU3D, selected all, made double sided and created a new group, selected all again and then flipped normals, then selected the original group and deleted the mesh .. probably the totally wrong way to do things but I ended up with a fixed model with the same poly count :huh:

 

or you can do what Nio said :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

aggror, does your modeling program allow you to see which way the normals are facing? If so, i would try that... because looking at the picture above, I would say thats the issue... you can see the outline of the main model through the areas that have the texture problem... which kinda points to inverted normals from what I have seen...

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

What did you do to solve this issue, besides remodeling and texturing.

ooops wrong quotes :huh:

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I have the same issue. Strange enough for me it only appears on nVidia graphic cards and not on ATI cards.

 

It looks like it is related to the UV coordinates. Most time i got it solved with using the "Relax UV"

option in Ultimate Unwrap. The model looks ok in Unwrap 3d and in some other engines i tried. Only

with Leadwerks and nVidia card i get this black areas.

 

In my case (i mainly use Delgine 3d as Modeller) everything was Leadwerks campatible by switching from

the Collada to the .X Format.

Link to comment
Share on other sites

I have the same issue. Strange enough for me it only appears on nVidia graphic cards and not on ATI cards.

 

It looks like it is related to the UV coordinates. Most time i got it solved with using the "Relax UV"

option in Ultimate Unwrap. The model looks ok in Unwrap 3d and in some other engines i tried. Only

with Leadwerks and nVidia card i get this black areas.

 

In my case (i mainly use Delgine 3d as Modeller) everything was Leadwerks campatible by switching from

the Collada to the .X Format.

can you post a screenshot? I had some troubles with black textures as well. I noticed that a bumpmap I was using didn't have a regular size like 512 x 512 or 256 x 256.

Link to comment
Share on other sites

this is one of the black areas in my model. It happens regardless from the texture size and with/and without the use of bumpmaps. But the same model with ATI cards looks ok.

 

If i use 2D Tools - Relax UV's most of this areas are corrected (but in same rare cases it still appears).

 

As said fortunatelly in my case switching to .X export in Delgine created UV coordinates which do not show

the problem.

 

But the really tricky thing is it only appears when i view the leadwerks model with nVidia cards. Everything looks ok in Unwrap 3d and i tried the model in 3d gamestudio, torque and the C4 engine and none of this engines shows this

behaviour. The model always looks correct.

post-126-12667622164403_thumb.jpg

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...