Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
PNG Image changes - snow effects

Robo
Guest
Quote
2020-05-25 14:31:52

We cant change PNG image alpha values but here's a showcase of what can be done instead:

https://www.youtube.com/watch?v=4dfCKjuiqww

You can download this at:
http://www.lasttrump.net/gamedev.html


Robo
Guest
Quote
2020-05-25 16:01:40

Just to disprove myself hours after making the video - I found out the hard way that you CAN change the ALPHA on textures - its called 'Param1' !!

Full transparency starts at 0.99 and goes down to 0.01 for full opaque. If you stick a plane in front of the players camera with the texture you want to change alpha for - you can do that now....or do it on other objects with transparent alpha as the type.

// transparancy settings

var amt = 0.5 // 0.99 full transparency to full opaque 0.01

var node = ccbGetSceneNodeFromName("image");
ccbSetSceneNodeMaterialProperty(node, 0, "Param1", amt);


Robo
Guest
Quote
2020-05-25 16:08:54

Why Niko keeps all this stuff secret is beyond me...its not even mentioned in the available options:

https://www.ambiera.com/coppercube/doc/cnt_javascriptref.html

It says" propertyName: The propertyName in a material. Can be 'Type', 'Texture1', 'Texture2', 'Lighting', 'Backfaceculling".

No mention of Param1 anywhere....


just_in_case
Moderator
Quote
2020-05-25 19:58:13

Don't know if you missed it or if i don't remember it correctly... But as per my knowledge it is clearly stated in the documents that you can actually set or change technically any attributes or properties.... You can change color, lightning, wireframe and lots of other things... Every property in irredit/irrlicht tools can be accessed and changed through javascript.

Do you know that you can also get the id number of the object via javascript instead of name of the scenenode... And then can use it within your code... Just like the name.

So there are lots of other things.... Technically you can acess all the properties of the scenenode and alter them accordingly... Some of them might not work during runtime. But can work while in the editor. For example if you planned to create a plugin for editor maybe.

But yeah you can not acces the properties of a behavior or action applied to the scenenode...

So it is not hidden it is just that it will take a lot more words and space if he has to mention all those texture parameters and those properties name... So he gave just example refrences that how you can use all those porperties.

Edit:- here is the quoted text from the documentation in ccbSetSceneNodeMaterialProperty

Also, if you are writing a plugin for the editor, there are some advanced properties available: "Type", "Ambient", "Diffuse", "Emissive", "Specular", "Shininess", "Param1", "Param2", "Texture1", "Texture2", "Texture3", "Texture4", "Wireframe", "GouraudShading", "Lighting", "ZBuffer", "ZWriteEnable", "BackfaceCulling", "BilinearFilter", "TrilinearFilter", "AnisotropicFilter", "FogEnable", "NormalizeNormals".


Most of the properties items are mentioned here including the one you mentioned above "Param1"...


Robo
Guest
Quote
2020-05-26 08:59:23

Yeah, would be nice if those additional options were explained in what they did. 'Param1' is not self explanatory like most of the rest. Makes me wonder what else is hidden in CC options not yet known or explained...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact