Jump to content

Mesh is deistorted after applying materials


Ark Vuckovic
 Share

You are about to reply to a thread that has been inactive for 4066 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

I am having a weird problem which I can't figure out. I am attaching two pictures of the same building one before the materials were applied and one after. Looks like that the materials made my normals to flip. I tried to flip direction but it didn't heped. This affected some of the faces but not all of them.

Can anyone tell me what did I do wrong? I am using Blender 2.66a

Picture before the materials applied..

Snapshot_002.jpg

Picture after materials applied.

Snapshot_001.jpg

Link to comment
Share on other sites

Edit mode -> hit A to select all -> look on left side bar -> "recalculate normals" -> object mode -> delete lamps-> alt+Z to view in textured mode -> check if normals are ok

Another way is on the N menu (right side bar) in edit more is to look at the "normals" button and check it to see which direction the normals are oriented

Link to comment
Share on other sites

I can't think of a way how materials would flip any normals. By the looks of your picture there aren't any flipped normals anyway, just invisible faces. My best guess is you assigned a texture with an alpha channel to your object, the invisible parts covering some walls. Try a solid texture to see if this is true.

Did you unwrap your UV's and make a dedicated texture for the object?

btw, the first picture has materials applied just as well as the second picture. It's the default 32x32 white texture, assigned to any freshly uploaded mesh.

Link to comment
Share on other sites

had that one time a few months ago, turned out the texture I applied was interpreted by the SL servers to be transparent, but only when applied to mesh (I applied the same texture to a regular prim and it worked just as expected).

I loaded the texture in another program from where I'd created it, saved it there, reuploaded, and voila, everything was fine.

Changing the texture graphics format from png24 to png8 also worked when I tried that, but of course you end up with 256 colours only, which might be a drawback.

Link to comment
Share on other sites

Are you by any chance using the materials project viewer? It has some bug(s) that make one textures completely transparent when you set another one to partial transparency. I have managed to recover the textures in these cases, but I don't have a reproducible way of doing so. (If you're using the regular viewer, just ignore this.)

Link to comment
Share on other sites

Well, I tried all those manipulations with normals, but it had no effect. I missed to mention, that I use different material for each element in the building since i trying to make every room in different color. Would thaat be a problem? It displays the whole thing correctly in Blender. Only when i load it to test grid, it gets corrupted.

Link to comment
Share on other sites

how many materials do you assign ?

I believe that when you assign more than 8 materials to one mesh object then that only faces for the first 8 materials get rendered, all other faces get silently dropped... that could be what happens. although i wonder why the faces show up when no marerial is assigned...

[edit] well, using more than 8 materials indeed removes all faces assigned to material 9 and more... So since you can see the walls before you assign the textures, you seem to have not exceeded the maximum material count...

Link to comment
Share on other sites

Well, I tried all those manipulations with normals, but it had no effect. I missed to mention, that I use different material for each element in the building since i trying to make every room in different color. Would thaat be a problem? It displays the whole thing correctly in Blender. Only when i load it to test grid, it gets corrupted.

 

So did you try to change the textures ?

Save them once as JPG ( because this can not save any transparency - opposed to TGA or PNG) and load them to SL and apply them onto your building. And see if these areas are now shown / opaque.

I am thinking it's only the texture itself having a wrong Alpha info somewhere. Applying materials in Blender does not affect or flip the normals. Plus as you already figured yourself by recalculating them several times with no effect - that it didnt help. Obviously because they have been in the right directtion all the time.

Also in addition we have to mention that with the upcoming SSS (server side baking) there have been problems of materials / texture faces not being shown upon rightclicking them, up to whole objects only showing up when right clicking them. So make sure its not just this bug.

Do not export with more then max 8 materials. This is the maximum SL will handle correctly. Check how many you had and remove everything above this number.

If none of the above  helps try to delete one of these faces in blender and create a fresh face, move it onto its correct spot on the UV map, and export it again  to see if anything changes. Then you know for sure if there was an issue with the model itself.

Link to comment
Share on other sites

Thank you all for your help. You are great. Gaia you were absolutely correct. I reduced the number of textures to eight. This made the big difference. Now everything looks normal. I wish to have more faces though:(. But I think the  only way to overcome that problem is to separate the structure. I may make the foundation as a single prim.

Again, everyone was great.

Thank you all.

Link to comment
Share on other sites

Heya Ark.
8 material faces per Object is already a lot. especially since its [8 x (1024x1024 px)] that's actually a LOT of texture space.

Keep in mind not every Wall needs an own texture. you can easily fit up to 4-6 walls onto one image. Its all a matter of how good you place the UVs and how much texture space you give each element. In games you can texture with 8x 1024*1024 almost a whole landscape scene when being done clever.

Remember that certain Areas often can be repeated and just use the exact same texture area, and not every wall needs to be full resolution and an own texture. way not. If you make a house with lets say 24 full resolution textures thats a lot to load for the player / user as well and thus becoming heavy on the machine. Keep it optimized - And you'll see that 8 faces is a really a lot to work with =)

Link to comment
Share on other sites

@Code

Oh yes repeating myself, responding to the post in general :)

@OP

If it was the number of materials causing your problem, the first picture you posted wouldn't be possible, at all. Glad you got it to work, but that certainly was not the cause of faces going invisible after applying a texture. If there are more than eight materials, the uploader will ignore the geometry.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4066 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...