Great!! That worked. Here's the final part to the water:hendu wrote:Note that irr by default has materials in the node, and your latest function modifies the mesh's materials instead.
Try changing
obj->getMesh()->getMeshBuffer(x)->getMaterial()
to
obj->getMaterial(x)
Code: Select all
void changeObject(IAnimatedMeshSceneNode* &obj) {
ITexture* myT = driver->getTexture("media/Locations/KokiriForest/water.png");
for (int x=0; x<obj->getMesh()->getMeshBufferCount(); x++) {
for (int y=0; y<100; y++) {
if (obj->getMaterial(x).getTexture(y)==myT) {
obj->getMaterial(x).MaterialType=EMT_TRANSPARENT_ADD_COLOR;
}
}
}
}
Next is the trail.
Would you maybe have more pseudo-code I could look into coding?
Or maybe a link for how to change the trail to merge with the grass.png texture and make it brown?
(There is no dirt.png or anything image, so I assume it's just a color change. I've no idea how it works though!)
I figured it'd maybe be a splattermap, but the path is a separate object inside of the .obj. It's just a platform on top of the grass.
Thanks again for your awesome help!
So glad to get the water transparency working.
I hope the dirt path isn't going to be too difficult.