PDA

View Full Version : From 3DS to OpenGL c++ source code



clucches
03-27-2001, 12:49 AM
Hi!,
I coded a program wich can import a 3DS file and export a c++ OpenGL source file.
it supports flat shading, smooth shading, normal smoothing angle, 3DS color material, diffuse texture and TRIANGLE STRIP OPTIMIZATION. I think this program is better than the one i used before 3DWinOGL, it's faster, uses less memory and does somthing more.
It's almost finished, and I want to make it public.
Is there someone interested in????
I'd like to know I didn't worked for nothing!
please anwer this message if you'd like to have this program.
bye

Roderic (Ingenu)
03-27-2001, 03:41 AM
I am http://www.opengl.org/discussion_boards/ubb/smile.gif
Cause I'm in the process of writing something similar...
If the source code is provided it'll be awesome http://www.opengl.org/discussion_boards/ubb/smile.gif

billy
03-27-2001, 04:11 AM
Of course, that is quite interesting. For me the most useful feature is mesh optimisation.
Let me know when you post a demo.

JoeMac
03-27-2001, 04:11 AM
Sign me up as well.

paddy
03-27-2001, 04:47 AM
There is a cool tool that imports many 3D formats (3DS,LW,Maya) and allows direct export to C++ code generation a display list.

3D Explorer : http://www.xdsoft.com/explorer/

KurtCob
03-27-2001, 05:09 AM
I also would like to have this application, and if the source code is provided, it will be apreciated.
Tnks
Best regards
Kurt

Dire_Avenger
03-27-2001, 06:47 AM
ME! ME! drool... (a-hem!)
Aaanyway, I'd be interested http://www.opengl.org/discussion_boards/ubb/smile.gif

Alload
03-27-2001, 07:10 AM
clucches >> could you help me to debug my own loader of 3DS files? If you accept, please contact me: alload@hotmail.com . Thanks.

Please send me the source code of your loader too, it will be helpful for me. Thanks.

Iceman
03-27-2001, 02:09 PM
Originally posted by paddy:
There is a cool tool that imports many 3D formats (3DS,LW,Maya) and allows direct export to C++ code generation a display list.
3D Explorer : http://www.xdsoft.com/explorer/

Paddy I have a registered copy of 3D Exploration and I can find no method of exporting to C++ source code in it. Could you help me out here? How do you do such an export?

Iceman
03-27-2001, 02:12 PM
Paddy skip that last message, I found it. Thanks...

stephenwilley
03-28-2001, 01:51 AM
When you've posted the demo or whatever, drop me a mail! Cheers,

Stephen

clucches
03-28-2001, 02:42 AM
http://www.opengl.org/discussion_boards/ubb/smile.gif
I'm glad of all this interest in my program...

I'm fighting vs. little probllem with loading textures, I think I'll win this friday.

Thanks to everybody.
se you soon!

clucches
03-28-2001, 02:55 AM
ALLOAD
I'll try to help you, and I'll try to help anyone needs me.

thank again

vs
03-28-2001, 04:05 AM
I did this last year. It is a bizarre format which is a bugger to write a reader for. I got code bits from this site and NVIDIA.com. They have posted on there site a complete VC++ project with src to read and write 3ds. If its mesh optimization your after there is a site at the University of Calgary in Canada which has a good implementation ( i.e. easy to follow) of hoppe's thesis on triangle mesh collapse, its called bunnylod.

HTH

Alessandro_dup1
03-28-2001, 04:52 AM
oh yes please, i also looking for a 3ds loader/importer ! when it is done please drop me a line, and if you need a 'beta tester', i will !!!

bye

newname
03-28-2001, 10:58 PM
also sign me up.

Keymaster
03-29-2001, 09:43 AM
I think it's a good idea !!! http://www.opengl.org/discussion_boards/ubb/cool.gif

coredump
03-29-2001, 10:53 AM
sounds good...i'd like a copy also. thx.

b

MicroCAN
03-29-2001, 09:49 PM
sign me up

Asshen Shugar
03-29-2001, 11:59 PM
There's a 3DS loading library somewhere on http://www.sourceforge.com . Look for 3dslib or lib3ds or something like that...

wu_tie1
03-30-2001, 01:12 AM
Sign me up as well.

pleopard
03-30-2001, 04:49 AM
Originally posted by Asshen Shugar:
There's a 3DS loading library somewhere on http://www.sourceforge.com . Look for 3dslib or lib3ds or something like that...
http://sourceforge.net/projects/lib3ds/

clucches
03-30-2001, 07:34 AM
Originally posted by paddy:
There is a cool tool that imports many 3D formats (3DS,LW,Maya) and allows direct export to C++ code generation a display list.

3D Explorer : http://www.xdsoft.com/explorer/

