Transparent Glass and DIF
by Andrea Fraboni · in Constructor · 04/26/2007 (12:23 pm) · 30 replies
Why not add Glass and window in constructor then in the engine code too ???
Thanks for attention
^_^
Thanks for attention
^_^
About the author
#3
04/27/2007 (7:36 pm)
Your welcome, let me know if you need any help with this.
#4
04/28/2007 (7:13 pm)
I tried the patch out and I noticed that when looking through the transparent texture (in StarterFPS in TGE 1.5.1) I had trouble seeing other objects with transparent textures. For example the leaves on the trees didn't show and another 'dif' building with a transparent texture kept popping in and out of view. Anyone else experiencing this? Is there a fix?
#5
04/28/2007 (8:24 pm)
No I have not, make sure you patch everything right.
#6
I explain it by images :
with png texture with alpha channel :


I see the water this is a good notice !!!
If I fire on window :
I see that it's a solid window !!!
But I prefer that we can see the presence of window with a light color !!!
You have a solution ???
In the code I see this row :
I must remove it ???
Thanks to all for possible solutions !
Bye
04/28/2007 (11:25 pm)
I have apply the patch and the window is transparent by using PNG texture with alpha channel but it's very transparent !!! O_^I explain it by images :
with png texture with alpha channel :


I see the water this is a good notice !!!
If I fire on window :
I see that it's a solid window !!!
But I prefer that we can see the presence of window with a light color !!!
You have a solution ???
In the code I see this row :
LightManager::sgSetupExposureRendering();
I must remove it ???
Thanks to all for possible solutions !
Bye
#7
why use { ....} ... I don't see in this code the coditions to use it ???
Is this an error ???
04/29/2007 (11:30 am)
But there is a strange code in Patch :if (rSurface.texGenIndex != currentTexGen)
{
currentTexGen = rSurface.texGenIndex;
- memcpy(texGen0, &mTexGenEQs[rSurface.texGenIndex], sizeof(F32)*8);
+//V23
+// memcpy(texGen0, &mTexGenEQs[rSurface.texGenIndex], sizeof(F32)*8);
+ {
+ F32 * ptr1 = (F32*)texGen0;
+ F32 * ptr2 = (F32*)&mTexGenEQs[rSurface.texGenIndex];
+ *ptr1 = *ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ }
+ }
+// memcpy(texGen1, &mLMTexGenEQs[sgActivePolyList[i]], sizeof(F32)*8);
+ {
+ F32 * ptr1 = (F32*)texGen1;
+ F32 * ptr2 = (F32*)&mLMTexGenEQs[sgActivePolyList[i]];
+ *ptr1 = *ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+ *++ptr1 = *++ptr2;
+//V23 end
}
- memcpy(texGen1, &mLMTexGenEQs[sgActivePolyList[i]], sizeof(F32)*8);why use { ....} ... I don't see in this code the coditions to use it ???
Is this an error ???
#8
@ Fucifer: Did you patch any other files besides the 'interiorRender.cc'? Any chance you could email me your patched 'interiorRender.cc'? My email is in my profile.
Below is a screenshot of my transparency problem with the trees...
I have a wall (dif made with Constructor) with a transparent texture and the tree leaves don't show up behind it.
04/30/2007 (2:47 pm)
@ Andrea: If your alpha channel is black that means your texture will be totally transparent. If your alpha channel is white, your texture won't have any transparency. Try making your alpha channel gray. That way your window will have a bit of color. A darker shade of gray will make the window more transparent while a lighter shade will make it less. Hope this helps@ Fucifer: Did you patch any other files besides the 'interiorRender.cc'? Any chance you could email me your patched 'interiorRender.cc'? My email is in my profile.
Below is a screenshot of my transparency problem with the trees...
I have a wall (dif made with Constructor) with a transparent texture and the tree leaves don't show up behind it.
#9
I have a problem in creation of texture ... but I don't undersand the problem ...
can you send me or post here your texture for test it ???
Thanks for your attention
bye
05/01/2007 (12:30 am)
MmmI have a problem in creation of texture ... but I don't undersand the problem ...
can you send me or post here your texture for test it ???
Thanks for your attention
bye
#10
05/02/2007 (5:01 pm)
Andrea - I just sent you an email with a test 'png' image with transparency and a test 'dif' with the transparent texture applied. Check out the alpha channel. It is a dark grey. I use Photoshop CS2 for my texturing and I downloaded the 'Super PNG' plug-in that is on TDN (just do a search for 'SuperPNG'). Below is a screenshot of what the wall should look like in TGE 1.5.1.
#11
05/02/2007 (6:12 pm)
It the way I do my transparency. I only patch the 'interiorRender.cc'. I will do some testing to make sure I did not over look something.
#12
Thank you very much Kerry for your mail ! ;-)
I use your correct texture with alpha channel and I see that we can see a good glass effect :

but I have a new problem now !!!
I don't see a Water and complete Trees :


Can anyone help us ????
Thanks to all
^_^
05/02/2007 (10:34 pm)
@Kerry Lyon :Thank you very much Kerry for your mail ! ;-)
I use your correct texture with alpha channel and I see that we can see a good glass effect :

but I have a new problem now !!!
I don't see a Water and complete Trees :


Can anyone help us ????
Thanks to all
^_^
#13
I suppose that this Patch is useful ...
PathedInterior 1.4
but is for TGE 1.4
O_^
05/03/2007 (10:23 am)
MmmI suppose that this Patch is useful ...
PathedInterior 1.4
but is for TGE 1.4
O_^
#14
Fortunately, Fucifer posted that he was going to take another look at the patch.
05/03/2007 (3:42 pm)
Yeah, I mentioned the tree problem in my previous post. The leave textures (which contain an alpha channel) don't render. For some reason the 'dif' transparent textures are conflicting with other transparent textures. I'm not a programmer so I don't know how to fix that.Fortunately, Fucifer posted that he was going to take another look at the patch.
#15

05/04/2007 (3:08 pm)
I have been doing some research on this, it maybe due to sorting the transparency. I switch out my windows in constructor for dts and export from constructor. It clear up some of the problems and I did not have an fps drop in the game. I am going to do some more testing with the dif transparency code but it going take a week before I can get to it. Here some screenshots with the dts window, the water show up and trees with transparency on.
#16
Thanks for putting in the effort.
I've heard the term 'Z sorting' in relation to transparent textures and getting them to render properly.
Does that sound familiar?
05/04/2007 (7:54 pm)
Great!Thanks for putting in the effort.
I've heard the term 'Z sorting' in relation to transparent textures and getting them to render properly.
Does that sound familiar?
#17
05/04/2007 (7:58 pm)
Have anyone tried transparency DIF that have portal? Im wondering if it would work correctly if it were zoned...
#18
Then you suggest to use DTS for window integrated in DIF by constructor ? mmm good solution ....
^_^
05/04/2007 (10:15 pm)
@Fucier:Then you suggest to use DTS for window integrated in DIF by constructor ? mmm good solution ....
^_^
#19
05/05/2007 (8:17 pm)
I think it will work with portal, I read something in my research about that. I am test dts for windows right now because I want see if I can get breakable window. I am also testing dts with the dif to see if there will be any problems using them.
#20
DT
05/15/2007 (9:46 am)
Anyone have a link to a tutorial on making that Alpha channel Window glass by chance? and can't we use the normal .png or do we have to use the puperping here to make it work right?DT
Torque Owner Fucifer
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4199
Then in constructor all you need is png with alpha channel. You will not see the transparency in constructor but you will see it in Torque.