Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi all. I want something to slowly appear in the game through transparency when triggered. For example, I am walking along a path and when I reach the intersection in front of me, a sign with a hint inscription slowly appears in the air. I was able to do it through visible/invisible, but this way the appearance is instantaneous and I need to gradually appear through transparency. How can I do it? |
||||
|
@tarasdreamer, you would need a shader action with alpha transparency fade I think there was such extension for DirectX on neophyte.cf, but he site is down for the moment, maybe its owner @just_in_case could help you out here directly ... I remember having also created a GLSL script for this for OpenGL users already some time ago - let me take a look into my HD ... |
||||
|
@hadoken Thanks for answer! |
||||
|
An other option might be: Set Vertex Alpha dynamically, eg. by: ccbSetMeshBufferVertexColor(node, meshbufferindex, vertexindex, color) - Sets color of a vertex whereas a 32 bit color has the alpha byte in the topmost 8 bits, from $01000000 to $FF000000. Then you can choose a blending mode that uses vertex alpha. That said, didn't try it and cannot guarantee that Niko has no AND $FFFFFF filter that would remove the alpha before applying it as vertex color. Tho the docs say this works only in windows and mac OS X, but I remember I had it working in webGL, but using copperlicht.js commands directly. Well you could switch based on ccbGetPlatform(). |
||||
|
Just for the records, I undug my EntityAlpha Function. When I just run it for webgl with CC (I guess still Version 6.0) then the JS error console says the getMesh method is not defined. Then I replace copperlicht.js in the copperlichtdata folder (about 224 kb) by an older one I got from IDK where, that's about 443 kb, then it works nicely: So this mesh was set to alpha 0.5 after clicking. using this function:
As mentioned before, this is for webgl only. So put it into a if (ccbGetPlatform()=="webgl") condition, and else try the CC internal Vertex Color commands. Something like:
|
||||
|
BTW, could somebody who has the latest CC update test the EntityAlpha function for the webgl target? I wonder whether it does again support those copperlicht calls, and if not, why it was removed. I also wonder whether I can again obtain an engine handle in the html page, for a progressbar or similar:
This is another thing that doesn't work with the 6.0 version. |
||||
|
Thank you very much @Dieter! |
||||
|
Since the update of neophyte site to github by JIC, you can download his fade shader from here, it works on webGL as well. https://vazahat.github.io/ccb_sh... |
||||
|
Thanks, but the download button is not working. However, found it in this huge repository: https://github.com/BeingNeophyte/BeingNeophyte.github.io/tree/af5c9733fb3aa4a2030fe608a47e88555d184f27/downloadables Or go to github.com and search the zipfile |
||||
|
Yup, that repo also belongs to me, but is now restricted, anyways you guys can acess the same on the Vazahat/Neophyte Repo as well. The file tree to download all the downloadables will be acessible to there as well. https://github.com/vazahat/vazah... |
||||
|
Thanks for sharing, just_in_case, that's some years of excellent work there.. |
|