I have a quick question about exporting color using collada DOM. First I’m trying
daeElement* effectLib = root->add("library_effects"); daeElement * effect = effectLib->add("effect"); effect->setAttribute("id", sEffectName.c_str()); daeElement* profile = effect->add("profile_COMMON"); daeElement* technique = profile->add("technique"); technique->setAttribute("sid", "common"); technique->add("phong diffuse color"); double rgb=///blah blah; std::stringstream lColorStream; lColorStream<<rgb<<" "<<rgb<<" "<<rgb<<" "; daeBool returnv = technique->setCharData("1 2 3");
however returnv is false. What am I doing wrong?
Second, following the method in the export example, I’m able to set my diffuse color to a texture, which works fine. Using the common profile though, is there a way to have botha diffuse color and a diffuse texture assigned to the same technique? If not, whats the best way to have both a diffuse color and a texture applied at the same time, other then baking the color into the texture?