That program was really impressive (at first)!!
But It doesn't work as i would like...
1) Texture mapping is not so good
2) It rescales texture to at least 512x512 and this is not a good idea (if i wanna a 12x12 texture i can't)
That's why I think I'm working good

This (http://www.dsi.unive.it/~clucches/3ds.zip) is a beta version of my program, with a simply 3ds file, try to import this with that programm and with mine.

I know There's a lot of work to do!

Comments are wellcome. http://www.opengl.org/discussion_boards/ubb/smile.gif
chrs

clucches
03-30-2001, 07:41 AM
if you wanna do some test
1) use square texture and 2^n sided
2) don't use too many materials if the scene is complex
3) always set materials' colours, even if you use textures
4) for texture use a diffuse map
5) tiling work, mirroring I don't know
6) texture rotation angle is not implemented
7) emissive light is nt implemented
8) cpp export is not definitive (it doesn't includes materials)

tell me if I forgot somthing else...

[This message has been edited by clucches (edited 03-30-2001).]

WhatEver
03-30-2001, 08:04 AM
Just an idea for you to impliment. I'm almost done with my model library, and I make my texture names external.

A sample whould be:
GLuint* TextureNames=NULL;
GLuint nTextureNames=0;
TextureNames=Model->GetTextureNames(&nTextureNames);

Model->Draw(TextureNames);

Another function would return the file names in order so you can use your own texture loader. Also with external names you can easily impliment texture animations.

Good luck, looks cool so far. I couldn't get the textures to draw in your program, just colors.

Can you add an fps display too, so we know what the performance is.

Cardinals33
03-30-2001, 11:12 AM
You can count me in as well. I have been trying for a long time to figure out how to make use of 3DS files in my OpenGL programs.

DarthPaul
03-30-2001, 06:43 PM
I'm in. I'd like to check it out.

AHa
03-31-2001, 04:05 AM
I (it) need glut32.dll where can i get it.. or can somebody mail it to me??

clucches
03-31-2001, 04:12 AM
Originally posted by AHa:
I (it) need glut32.dll where can i get it.. or can somebody mail it to me??
just use this site search engine...



[This message has been edited by clucches (edited 03-31-2001).]

clucches
03-31-2001, 04:21 AM
Originally posted by WhatEver:
Good luck, looks cool so far.
1) I couldn't get the textures to draw in your program, just colors.

2) Can you add an fps display too, so we know what the performance is.

1) 3DS doesn't save yhe full path of a texture, maybe you only need to copy the tuxtures you use in the same directory of the 3DS file you exported!

2) You must wait a little, before i have to implement the trackball.

had anyone else problems???please tell me or mail me.

Here you can download a beta version of my program (http://www.dsi.unive.it/~clucches/3ds.zip)

[This message has been edited by clucches (edited 03-31-2001).]

[This message has been edited by clucches (edited 03-31-2001).]

WhatEver
03-31-2001, 04:45 AM
Ah yes, I figured it out. My texture name was stored in the 3ds file as a tga file.

AHa
03-31-2001, 05:32 AM
****.. I didn't find it (glut32.dll)

please send it to me! http://www.opengl.org/discussion_boards/ubb/smile.gif


forgive me bad english....

kieranatwork
03-31-2001, 05:43 AM
This doesn't sound all that useful if it just exports the 3ds file as a display list.
How can you control the contents of a display list once it's been imported?
It's a black box.
Say you imported a model of a car (with 4 wheels), how would you control the rotation of each wheel if it's locked away inside a display list?
You really need to import the models as mini scenegraphs, and give the user access to each node. You should also be importing them as vertex arrays, not display lists.
Maybe you've thought of this already, but it doesn't sound like it...

Warrior
03-31-2001, 09:17 PM
me too!! http://www.opengl.org/discussion_boards/ubb/smile.gif

PhireBat
04-01-2001, 02:15 AM
R0X0RS

Count me in!!!

clucches
04-01-2001, 05:08 AM
Originally posted by WhatEver:
Ah yes, I figured it out. My texture name was stored in the 3ds file as a tga file.

remember that my program supports only bmp files...

Dingo
04-01-2001, 05:09 AM
Wow! It would be great to have a look at your code.. Im sortof coding a similar project my self, but it would be nice to see how someones has done it.

Count me in!

HFAFiend
04-01-2001, 07:50 AM
count me in too, but I was wondering if it would be too hard for one to convert it into something that can load 3ds models in real time (not make source code)....but anyway, it sounds cool!

hunsoul
04-01-2001, 03:41 PM
Please send me a copy of binary and source. http://www.opengl.org/discussion_boards/ubb/smile.gif

clucches
04-03-2001, 12:30 AM
Originally posted by AHa:
****.. I didn't find it (glut32.dll)

please send it to me! http://www.opengl.org/discussion_boards/ubb/smile.gif


forgive me bad english....

redownload, now you don't need gluts