ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Announcements and Showcase
forum topic indicator New updates + $10 prize offer
person icon
guest_Robbo
Guest
Quote
2026-03-22 02:25:46

First person to guess both the node type and method of changing colors of my Aurora video gets $10 - one guess per person over the next week..

Also see the best method available for spritesheet animations via texture cropping:

See here for more: https://youtu.be/NkwwTzoKef0

person icon
guest_Robbo
Guest
Quote
2026-03-22 10:35:54

See 'API list' for new API for sprite sheet animations:

ccbSetTextureCrop(node, ID, cols, rows, imgNu, loop);

With this simple line of code can start and stop at any point and easily ensure that you don't go past the last sprite in the animations if you don't want to loop continuously - I had issues with this in default CC method for cloned copies.

Best of all can run fast on any number of nodes - just forloop over an array if needed at your specific speed. While looping, if you go past the last sprite will still work fine also.

person icon
Monks
Guest
Quote
2026-03-22 12:58:27

I guess the node type is a 3d mesh

And method of changing colors is through vertex color changing :)

person icon
guest_Robbo
Guest
Quote
2026-03-22 22:17:14

Good try Monks - but nope.

person icon
guest_Sam
Guest
Quote
2026-03-24 01:12:16

I would have thought vertex colors aswell. Since coppercube ambient and diffuse per mesh node doesn't seem to have much if any effect ( maybe im doing something wrong) unless you have gotten it working. I know its a thing in dx.


Sam

person icon
guest_Robbo
Guest
Quote
2026-03-24 05:20:17

Hi Sam - no, Im not changing any of the vertex colors actually...

person icon
guest_Guru
Guest
Quote
2026-03-24 08:33:26

It seems like you are using "Custom Cloud Scenenode" or maybe a Spheremesh to create the Aurora effect.

person icon
guest_Robbo
Guest
Quote
2026-03-25 00:50:09

Hi Guest, can you give a single answer of the node type and method of changing the colors & position over time ?

person icon
guest_Guru
Guest
Quote
2026-03-25 13:10:58

You are using the "Custom Cloud Scenenode" as the node type. And you are using cross fade mechanism between layers of cloud textures to change the color of the aurora over time.

person icon
guest_Robbo
Guest
Quote
2026-03-25 23:53:16

guest_Guru wrote:
You are using the "Custom Cloud Scenenode" as the node type. And you are using cross fade mechanism between layers of cloud textures to change the color of the aurora over time.


Yep, you got it - well done. I Didnt think anyone would work it out actually.
I only use 4 textures and cross fade between them to give the changing color and positions over time. I change out the next texture at its final end (fully faded in or fully faded out) and keep switching between the 2 - seems to work ok for a more generalised fading between textures - not as animated as a full spritesheet but works well enough here. Im using my cloud scene node system also.

Send me an email address for payment via Paypal or other method.

The code if anyone wants to know is here:


*** before start:

var aurCycle = false; // start off
var aurFade = 0; // start at no fade
var aurAdj = 0.01; // speed of change
var nextTex = 2;
var parentN = ccbGetSceneNodeFromName("AuroraP");

// SKYCLOUD
var aurNode = ccbGetCloudLayer(parentN, "BG1.png", "BG2.png", true);
ccbSetSceneNodeProperty(aurNode, "CloudHeight", 0.35, 0.07, -0.05);
ccbSetSceneNodeProperty(aurNode, "TextureScale", 0.2);
ccbSetSceneNodeProperty(aurNode, "EmissiveColor", 70,70,70);


*** on press activate button
aurCycle = true;


*** every 50 ms:

// Aurora Merge

if (aurCycle) {

aurFade += aurAdj;

if (aurFade > 1) {
aurFade = 1;
aurAdj *= -1;
nextTex++;
if (nextTex > 4) {nextTex = 1;} // 4 textures max used here
var Texture = "BG" + nextTex;
tex = ccbLoadTexture("data/images/" + Texture + ".png", false); // no mips maps needed
ccbSetSceneNodeMaterialProperty(aurNode, 0, "Texture1", tex);
}
else if (aurFade < 0) {
aurFade = 0;
aurAdj *= -1;
nextTex++;
if (nextTex > 4) {nextTex = 1;}
var Texture = "BG" + nextTex;
tex = ccbLoadTexture("data/images/" + Texture + ".png", false);
ccbSetSceneNodeMaterialProperty(aurNode, 0, "Texture2", tex);
}
ccbSetCrossFade(aurNode, 0, 0, aurFade);
}

person icon
guest_Robbo
Guest
Quote
2026-03-26 00:03:57

I may change the API - ccbGetCloudLayer(parentN, "BG1.png", "BG2.png", true) - so that you can load the initial textures from anywhere - not only from: data/images/...
as once started you can make use of ccbSetSceneNodeMaterialProperty well enough to change them out...

person icon
guest_Robbo
Guest
Quote
2026-03-26 00:17:10

make sure to put:
var tex; - in initialize it also.
For me was already initialized elsewhere...

person icon
guest_Guru
Guest
Quote
2026-03-31 19:14:43

Hi instead of recieving the price money can I give the paypal link of other developer, because paypal doesn't work i our country and I want to support that developer maybe you can send the money to that developer?

person icon
guest_Robbo
Guest
Quote
2026-04-09 14:00:48

sure Guru - as you like - just post an email you like me to send it to..


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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