Peer-to-Peer Forum

 

Login Register    
Image/Geometry Slicing
Posted: 15 February 2009 08:46 AM  
Member
RankRankRank
Total Posts:  59
Joined  2008-12-11

Just wondering if something could be done through a creator script…or better yet if someone over at Presagis could write the script smile

I know there is the build polys from image feature which I guess is more or less what threw me on my train of thought but either way I haven’t seen anything that does what I’m looking for but if there’s something else out there please feel free to lemme know.  I’ve been playing around with a panoramic head the last few weeks and stitching together images so far in the 500 or so megapixel range.  Say I were to shrink one of those images down to 4096x512 and map sections onto some geometry, is there a way to slice the original 40,960x5,120pixel image into 512x512 chunks as well as break down the geometry into equivilent sized pieces for a super high resolution textured model?

 
Posted: 13 March 2009 05:35 PM   [ # 1 ]  
Newbie
Rank
Total Posts:  2
Joined  2009-02-27

Hi Tarnis,
  Chop Texture might do the trick, however the image sounds far too big to be loaded into Creator’s Texture palette.  But if you could load it…

Chop Texture, in the Texture palette Edit menu, divides a texture into smaller files, reducing the amount of texture memory needed for the realtime display. The original texture file is preserved.

If the texture already has been applied to faces in the database, Chop Texture can divide faces along the lines where the texture has been chopped, and update the texture pattern of each polygon so that the appropriate smaller texture is assigned.

To use Chop Texture:

1. Click Current Texture on the Toolbar or choose Palettes>Texture to open the Texture palette.

2. Select the texture you want to chop and choose Chop Texture from the Texture palette Edit menu. The Chop Texture dialog box appears.


3. Click the lower-left corner of the texture display in this dialog box to position the grid over the texture. Adjust where you are clicking until both the X and Y settings are 0 (zero). If the texture you loaded into the Texture palette has dimensions that are powers of 2, Chop Texture will create smaller textures that also have dimensions that are powers of 2.

4. Set Update Texture Palette to add the new textures to the Texture palette. If you do not set this option, Chop Texture creates four smaller texture files in the same directory as the original texture pattern, but does not add these textures to the Texture palette. (You will have to add them manually if you want to use them in the database.)

5. When Update Texture Palette is set, Update Database becomes active. Set this option if (1) the texture has already been applied to faces in the database and (2) you want to replace the large texture with the new, smaller textures on these faces. A message warns you that there is no Undo for this function.

If you set Update Database, the polygon count will increase as the faces that are located along the edges of each smaller texture are cut to match the edges of the textures. The texture pattern number in the Face attributes of each affected face will be changed to the pattern number of the new texture that is applied.

6. Set Blend Edges if you want Creator to adjust the pixel colors at the edges of each texture. This eliminates visible edges in some realtime systems.

7. Click OK. Chop Texture creates four new texture files that correspond to the four grid quadrants. The new files are into named: [filename]_0.*, [filename]_1.*, [filename]_2.*, [filename]_3.*, where [filename] is the name of the original texture, and * is the file extension of the original texture.


————————————————————————————————————————

 
Posted: 17 March 2009 02:27 PM   [ # 2 ]  
Sr. Member
RankRankRankRank
Total Posts:  547
Joined  2009-03-17

You should try BuildPolyFrom Image.  It does exactly what you want it to without loading the original image into the palette.  In fact, there is a box to uncheck that will then not load the new tiles into the palette while working to avoid the Smart Heap Out Of Memory I used to get when doing this with a 16384x16384 image (slightly larger than yours)

The outcome is that you’ll have a directory full of little tiles 512x512 named after your original with a _column_row appended and an OpenFlight file of rectangular polys that are mapped with your tiles.

 



 
   
 

‹‹ Feature Request      XML Files ››