Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

151 Neutral

About piecuch.p

  • Rank

Personal Information


  • Github

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. piecuch.p

    Ultimate Bitmap Font Generator 2

    Album for Ultimate Bitmap Font Generator 2
  2. piecuch.p


    Bitmap font generator inspired by UBFG and BMfont applications with multiply features: multiply fonts in one atlas plenty customisations options font preview (w. OpenGL) font styling with externals editors (Photoshop/Gimp) multi-texture fonts full debug of glyphs borders and padding; glyphs rotation external font files (ttf/otf) glyph outlines signed distance field fonts, including multi-channel generator multisampling multi-channel export template-based exporter (w. Google CTemplate) Work in progress with a lot of details still to be implemented, but usable at the moment. Fonts can be generated, tested and exported.
  3. piecuch.p

    QLMesh 2.0

    QLMesh is small but useful QuickLook plugin showing a preview of various well-known 3D model formats. All formats provided by the Open Asset Import Library (http://http://assimp.sourceforge.net) are supported: 3d, 3ds, ac, ac3d, acc, ase, ask, assbin, b3d, blend, bvh, cob, csm, dae, dxf, enff, fbx, gltf, gltf2, hmp, ifc, ifczip, irr, irrmesh, lwo, lws, lxo, md2, md3, md5anim, md5camera, md5mesh, mdc, mdl, mesh, mesh.xml, mot, ms3d, ndo, nff, obj, off, ogex, pk3, ply, prj, q3o, q3s, raw, scn, smd, stl, ter, uc, vta, x, xgl, xml, zgl. I use this tool in my daily work, so I have added also support for some frequent file formats I work with: compressed textures (dds, etc/pkm and pvr (including multi-image support for mipmaps), Adobe Photoshop brushes (abr) and bitmapped font (BDF files). Current version (1.1) is using Mesa for offline rendering, but somehow I not happy with this solution. The new build (2.0) is using OSX built-in support for COLLADA/ASE format - this much more convenience in daily use. See my blog at http://pawelp.ath.cx/
  4. piecuch.p

    QLMesh 2.1 released

    I have prepared another update to QLMesh: ver. 2.1 add performance improvements (plugin is better handling big bitmaps), major update of Open Asset Library and support for new format: Photoshop Patterns (PAT) files - both RGB and CMYK formats are supported. New version is also build against OSX SDK 10.13, since I have finally updated my MacBook to Sierra. (http://pawelp.ath.cx/)(http://komsoft.ath.cx/)(https://itunes.apple.com/us/app/qlmesh/id1037909675)
  5. piecuch.p

    QLMesh 2.0 and Asset Import Library

    For QLMesh (and some other projects), I am running my own fork of Asset Import Library. The difference: it is amalgamated build - all sources are merged into one file (including dependencies). Since Assimp recently switched to miniz, I have replaced remaining references to zlib with miniz - so zlib is not required too. drwxr-xr-x 85 piecuchp staff 2890 Jan 17 23:34 assimp -rw-r--r-- 1 piecuchp staff 4921627 Jan 17 23:34 assimp.cpp -rw-r--r-- 1 piecuchp staff 2893785 Jan 17 23:34 private\assimp.h Everything you need to buid the assimp is: g++ -c -std=c++11 code-portable/assimp.cpp or just add assimp.cpp to your project/IDE (you can find code-portable directory in my repo. One disclaimer: I have only tested this amalgamation under OSX with QLMesh). Main reason for this amalgamation is that it makes compilation/recompilation on different platforms with different configurations rather easier. Side-effect is that single-file assimp.cpp compiles really fast (like 10x faster on my MacBook than original project files). (http://pawelp.ath.cx/)(http://komsoft.ath.cx/)(https://itunes.apple.com/us/app/qlmesh/id1037909675)
  6. piecuch.p

    QLMesh 2.0 release

    I am quite happy I finally had time to release a new version of QLMesh. With multitude of 3d files on my disk, having such a quick tool is always nice welcome. But also relaying on built-in OSX 3d generator (for .obj and .collada) made the whole code simpler and cleaner - previous version had a lot of code that suppose to work only in non-sandboxed environment (like texture support in 3d view). But after AppStore release most of this code was not in use. Now what would be good to have is finally support for Daz3D models and formats and my long-lasting missing feature: LDraw format support. (http://pawelp.ath.cx/)(http://komsoft.ath.cx/)
  7. piecuch.p

    QLMesh 2.0

    Album for QLMesh 2.0
  8. Apple has just accepted my application on AppStore: QLMesh. It is a QuickLook plugin for displaying a preview of many 3d formats, base on Open Assets Import Library. All 3d formats are supported plus some 2d compressed textures. [attachment=31149:qlmesh1.png]   Mipmaps are displayed with multi-page view - quite handy and useful feature - also because you can browse within mipmaps directly in finder. [attachment=31150:mipmaps.png] CGContextRef kcontext = QLPreviewRequestCreatePDFContext(preview, NULL, NULL, properties); ... CGImageRef cimage = ...; // Fill 3/4 of the rect const float enlarge = 1.0 + 0.48*i*i; CGRect canvasRect = CGRectMake((image[0].width - w*enlarge)/2, (image[0].height - h*enlarge)/2, w*enlarge, h*enlarge); CGContextBeginPage(kcontext, &pageRect); CGContextDrawImage(kcontext, canvasRect, cimage); CGContextEndPage(kcontext); Part of the QLMesh is control application for quicklook plugin. [attachment=31151:qlmesh5.png] Usually that would not be anything special, however for MacStore applications this is a very different story. MacStore applications are all sanboxed. There are ways to communicate and share data between such applications, eg. using App groups, but quicklook plugins do not support that feature. After struggling for some time with this problem I came out with this simple solution:  1. register additional file type/extension managed by your plugin - dedicated for passing settings to the plugin 2. when you want to pass some settings to the plugin - save settings in a file with  a special extension and request  a quicklook thumbnail for that file 3. you plugin will be executed with settings file - you can now configure your plugin   That's easy. Now hardest part: how to send some data (eg. current configuration) from plugin to Control application. Solution: encode data in thumbnail image and send it back from plugin.   Some coding - function for decoding CGDictionary to CGImage: CGImageRef _decodeDictToCGImage(CFDictionaryRef dictref, const int thsize) { NSDictionary *dict = (__bridge NSDictionary *)dictref; // Get a color space CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); NSData *decodedData = [NSKeyedArchiver archivedDataWithRootObject:dict]; const long decodedDataSize = decodedData.length; NSMutableData *paddedData = [NSMutableData dataWithBytes:&decodedDataSize length:sizeof(long)]; [paddedData appendData:decodedData]; int sz = thsize; // min. thumbnail size if (decodedData.length < sz*sz*3) [paddedData increaseLengthBy:sz*sz*3-decodedData.length]; else { sz = ceil(sqrtf(decodedData.length/3)); [paddedData increaseLengthBy:sz*sz*3-decodedData.length]; } const char* rgb = [paddedData bytes]; char* rgba = (char*)malloc(sz*sz*4); for(int i=0; i < sz*sz; ++i) { rgba[4*i] = rgb[3*i]; rgba[4*i+1] = rgb[3*i+1]; rgba[4*i+2] = rgb[3*i+2]; rgba[4*i+3] = 0xff; } // Assuming the decoded data is only pixel data CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, rgba, sz*sz*4, NULL); // Given size_t width, height which you should already have somehow CGImageRef image = CGImageCreate( sz, sz, /* bpc */ 8, /* bpp */ 32, /* pitch */ sz*4, colorSpace, kCGBitmapByteOrderDefault|kCGImageAlphaNone, dataProvider, /* decode array */ NULL, /* interpolate? */ FALSE, kCGRenderingIntentDefault /* adjust intent according to use */ ); if (image == nil) NSLog(@"Failed to create image from %@.", decodedData); #if 0 NSData *data = (id)CFBridgingRelease(CGDataProviderCopyData(CGImageGetDataProvider(image))); NSLog(@"output image: %zux%zu %zu, %zu, %@ %lu", CGImageGetWidth(image), CGImageGetHeight(image), CGImageGetBitsPerPixel(image), CGImageGetBitsPerComponent(image), data, [(id)data length]); #endif // Release things the image took ownership of. CGDataProviderRelease(dataProvider); CGColorSpaceRelease(colorSpace); if (rgba) free(rgba); return image; } What's next:   1. Rendering is done using off-screen Mesa extension (this is static build). Currently it is software rasterizer (swsoft) but next version should use llvmpipe engine.   2. I am working on may optimisations - mostly related to speeding-up file loading. Current Xcode QL generator for OBJ models seems to be much faster in many cases.   3. Texture access in sandboxed environment - tricky but some workarounds could be found.     Best regards  
  9. piecuch.p

    Ultimate Bitmap Font Generator 2

    Album for Ultimate Bitmap Font Generator 2
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!