GallenWolf Posted February 16, 2015 Share Posted February 16, 2015 Hello! I've found myself needing to write out vertical cross maps from latlong maps to use in Unity, thought I'd quickly hack out a HDA for this purpose. hiplc is attached! generateHoudiniCubeMap.hiplc 1 Quote Link to comment Share on other sites More sharing options...
Jason Posted February 16, 2015 Share Posted February 16, 2015 Hey there, Not sure if you're aware of isixpack - one of the older tools in the Houdini distribution. $ isixpack Usage: isixpack [options] <front> <right> <back> <left> <top> <bottom> <out_pic> or: isixpack <cross_image.pic> <out_pic> or: isixpack <reflect.rat> <cross_image_output> This program creates environment/reflection maps. If the target output file is in RAT format (.rat file extension), a multi-file cubic environment map will be generated. It's possible to see each individual of the .rat file by running "iconvert -i <image_number> reflect.rat outfile". If the output file is not a RAT format file, then a lat-long environment map will be generated. The first usage takes six individual images representing the faces of a cube and generates a single lat-long or cubic .rat reflection map. Alternatively, it's possible to take a single image which is laid out in the shape of a cross (similar to http://www.debevec.org/Probes/) and generate a single reflection map (must be a cubic .rat file). The third usage will take a multi-image cubic environment RAT file and convert it to a single cross image. Lat-long Options: -u usize Horizontal output resolution -v vsize Vertical output resolution -a Antialias output with 3x3 super-sampling Default output file output size is for lat-long images is 1024 x 512 Cross images must be composed of square sub-images. They must be laid out as either: +------+------+-------+ +------+------+------+------+ | | top | | | |right | | | +------+------+-------+ +------+------+------+------+ | left |front | right | | top |front |bottom| back | +------+------+-------+ +------+------+------+------+ | |bottom| | | |left | | | +------+------+-------+ +------+------+------+------+ | | back | | +------+------+-------+ Example: # Generate a cubic environment .rat file > isixpack frnt.pic rite.pic back.pic left.pic top.pic bot.pic map.rat # Generate a cubic environment .rat file from a cross HDR image > isixpack kitchen_cross.hdr kitchen.rat # Display a cubic environment map > isixpack kitchen.rat ip To make a .rat file which is a lat-long representation of the environment map, the environment map needs to be generated as a non-rat format initially. > isixpack front right back left top bottom stdout | iconvert stdin out.rat Quote Link to comment Share on other sites More sharing options...
GallenWolf Posted February 17, 2015 Author Share Posted February 17, 2015 Hey Jason! I didn't realize isixpack could generate a cross image as well! I just tried and it worked super. Darn it. Oh well I learnt something new Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.