Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SuperDuck

How do I store large 3D objects on HD?

This topic is 5398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My 3D object consists of about 23.5 million triangles at full resolution. How do I store such a large info on HD and retrieve it fast enough? I have tried storing the coordinates and color of each node in txt format but that makes the file too big and causes very slow retrieval. We are all like a duck ... it looks calm and cool above the water; but underneath, its tiny feet are peddling hard to stay afloat. Me? I''m just another duck in the pond!!! [edited by - SuperDuck on February 28, 2004 4:43:14 PM]

Share this post


Link to post
Share on other sites
Advertisement
Save it in binary mode (smaller than text), use a vertex\index system (dunno how to call it, just like vertex\index buffers), use compression (because 23.5 million tri''s = 3*23.5 million = 70.5 million vertices (if you don''t use indices) * 16 bytes (3 floats for xyz, 1 for color) = 1128 million bytes = ~1128 MB).

How do you want to store this in memory for rendering? Streaming?

Share this post


Link to post
Share on other sites

I want to just display the stationary object again without having to recalculate, because recalculating again takes quite some time. What exactly do u mean by vertex\index system? I''m gonna get started on the binary format now, thanks.

The problem is that I cant store the object in memory because of its huge size and I have to either recalculate the coordinates or read the calculated coordinates from the HD each time the object is rotated or displaced.

Share this post


Link to post
Share on other sites
Ok , breaking each component apart:

Position:
depending on the resolution you need, you could just use unsigned integers (or arbitrary byte size, but 2 or 4 might be the easiest) per coordinate. So for 2 bytes, resolution = Scale / 65536.0;

Normals:
There is a nice tutorial (here on Gamedev -articles&resources - math&physics- search for quantized unit normal vectors) on using 2 bytes to represent normals. You can get away with this partly because you know extra information about the normal vector, namely it will be of unit length.

Colors:
the standard 3 byte RGB triplet, or you could do some creative stuffing of data into 2 bytes. (i.e. Each primary color can go from 0 to 39 (40^3 = 64000), and you can use a log scale to "decode" those ints into a 0..255 range)

And all this data could be stored in RAM in the same fashion, if the decoding is fast enough for you.

lonesock

Piranha are people too.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!