Transparency rendering issues (Custom Nif problem)

Post » Sat May 28, 2011 7:02 pm

The past few days I've been working on a model in blender, I've managed to export it without any issues, but the problem arises when I interact with the object ingame.

The model is a glass vial containing a crystal with a cork stopper. It consists of 3 meshes: One for the cork, one for the crystal, and one for the vial. The vial and crystal both have translucency, and the problem is stemming from that. Depending on what angle you view it at (or what light sources and other geometry are around for that matter) the inner mesh (Crystal) will disappear or flicker. even though the crystal is put in the frame buffer before the vial, the glass vial will render over it entirely. Noclipping into the vial shows it is still there and renders fine on its own. If I split the NiAlphaProprities in nifskope and set the crystal's alpha flags to 0 this problems disappears completely.

The Nif and textures in question are uploaded http://www.mediafire.com/file/bmsuyb888s8cgkc/ProblemNif.7z.

Thanks!
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Sat May 28, 2011 7:28 pm

Check out http://www.gamesas.com/index.php?/topic/1073399-transparency-vs-transparency-vanishing-bug/page__p__15606942__fromsearch__1&#entry15606942 thread. Mostly the OP and the second last post by Ghogiel.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Sat May 28, 2011 4:57 pm

Hi Marche

Im not trying to contradict Phitt in any way, do check out that link and info, as that may be your problem.

I have a small display case and inside that a crystal ball like what you have. I found it comes down to your images, set your images to DTX5, with a good alpha channel, your alpha channel on the glass bottle is too weak, it looks grey, try getting more variation to a stronger alpha channel

Here are mine that i used that work well, but you have a massive bottle and will need to wrap it a bit different

http://hotfile.com/dl/69311784/594463e/Effects.rar.html

The set up i have works spot on. BTW the other thing i did on the crystal ball was stick a havok mesh under it to support it, but no visible mesh
User avatar
T. tacks Rims
 
Posts: 3447
Joined: Wed Oct 10, 2007 10:35 am

Post » Sat May 28, 2011 8:19 pm

Thanks for that. Useful stuff, but my inner translucent mesh *is* a lower index than the outer bottle.

http://i945.photobucket.com/albums/ad300/S33PlusPlus/nifskope_SS1.jpg is the exported nif.

Tigerpaws: It's only massive for debugging :P. I'll see if the compression type makes a difference. Maybe exporting DDS's from The Gimp would fix it if it's purely a texture problem. I'm currently using Nvidia's DDS Utils because they're scriptable.
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Sat May 28, 2011 5:34 am

Another problem that you are having is due to your naming convention the game is currently not finding your normal maps !!

the "_" is a special character that denotes a special thing to the game engine and the game will truncate at that point and ignore all but special characters afterwards (N for normal map g for glow map etc.) -- so a texture named bottle_sheet.dds would need a normal map named bottle_n.dds (not bottle_sheet_n.dds like you currently have !) so right now the game is not finding your normal maps ! -- you need to either rename all of your textures to remove the _ and correct the Nif paths or rename the normal maps as mentioned above so the game will use them ! (same goes for your cork and sugar textures !)
User avatar
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Sat May 28, 2011 8:32 pm

Another problem that you are having is due to your naming convention the game is currently not finding your normal maps !!

the "_" is a special character that denotes a special thing to the game engine and the game will truncate at that point and ignore all but special characters afterwards (N for normal map g for glow map etc.) -- so a texture named bottle_sheet.dds would need a normal map named bottle_n.dds (not bottle_sheet_n.dds like you currently have !) so right now the game is not finding your normal maps ! -- you need to either rename all of your textures to remove the _ and correct the Nif paths or rename the normal maps as mentioned above so the game will use them ! (same goes for your cork and sugar textures !)


Really? That explains quite a bit.
I'll have to rename them then. That naming convention followed my from Valve's engine, I figured it wouldn't make a difference and would keep me from reusing those for things other than UV base textures.

And to Tigerpaws: DXT5 made no difference.
User avatar
Alyce Argabright
 
Posts: 3403
Joined: Mon Aug 20, 2007 8:11 pm

Post » Sat May 28, 2011 4:32 pm

Really? That explains quite a bit.
I'll have to rename them then. That naming convention followed my from Valve's engine, I figured it wouldn't make a difference and would keep me from reusing those for things other than UV base textures.

And to Tigerpaws: DXT5 made no difference.


Yeah it can be useful at times but can cause problems if used incorrectly ( ie. if you are making several colored versions of an item and want to use only 1 normal or glow map for all of them you can name like Mytexture_colorBlue, Mytexture_colorGreen, Mytexture_colorBlack, etc and then just create one normal map named Mytexture_n.dds for them all to use (note: I use colorBlue etc. to avoid accidental use of a G or N directly after the _ which would then be used as a glow or normal map by the game !!))
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Sat May 28, 2011 8:41 am

Is the "inner" copy of the glass bottle that is sharing the same exact space as the regular mesh intentional? well I deleted that, because that is what is probably causing the main sorting issue you are encountering. If you do want to do something like that, iirc what beth did is make a clone of the mesh, use a push modifier to shrink it a bit, then invert the faces. then attach it up starting from the inner most mesh to outside.

UVs are messy. this will affect vertex count and numbering. and thus affect the order of vertex draws on screen. I fixed those.

I baked a normal for the glass, and set up the face smoothing how I would have done it. this just removes some shading errors and makes it look smoother. I also added a label mesh, but you can delete that if you don't want it, It's only there because I was wasting space on the texture sheet for the bottle, so I just slammed that in. I included png versions of the diffuse and alpha map if you wan to write stuff on the label, or make the label smaller/shaping it by using the alpha map. I also tweaked the cork UVs to remove some excess stretching.

As mentioned, sort out the use of underscores in the texture file names.

I don't have Ob installed, but I think this would probably work:
http://rapidshare.com/files/419034286/Bottle.rar

If not at least the asset is improved visually. :D
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Sat May 28, 2011 9:01 pm

What? There was a copy of the bottle mesh in there?
Huh. I had no idea.
If I gave you the .blend, would you mind pointing it out?

Unfortunately your nif didn't do the trick. Since the normal maps work now I think I can get by without transparency on the crystal mesh, but it still would be nice to know why it isn't working for future reference.
User avatar
Juan Suarez
 
Posts: 3395
Joined: Sun Nov 25, 2007 4:09 am

Post » Sat May 28, 2011 2:32 pm

yeah there is duplicates there, check the nitristripdata and look at the num of vertices between your original nif and the one I tried to fix. yours is more than double. and it has a load a bunch of extra tris too. I was figuring that was freaking out the sorting. I still suggest you use the bottle mesh I tweaked and the maps though, even if it didn't sure the alpha sorting issue.

Can't really think of anything else

I don't have blender installed atm. so that's not going to be helpful.
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Sat May 28, 2011 8:54 pm

Thanks, I think it was an exporter artifact though, so the .blend wouldn't show much anyway.

Sorry about the UV mapping mess, I reused the bottle from my first UV mapped meshes, original UVs included (Well, I did make a few quick changes because of overlapping and modifying the mesh itself).
Blender's smart UV projections aren't exactly roomy, so I ended up letting faces overlap since the glass was a uniform color with adjusted opacity anyway.
I've been playing with seams, and I'll switch to that as soon as I get the hang of it.
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm


Return to IV - Oblivion