New 3D Model format

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

New 3D Model format

Post by zuzuf » Wed Dec 06, 2006 5:55 pm

I am going to develop a new 3D Model format with a new texture system. The 3D Model file will contain the texture data as included JPEG files (this makes jpgallegro mandatory, and since there are problems on 64bits systems with this lib I think I will include a restricted version of it as a module). One file for the RGB texture part and one file for the alpha channel if any. All this to allow good looking models, fast to load, which doesn't take too much space, and already optimized for OpenGL! The first thing I will do with this new format is making good looking trees to replace those sprites.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Wed Dec 06, 2006 7:27 pm

And plz think about shaders idea, about adding luminosity to models. And one more think - if we hope that modders will use your new 3D models format - we should at least add support of it to most popular TA 3D modellers, or create our own. I don`t think that it`s an easy thing to do... :roll:

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Wed Dec 06, 2006 7:56 pm

Yes shaders are great to create nice effects but aren't supported by every graphic card so shaders yes but not without a system to draw models the normal way (GLSL is not supported on GeForce 4 class hardware even if it has pixel shading capabilities!!!). For the editor I will create one from scratch, a multi-platform editor which will be able to import models from other editors and to create the textures and all the effects we need. But it will need shader support to work because i want to use a shader based painting tool to put textures on models.

You want to have an idea of what we can make, here are 2 screenshots of 2 of my old projects, I can mix both :D :
Image
Image
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 7:57 pm

Why do you keep digging yourself into allgero more and more, when its clearly a bad choice, its not even that well optomized.

Seriously I'am not tring to make waves here but allgero isn't a smart move, and adding kludgy stuff like allgerogl/jpg ect isn't a smart move. You should be looking at something more proven and reliable such as boost.

I for one have already begun planning stages for dislodging the 'windows' part from allgero/gl/glew, all these 3rd party wrappers when a couple of well written classes would do the same thing.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Wed Dec 06, 2006 8:41 pm

JPGalleg is only a jpeg encoder/decoder which store it's data into Allegro's structures, now it can be separated from Allegro and adapted to whatever we want.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Wed Dec 06, 2006 11:42 pm

Even still, why bother having to decode images, when bmp works just fine? sure it bigger in size but so what with todays hard drives no one is gona miss a few mb.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 12:03 am

of course what are a few mbs ?? nothing on your HD but on a remote server which host thousands of units ?? and worse, for maps, which are sometimes more than 20Mb (I have seen 46Mb for a map!!). If we want to allow modders to do nice things we should give them the tools to do it but we also need to give them an engine which supports nice effects and file formats small enough to allow spreading files over the internet.

With a 128x128 blocs map (32x32 = 1 bloc 256 colors = 1ko) you have a 16Mo file if each bloc is unique, with jpeg class compression you can get 1 bloc 24bits = 1/6Mo and you get a 2.5Mo map!! so you can add more details like a precalculated lighting map, more detailled features, more accurate 3d data (not only a height map).
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Thu Dec 07, 2006 11:41 am

When it comes to models, if done professionally they should be composed of many many many different small textures, not massive bmp's like you are thinking.

The same thing can be done for maps, you don't need to do it like TA does where it has fixed segments that are painted on a landscape, instead you have various textures that make up sand, various textures that make up grass, mud, water, air, ect...its when you use these with effects that gives the glamor look to them, sure some maps may have a few 'extra' textures to them, sure some maps may introduce a few new tree textures/models ect, but that won't push them to 45 mb if they are done correctly.

Its our job not to say 'hey lets make this the smallest possible', but rather the fastest it can be possible without adding shitloads of kludges around the core engine. I'f your going to add these I suggest approaching it from a 'module' point of view, where if the user wants to have jpeg support then they can add the module and the engine would load and use it.

The way I see it now is that with so much crap being added in you are going to push the min specs to run it right out the window to something like a 4 ghz cpu/8 gb ram, 256 mb super kick ass vid card, ect..

