Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Kurt Miller, posted on July 24, 2001




Image Description, by Kurt Miller



Today's image is a screenshot of an application I recently released entitled 3D-Exe. It came about when an artist friend of mine (Max Shelekhov) asked me if I knew a way for him to distribute his models in such a way that people could download and view them without needing an application like 3DSMax, which mostly only other artists would have. After a few idea exchanges with Max, I implemented 3D-Exe. It takes 3DS model files and TGA textures, to produce a stand-alone executable that serves as a viewer (requires OpenGL) for the models.

In the screenshot you see both the main application running, and an example of an executable produced by it. The slick space ship model in the image was created by Max Shelekhov. By the way, if you like the model, I highly suggest you check out some of his other great artwork here.

3D-Exe is available on my recently launched company site, Gradient Studios. In addition, the full C++ source code has been released under the GPL. I don't have time to work on this project right now yet there's quite a bit that could be done to make this sort of program more stable, feature-rich, etc. If anyone out there feels like picking it up where I left off, you're more than welcome to. Some suggestions for improvements are in the readme.txt included with the source. That's all. Hope you enjoy it.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
MiNDHiVE

July 24, 2001, 01:41 PM

Great idea!!!

 
Rectilinear Cat

July 24, 2001, 01:53 PM

I've seen many a terrain renderer and raytracer pass through this IOTD forum, but this is one of the few IOTDs that's practical too! Nice work!

 
Isaack Rasmussen

July 24, 2001, 02:51 PM

Aha, so that's what our own Kurt Miller is working on.

Great work!

 
MK42

July 24, 2001, 03:13 PM

Congrats! That is one of the best ideas I've heard of in a while. Darn, even if you have 3DS Max or some other modelling package, it will just be quicker to use such a viewer.

I also got a few (useful?) ideas:

1. You could allow the possibility to actually 'unpack' the model out of the exe. Of course, the artist might not always want this to happen, so...

2. You could prevent the unpacking by some encryption scheme of the data and a flag which is set when building the exe. So, you would specify a password at 'compile time' of the package ... and you could only allow somebody to unpack it, if he has the password.

I really think that these additions could make for an even more useful tool. Imagine this scenario. A freelance artist does some modelling work for a company. Instead of sending the actual model files, he could just provide a 3D-Exe file. The contractor takes a look at it and 'approves' it. Then, the artist sends the company the password. Sure, most people should 'trust' their contractors, but it might give the artist more control if he fears he's being ripped off.

OK, the scenario might be a bit 'pesimistic' but it would still be cool, if you could 'unpack' the exe.

- MK42

 
Morgan

July 24, 2001, 03:22 PM

Nice job, Kurt.

-m

 
bigcheese

July 24, 2001, 03:28 PM

As an added bonus, in the U.S., you can decide to make it actually illegal to develop software capable of defeating this encryption, no matter how trivial it may be. Even foreign nationals could be arrested, should they visit the U.S. Ha ha!

 
MCSons

July 24, 2001, 04:12 PM

Nice idea, how big is a graphic file with, let's say a size of 5 kb if it has been converted to a standalone program?

 
thec

July 24, 2001, 04:24 PM

Nice model! ahh.. so it wasn't about the model after all... ;-)

Try releasing it so it will be used... could be fun :-)

Albert

 
Rico

July 24, 2001, 04:30 PM

thec, he did release it, with source code, read the last part of the message!

 
Revolver

July 24, 2001, 04:53 PM

Pigs get what pigs deserve. :)

 
EvilOne

July 24, 2001, 05:03 PM

Really cool stuff. Btw, a complete 3ds player in that way would be cool too. Btw, and some dumbheads like me can learn from the source, if it's so well-structured like Kurts.

 
TrapZZ

July 24, 2001, 05:27 PM

wow man what an awesome practical idea - thanks for releasing the source too - i'm another dumb head that needs to learn ;)

 
snale

July 24, 2001, 05:37 PM

The backside is that NSA might force you to implement a backdoor.

 
lycium

July 24, 2001, 05:43 PM

you got somethin' against raytracers, punk?

hehe, j/k, good work kurt!

 
Mark Friedenbach

July 24, 2001, 06:10 PM

If you need a password to unlock the encryption, then how does the 3D-Exe app decrypt the file for viewing?

 
danthalas

July 24, 2001, 06:11 PM

Simple and very nice idea.

 
Moby Disk

July 24, 2001, 06:51 PM

Nice. I gotta try your viewer on some objects that I cannot load successfully... Have you written any docs on the 3DS format? What did you use as a reference when coding?

There are a few RTF/WORD/TXT docs, but they are highly incomplete. May people write viewers that exploit features that I have never seen documented. If you have any tech details regarding (3DS box mapping, texture offsets, proper "3DS style" shading calculations, .MAX formats...) or other "undocumented" blocks please write it up!

 
Kurt Miller

July 24, 2001, 06:57 PM

Sorry, I don't have any extra documentation. I used that unofficial spec written up by Martin van Velsen and Robin Fercoq, from January 1997. My loader only directly supports the verts/faces/uvs. Nothing fancy. I'm not a big fan of the 3DS file format :)

 
EGreg

July 24, 2001, 09:33 PM

If u ARE going to set a password, encrypt it based on the password so the password won't be obvious in the exe and neither will the file :-)

-Greg

 
Rico

July 24, 2001, 11:47 PM

Are Max Shelekhov's models available for us to play around with or does he keep them to himself? I noticed that there are no links for downloads... But they sure are pretty to look at! :)

 
MK42

July 25, 2001, 01:53 AM

To EGreg and Mark,

Oops, you're right. At first I just wanted to say ... make it unpack the files. Then it seemed smart to only allow this for certain individuals. The problem with this is, that if you only have a password to 'trigger' the unpacking then it won't really be safe, since you could still just 'strip' the files out of the executable ... that's where I thought a bit too quick and wanted to encrypt the files to make this a bit harder. But, you are of course right. Since the source code has been released, the 'security' of the files contained within 3D-exe is probably not crucial ... so just give it a flag to unpack the data.

- MK42

 
disableddan

July 25, 2001, 01:56 AM

Nice ships!

 
Kezza

July 25, 2001, 02:20 AM

That is nice.... how does one go about creating an exe without a compiler?
Get the program to put it together in asm?
Or have a template ready and just change data segment and checksum to use model?

 
Justin Wilder

July 25, 2001, 03:02 AM

Just append a file to the end of the exe. In the exe, you can read the appended data by opening the exe file in read mode and scanning forward by the original size of the file. Of course, to do this you need to keep track of the original size of the exe within the exe itself. You can either do this empirically by compiling it and checking its size, or by having the separate packing program check its size and set a variable at a flagged location in the exe.

Justin

 
bigcheese

July 25, 2001, 03:06 AM

If I get this right, I think you're thinking that the fact that the sourcecode is released weakens the encryption. Whether that's it or not, I'll put a little bit of encryption background here just for fun.

Part of the usual paradigm for encryption schemes nowadays is that the scheme should be secure even when it is assumed that the 'attacker' knows the details of the encryption scheme. In practice, this tends to mean that the strength of the encryption lies in the difficulty that exists in guessing a key which can decrypt the data (note that the encrypted data requires not just the decryption algorithm, but a key which can decrypt the data.. since the encrypted data is also related to the decryption key).

There are many encryption schemes which can do a satisfactory job of meeting this requirement, but public-key encryption schemes with sufficient key strength are extra-safe since it tends to be safe as long as an imposter hasn't totally fooled you by impersonating the person who you really wanted to decrypt the data (and if you want to be paranoid, you can take some steps to assure yourself that the person you're communicating with really is the right person).

Anyway.. If you really want to encrypt your data, the fact that the sourcecode for the program has been released need not be relevant.

 
Jari Komppa

July 25, 2001, 03:18 AM

Or then you can append a footer to the whole mess and read the offset of the file from the last dword of the whole exe.

Or you could use cfl3. (iki.fi/sol/code.html) =)

 
The Legend

July 25, 2001, 03:20 AM

Nice work.

One question: Have you solved the problem, when 3ds MAX exports files with useless extra triangles (degenerated, second triangles with the same coordinates, but different texture coordinates)?

 
MK42

July 25, 2001, 03:33 AM

Thanks for the description, but I knew about that. I mean, the 'crypt' function for unix-password authentification is public, but you still can't deduce the correct password other than by 'guessing' the correct one. What I meant was the following. If you have just a 'flag' in the file which would control whether it can be unpacked or not, then you can easily modify the exe. Same thing goes actually for any type of password scheme. If the executable contains the code fragment which 'tests' the user-specified password against the stored password (even in some encrypted form ... i.e. not plain text), you can modify the executable so that it will 'invert' that test. So, when you enter the wrong password it will say that it was the correct one. Having the source publicly available makes this process even easier to do (isolating the offset to change a few bytes in the executable). That's why it wouldn't be safe.

- MK42

 
TheGlen

July 25, 2001, 03:50 AM

Talk about asslicking!!
If this IOTD should have been posted by anyone else, you would have been over him like flies on shit.

It is a neat application, but it isn't that great. At least not better than many of the other IOTD:s that you bury 6 feet under....

Although I like the tone of the messages. It would be nice if we could keep a slightly more noncompetitive and friendly tone towards the IOTD:s.

:-)

 
The Legend

July 25, 2001, 04:08 AM

Hey, it is not another terrain renderer, or engine which will probably never been used for any game.

This is one of the few apps that could really have a real use.

 
This thread contains 43 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.