So I’ve been modeling and texturing in Maya for a few weeks now for a Unity project and every once in a while when I start to deal with planes they end up transparent. Meaning you can see through the textured planes to the objects behind them. I cannot seem to find anyone else with this issue. I’ve posted the question in many Maya forums with no responses at all.
I’ll post an image of the latest conundrum I’ve run into. The mesh seems perfectly fine until I add a texture, then suddenly some of the planes are transparent when they aren’t supposed to be. I’ll even attach my UV map if you think that’s necessary, but I can assure you, that’s not the problem.
Any help is appreciated. I’ve tried all the lighting settings and can’t seem to wrap my brain around this issue.
The interior of the wagon is seen through the textured plane wrapping around it.
It looks like you have a transparency on the material which isn’t sorting correctly. What image format are you using for the textures? If you are using something like .TGA maya will connect the alpha to the transparency automatically, even if you don’t need it.
I would suggest looking in the hypershade and braking any connections to your materials transparency.
Check your normals to make sure they are facing the right direction. Are the planes double sided? If they are single sided, are they set to opposite? If opposite is ticked, you see through the front face to the inside.
Okay. Wow. Even the Maya forums weren’t this helpful. First I really appreciate all the replies.
Next, I’m using a PNG with the sections between the wheel spokes cut out as transparent. This is what’s causing the problem, I’m sure. If I break transparency connections then the sections here aren’t transparent. Obviously this is a pretty low poly model and the model won’t be seen up too close, so I didn’t want to model all of the spokes for the sake of time and memory. It’s not a big deal just modeling the spokes, but if I can figure out why this transparency issue is going on it’ll probably save me a lot of time in the future when I need to do more things like this.
EDIT: Oh yeah. I’ve tried using a tga file with a proper alpha channel. Still had the exact same problem as the png, so I just went back to a png because it’s simpler in my opinion.
I think the interior of the wagon where the polys seem darker are just darker due to the shading, because they’re all showing up as the same lambert grey material in Maya right now. The default lighting just creates really dark shadows.
As far as my planes being double sided, I don’t really know how to check that. To create the cover for the cart I just grabbed an outside edge and extruded it. I had an issue with another model where my planes were facing the wrong way so they were turning black. But that’s not happening here, so reversing faces isn’t the issue. Where do I find the opposite option? In the Attribute Editor I’m assuming, but I can’t find anywhere that says Opposite.
It might also be worth mentioning that when I remove the transparency connection and nothing is transparent anymore then I can still see the canvas texture on the interior of the model.
The double sided option is under the Attribute Editor → Render Stats for the geoShape. But now that I look at it again, it might actually be a depth sorting issue with the transparency for the viewport. If you’re using Viewport 2.0, you can try clicking the settings box and switching the transparency algorithm. If that doesn’t work, you may have to make your wheels separate geometry from the wagon body.
I tried making them separate geometry. That solved the issue in Maya, no problem. But then when I imported the fbx into Unity it seemed to wrap them all into one material again and… tada! Transparency issue was back.
EDIT: This is all irrelevant now. I figured out what that meant.
I don’t know how to access the viewport 2.0 or what that even is, to be honest. So maybe I should just go back to youtube and learn more before trying to tackle this again. My frustration levels are through the roof with this software right now… It sucks learning through mismatched hodge podge tutorials on Youtube.
You can easily solve the problem by using an opaque material for everything that doesn’t need to be transparent. At the moment you have several transparent meshes, or maybe just one. However, Unity won’t sort them for you. It draws them back to front, one mesh after another.
It is clearly visible in your screenshot that first the top part is drawn and over it the wagon, even if that is certainly not what you are looking for. But those transparent sorting issues disappear as soon as you pick an opaque material.
I’m not understanding what you mean. I want the space between the wagon spokes (which is just a flat group of tris) to be transparent, so I need that part transparent and the rest opaque.
I split everything into 3 separate meshes. A mesh for the wagon and two separate meshes for the wheels. I then added 3 separate lambert textures onto them. The cart had no transparency at all, and the wheels each had cutout opacity sections. I then exported the entire selection as an fbx into Unity. Unity wrapped them all into a single material again and the transparency issue was back. I’ve only been using Maya for about a week, but I’ve already modeled probably 30 fully textured models and only had this problem one other time, but that model didn’t need any opacity cut out, so I just broke connection for the transparency and it fixed it.
UPDATE: This is definitely a layer sorting issue. I nearly got it fixed using the depth peeling option, but it’s still showing through a bit. Even though this renders just fine, exporting into Unity keeps the transparency issue, which is disasterous for our game.
Does anyone know why my Polygon Transparency Sorting option in my viewport’s shading menu would be greyed out? I keep reading that that will fix the problem, but I can’t find how to turn it on.
As only the central part of the wheels needs to be transparent (or better needs a cutout shader), you clearly should try to find a way to handle everything else as opaque. As I am not a Maya user, I don’t know what it takes that those materials are not joined in Unity.
Keep in mind that transparency is always some kind of a special case in realtime applications. In Unity 4.x they ignore shadows, in Unity 5, it kind of works, but opaque is still preferable. Only using transparent objects will lead to a huge overdraw rate, meaning each pixel on the screen is going to be drawn several times which leads to an unnecessary slowdown.
So what you’re saying is that it’d be faster to just remodel the cart’s wheels with spokes than to have part of the UV transparent? I took this route because I figured it’d be easier.
Am I wrong to assume that games use opacity maps all the time to create assets like trees, bushes, plants, windows, etc? I mean… you’d be hard pressed to find a game of any caliber who didn’t use a transparent texture to create these assets… How else would you go about doing it? And I’ve never seen any games with the issue I’m having.
You may even consider to make it completely opaque and to model the spikes, as they won’t add a huge amount of vertices.
Of course games are using transparent materials, but they have to be used wisely. Usually everything that is opaque doesn’t get a transparent material. And keep in mind that there is not only opaque and transparent shaders, but also cutout shaders. In your case you could use a cutout shader and eliminate all issues immediately, because they they take the depth of the scene into account, which doesn’t happen when you are using transparent materials.
To sum it up, opaque objects should always use opaque shaders. If that is not possible, consider to use a cutout shader. If that is not possible, use a transparent one.
To come back to your case, you could only use opaque shaders. If you don’t want to model, you can use a cutout shader just for the spikes. That means the spikes should have their own texture as well.
There is no need to use a transparent material in your case at all. You could create your model with a transparent shader, but this would require quite some additional work. You would need to split it up into several meshes, such that always the correct part is drawn on top.
This problem can be due to reversed normals or z buffer depth. i.e the objects that has transparent textures will have sorting issues.
Try using this AlphaVertexLitZ shader in my case i use it very frequently.
Here is the link : http://wiki.unity3d.com/index.php?title=AlphaVertexLitZ.
Just apply this shader and your problem is solved if that is because depth(z) buffer…
The above shader is not only used for showing an object as semi transparent but also used for proper Z buffer sorting.
Because by default unity shaders doesn’t calculate or sort Z depth for transparent objects.
That shader doesn’t magically solve all the cases. You can e.g. have that shader on a character and place the character into a cube that comes with Unity to which you also apply a material with that shader. If you move the character around in the box, you will see that you get wrong results.
Hi Everbrave, I faced the same issue and after a lot of trial and error, the issue was fixed when I changed the renderer from ‘Viewpoint 2.0’ to ‘Legacy Default Viewport’.
Everyone seems to be overlooking the most simple solution to this, use 2 materials that both use the same texture.
In one set the texture in both the Colour (diffuse) and the Transparency, and in the other set only the Colour.
If your scene in unity doesn’t have lots going on, then the extra material will save you time, however if you’ve a really intense scene, having 1 extra material might seem wasteful.
Everbrave Girish006 sharonmonisharaj
Note: “When the depth buffer” Z “does not reverse, because it is duplicated, then delete a face, and apply the” Normals / Reverse "I also had the same problem Good luck with this simple study