Don't get me wrong I'am all for saving space if we can, but not at the added cost of say 5m instructions for decoding 2000 1k jpg's.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 12:48 pm

Of course we won't use 1k jpgs, but if we can use jpg we can use bmp, or tga (better for alpha channel). Since we won't let the choice in the model/map editor it will automatically save as tga for small files and as jpg for big ones for a playable version of the file, because if you edit multiple times a texture saved as jpg you won't get a nice texture but this editor format shouldn't be read by the game engine in order to prevent modders to make big files.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Thu Dec 07, 2006 1:56 pm

Well, of course, we can add visual features later, when really playable version will be ready, Zuzuf iz right, there are should be ability to convert large maps into smaller ones (especially if we add the option of real-time map downloading via lobby server - it`s a big difference to transfer 40 Mb or 2 Mb !!! ).
Maybe even create a converter original maps -> compressed ones, but recompressed a few times Jpegs looks awfull.
Let`s thinks about order of adding features, what we should implement now, and what later. It was long time no releases, people are begining to forget about TA 3D, we should try not to make them wait too long, because it is very cool project! :P

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 4:20 pm

as soon as we can get a windows build, I release a 0.2.4beta1, maybe disabling a few things like networking which is not yet functionnal.

Currently I am working on the 3D model editor which will produce *.3dm files from 3do, asc, ... It's just a program designed to put textures and effects to the model no more, it's not a 3D modeler. I am reusing an old program I made which was designed to do the same thing but with less features (no shaders, ...) so I am using it's interface and base code.
=>;-D Penguin Powered

User avatar
Cire
Moderator
Posts: 350
Joined: Tue Oct 31, 2006 5:59 pm
Location: Somewhere on Earth

Post by Cire » Thu Dec 07, 2006 4:33 pm

Off topic, but have you made any changes to the source code since hmm sunday?

I've been working very hard on it to get it to run well under windows, it now compiles with very few warnings since I started to work on it.

TA3D - 0 error(s), 79 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

But as I said i've made quite a few changes to a few files, and introduced a new include file named 'TA3D_Namespace' both .h/cpp.

I've actually begun to debug the code but its pointelss for me to keep going if changes are going to be overwritten because you have updated code that either i or you will simply overwrite.

I'd like to rewrite the console/taconfig handlers into modern day C++ code, as my next step.

++Cire.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 4:49 pm

yes I made many changes since sunday. But send me your copy and I will merge all changes. I will upload my copy to CVS, you can send me your code when you want (make a zip of files you which have changed with possibly the list of changes.)

You can rewrite the console/taconfig handlers as long as you don't modify the console functions names and taconfig functions because there are a lot of lines of code which are making calls to these modules for translations and to report what happening.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Thu Dec 07, 2006 5:14 pm

Cire :) send me plz your build via E-mail <sk_is(no_spam)mail.ru>

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 5:19 pm

it builds but does it run?? I managed to build it too (an old version) but it crashed when launched.
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Dec 07, 2006 10:10 pm

The 3DMEditor is still not complete, can't save or load *.3dm for now and doesn't support shader yet but it can load *.3do and *.asc files and set some nice surface effects to the model objects. It's still in french but can be easily translated since it use most of the TA3D base classes (so translation classes).

I will also add a texture painter, which means you will be able to paint directly to the selected object, to the selected texture, and objects management functions so your can class your objects the way you want, move them, rename them, ... add points and lines to the model so it can shoot, emit particles, ...

I will also add functions for basic primitives like spheres, cylinders, ...

I still have lot of work here, but I am not there tomorrow so I will see that this week end.

Image
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Fri Dec 08, 2006 6:58 am

Looks really nice :shock: Waiting for news :wink:

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Dec 10, 2006 5:41 pm

MOAR!!! MOAR!!! More screenshots :)
Zuzuf, you are going to university again for a week? Well, till next weekend? :cry:

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 10, 2006 6:56 pm

ok, I have finished the basic part of the editor, it lacks only the shader editing functions and that's all. Until now I managed to make a basic tree:
Image
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests