Reputation: 1044
I know this is a lot. I'd like ideas. Optimally, someone has done this before and can point me to some code out there or a component that isn't too expensive.
I have a 3D vector object (I think it will be in DXF format but not sure. Going to use a 3D scanning service) that is the "wireframe" of a fold-out case for iPads. I would like to:
(1) "load that [3d vector object] up" as an object.
(2) Iterate through all surfaces, pick a surface, and apply a JPG "texture" to that surface.
(3) Render from various perspectives and that render creates a JPG (or PNG with transparent edges even better) "snap shot".
I assume something like this would require control of lighting, too, but maybe not. Ideas?
Upvotes: 0
Views: 1706
Reputation: 11
A great reference to go by is the Dxf file format reference which explains how to read and write dxf files on a binary level. You can find this here. Using a structure or a class would highly facilitate the coding of the object in VB's eyes. You would probably wanna use collections for things such as vertices, face and lines and fill these collections with the System.IO.FileStream of your DXF file. Importing Microsoft.DirectX.Direct3D will allow you to draw 2/3D elements within a form. You can find a good starting point here. Finally another great resource to checkout is the free and opensource [DXFlib][3]. Though it is written in another language (C++) you may be able to find useful information about reading and writing to DXF's on your own within the source code if you are. As for producing a render I'd say look into the Graphics Namespace or probably even Driect3D's capabilities. Hope I've helped and I'm anxious to see your final porduct, Best Regards! ~Andrew Ranger :)
P.s. stupid rep wont let me post three links so here ya go champ :) [3]: www .ribbonsoft .com/en/what-is-dxflib
Upvotes: 1