Import the TCX into Garmin Connect / Strava etc.Go to wattbike2garmin to convert your DAT file to a TCX.Select “Analyse” / “Export analysis modules” to export a DAT file.
#UNFORTUNATELY TEXTUREPACKER INSTALL#
Install the Wattbike Expert Software and import the session from the USB stick.Record your Wattbike session on to a USB stick.Sprintf(key, "images/skin/%s/skeleton%d.png", pName, i) ĭirector::getInstance()->getTextureCache()->addImage(image, key) Note the 1st texture file created in Spine doesn't have the sequence number "1", while TexturePacker starts from "1" Sprintf(key, "images/skin/%s/skeleton.png", pName) // set the texture key back to the PNG filename. If (!FileUtils::getInstance()->isFileExist(pvrPath))īool isOK = image->initWithImageFile(pvrPath) // TextureCache cannot directly load a file and set the key. Sprintf(pvrPath, "images/skin/%s/skeleton%d.pvr.ccz", pName, i) // this is where the pvr files exist, and replaced all the original PNG files so when spine use addImage to load the textures form atlas, it will look for the PNG filenames in TextureCache, which are the keys we set. loading the pvr files in TextureCache of cocos2d, and set their keys back to the same path of the PNG files. Convert to 1:1 mapping pvr files using TexturePacker, make sure each PNG has a corresponding PVR fileģ. png files and set the key as what spine atlas defines. What I did is just loading the TexturePacker generated pvr texture files in sequence and treat them as. Just tried loading pvr.ccz directly through TextureCache and it works SpriteFrameCache::addSpriteFramesWithFile("ist", "") // the could be in PVRTC format and cocos2d-x is fine with I followed your suggestion and it works great Loading PVRTC2/4 is not an issue since cocos2d-x supports it natively. plist when the frame texture file is generated. SpriteFrameCache::getSpriteFrame("path/subpath/image1.png") // the filename here doesn't mean the file really exists, it's just the key for the frame and it's defined in the. Then we can retrieve the frames later use plist, some like "path/subpath/image1.png" "path/subpath/image2.png". Usually we put image frames (for frame animation in most cases, but we can use it for whatever purpose anyway) into a big texture file, and generate a plist to mark the frames locations (exactly the same as in TexturePacker, or the atlas in Spine).Īfter that, we can call SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist, const std::string& textureFileName) to preload the image frames. plist (which includes the texture position, offset, etc.). If not, change the path in your texturepacker and SpriteFrameCache is very similar to atlas to save texture information in. plist file, make sure the path for the sprite frames are the same path passed to _spAtlasPage_createTexture (spAtlasPage* self, const char* path). json/.atlas files.įixed Size W/H: 1024 (so it will contain exactly 1 atlas page)Ĥ. MAKE SURE the relative path is the same as your. So we can make sure the exported PNG files are 512x512Ģ. MAKE SURE SETTING PAGE WITH/HEIGHT to 512/512 (both max and min), and check "Square" "Premultiply alpha". Here are my steps to create the "identical" pvr.ccz files from the. In order for this to work, we need to get the sprite frames ready before creating skeleton, and those frames should be from the. Texture = Director::getInstance()->getTextureCache()->addImage(path) SpriteFrame* pFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path) Ok, I'm not doing anything fancy here, just need to modify a few lines in _spAtlasPage_createTexture to load PVRTC2/4 texture from SpriteFrameCache install of just addImage() : Unfortunately, if you set the pixel format to PVRTC2/4 and try to export, it's going to say the format is not supported for Spine (not supported for libgdx actually). TexturePacker has an option to set pixel format to PVRTC2/PVRTC4, which provides kind of a lossy compressed texture and takes much less memory in runtime. However, even though the pvr file is smaller, the textures take the same size as PNG after being applied in your game. pvr.ccz file is much smaller than png, and Texture Packer actually supports exporting for Spine. Just try to share my experience here in case anyone is interested.Īs we know.