Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Andrej on August 20, 2007, 03:18:48 AM

Title: transparency mapping
Post by: Andrej on August 20, 2007, 03:18:48 AM
Hi, I was wondering if Wintermute supports transparency mapping on 3d characters? The documentation says it supports transparency but I'm not sure how this is handled by the exporter...maps vs. materials I mean.

(If it does support transparency maps I have a bunch of follow up questions ;D)
Title: Re: transparency mapping
Post by: metamorphium on August 20, 2007, 08:02:35 AM
WME doesn't support "materials". Only basic textures so all effects like normal mapping etc. should be baked to the texture. But this texture can be stored as a png file with alpha channel and that way you can have transparency implemented.
Title: Re: transparency mapping
Post by: Andrej on August 20, 2007, 04:42:23 PM
Thanks for answering quickly...but does this mean that the texture will reveal its own geometry through the transparency?

Example: If a box has a transparency in its PNG texture file and the front of the box is transparent, will this then just show the inside of the box or the background?  And if it shows the inside of the box is there anyway to override it and show the background instead? or perhaps show an entirely different image?

Title: Re: transparency mapping
Post by: Mnemonic on August 20, 2007, 04:48:58 PM
It depends. If backface culling is enabled, you will see "through" the box. 3D actors in WME provide a property called DrawBackfaces for this purpose.
Title: Re: transparency mapping
Post by: Andrej on August 24, 2007, 05:24:10 PM
Back face culling would really come in handy, but raises more questions:

-Does it make the game run faster/slower when backface culling is enabled?
-Would stencil shadows only cast shadow for the half of the model that is showing?
(even if that was the case I could load a low poly shadow model- but does this make the game run slower?)

The reason I ask these graphical-load questions is because the models I'm using are fairly high-poly (compared to the trinity demo) most will be around 14k triangles.  So I think at most I will have 60-70k displayed at once, which isn't unusual for a modern game but I'm not sure how WME is optimized so I'm trying to keep it as light as possible.
Title: Re: transparency mapping
Post by: Amo on August 24, 2007, 05:49:37 PM
Hey Andrej,

shadow models make the game faster, of course. When your character has 14k the shadows would need another 14k too, but if you have a shadow model with lets say 1k you have an overall count of 15k not 28k.
Makes a difference, right?
The backface culling makes it also faster, as only polys were rendered which can be "seen".
Sorry, but I have no answer for the stencil shadow question.

regards

Amo
Title: Re: transparency mapping
Post by: Andrej on August 24, 2007, 07:28:25 PM
Ah, I never thought about how the stencil shadow was actually done, this makes a lot of sense-- I will certainly use it now, thank you.   As for the other stencil shadow question it's probably a non-issue.  I'm going to experiment with shadow models right now...

BTW this forum is a giant help!