Page 1 of 2

3d graphics repository

Posted: 31 Oct 2007 09:03
by exe
Hello. How about creating 3d TT graphics directly on a wiki?
http://sharpttd.top100.net.pl/wiki/inde ... stries.xml
The data can be downloaded to the (not much existant) game automatically with one click. On other pages of wiki there is also the rest of data files. After uploading all the dummy models, they could be improved gradually. It's easy to run free Wings3d modeler, improve a model, and upload it back, and it's even easier with textures. With a small custom .3ds viewer one could see how industries completed from the parts, and also other models, look in the game.

Are there any low poly TT models created already? Where?

Re: 3d graphics repository

Posted: 01 Nov 2007 14:33
by Zephyris
I replied to your othere thread, but I'll put it here as well!

I am very interested in this idea, and 3D models and textures are something I think I can contribute greatly to. I am very willing to make a complete set of both models and textures, however:
It is only worth spending lots of time on graphics and models if its going to happen, how committed are you? :)
What are the specifications of all the models and graphics? ie. file type, scale and polygons/file type and resolution?
What features does the 3D engine support? alpha texures/bump+normal mapping/specualrity/shadowing?
I really want to play OpenTTD in 3D, not a similar game or remote branch - are you aiming to develop this in trunk-acceptable bitesize chunks? I can imagine this would be a lot of work...

I don't mean to put you off because I would love to see this happen, but there are lots of important questions!

Re: 3d graphics repository

Posted: 01 Nov 2007 15:12
by exe
Zephyris wrote: I really want to play OpenTTD in 3D, not a similar game or remote branch - are you aiming to develop this in trunk-acceptable bitesize chunks? I can imagine this would be a lot of work...
Really sorry if that was confusing, but it IS a "similar game or remote branch", in C# :(
Openttd has gui and viewport linked very tightly, i'm not sure if it's ever possible to split everything.
Technically another option would be using SharpTTD gui, SharpTTD 3d viewport, and as a backend OpenTTD linked in using C++/CLI, but that would be hard too.

Re: 3d graphics repository

Posted: 01 Nov 2007 15:29
by Zephyris
Oh well :( my ultimate dream would be OpenTTD in 3D. I would still like to help if I can though, do you have any answers to my other questions?

Re: 3d graphics repository

Posted: 02 Nov 2007 02:53
by exe
On the other thread:
exe wrote: 3D models created from TTD graphics is something so basic and obvious that it just can't get lost or be wasted. And on MIT license they can be used for anything.

Models should be really low poly, so it is possible to view massive parts of map. And the texturing should look quite like the original. One map square is one unit in modeller. 3ds files can be imported and exported anywhere including Wings3d, but they can lose some info.

However SharpTTD is not a 3d renderer for OpenTTD, but a totally different game. 3d rendering is just very small part of it. I wouldn't trust this game before I could play it - build some signalled rail routes between industries and earn money, save and load. (to done this year?)

So models are needed anyway right now, at least the dummy ones.
Textures should be .png, and with power of two dimensions (512?). 3d is drawn using http://en.wikipedia.org/wiki/Irrlicht_Engine

Re: 3d graphics repository

Posted: 05 Nov 2007 10:22
by Zephyris
Another thing you might want to consider is working with the simutrans engine, I think the code is better separated into graphics and engine chunks...

Re: 3d graphics repository

Posted: 07 Nov 2007 17:51
by Zephyris
Attatched are some generic textures (good placeholders) and a selection of low poly .obj s, some houses and oil refinery components.

Re: 3d graphics repository

Posted: 08 Nov 2007 02:52
by exe
Zephyris wrote:Attatched are some generic textures (good placeholders) and a selection of low poly .obj s, some houses and oil refinery components.
Looking good!
a) Instead of ground polygon, just a tile texture specified in the data file should be enough.
b) Scale seems to be 2.5, not 1.0.
c) No uv texture maps yet, and all polygons have backfaces.

I didn't know there is a 3d editor by Google.

Currently I'm doing pathfinding, next it will be downloading data from wiki to the game, and a model previewer tool.

Re: 3d graphics repository

Posted: 08 Nov 2007 10:09
by Zephyris
So 3D requirements are:
- No base polygon
- No backfaces
- Tile width = 1
- UV mapped

Some more questions:
- Where should the origin be, I currently use on corner of the tile...
- Why UV mapped? For this type of project I am supprised this is the most efficient way of texturing, a huge number of textures may be reused on different buildings - a massive saving in memory usage: 10 houses, all have brick walls with windows and tiled roofs... 2 generic 256x256 textures, or 10 UV mapped 512x512 textures?

Re: 3d graphics repository

Posted: 08 Nov 2007 12:52
by exe
- Yes, it should be corner of the tile.
- Sure, textures can be reused. I was thinking "textured at all".

Re: 3d graphics repository

Posted: 08 Nov 2007 15:23
by Zephyris
Should the textures be provided applied to the model, or provided separately? Because I'm not working directly with .obj i'm not sure how the images are handled...
See attached for example textures.

Re: 3d graphics repository

Posted: 08 Nov 2007 18:00
by exe
Those textures are really good!!

Textures should be simply applied to the model. If it would be needed to change them later, then it is still possible.

Try this: http://sharpttd.top100.net.pl/wiki/inde ... =3d_viewer (1.1 MB)
The model should load with all its textures just by double click on the .obj or .3ds file.

I don't know what the lighting should be - currently it is disabled.

Re: 3d graphics repository

Posted: 08 Nov 2007 20:02
by Zephyris
I'm stuck with texturing, I want to get the 512 pixel textures to exactly fit the 1 unit model, mapped via a cube, any ideas?

Re: 3d graphics repository

Posted: 09 Nov 2007 01:22
by exe
Zephyris wrote:I'm stuck with texturing, I want to get the 512 pixel textures to exactly fit the 1 unit model, mapped via a cube, any ideas?
That depends on the modeler used. I would apply material per-face, and then use planar mapping. Or if there is no simple planar mapping then I would try to manually uv unwrap that faces.

BTW: Now there is batching in 3d renderer, and it's possible to render somewhere between 128x256 and 256x256 map tiles (with buildings, trees) on the screen at once with decent fps.

Re: 3d graphics repository

Posted: 14 Nov 2007 13:18
by mikael
Really nice ideas and work exe! Have played OTTD for a while now and the original game in the 90's. I tried your 3d viewer and it runned smoothly on my computer, have you another version that can download 3d objects from the wiki yet? Really want to test that when it's available!

Keep it up man!

Re: 3d graphics repository

Posted: 14 Nov 2007 17:46
by Zephyris
It should look awesome, but the problem, as always, is time...

I am setting up a set of models based on a 0.125 unit subgrid (ie. 1/8 ths) and a set of textures that can be subdivided into 1/8 ths without cutting through a window, etc. This way simple planar mapping onto the walls, at a scale of 512 pixels per model unit, will look good, and the textures can be quickly reused on any model. However, I'm stuck with the scaling...

Re: 3d graphics repository

Posted: 20 Nov 2007 02:38
by exe
Any progress with the models and texturing?
Perhaps the precise adjustment and scaling of textures uv on the walls needs to be done more manually on each model.

And there is a question whether models should be remade identical to the original graphics (like on the wiki, part-by-part) or just approximately? Doing identical models could be easier.

Image
256x256 map

Re: 3d graphics repository

Posted: 20 Nov 2007 07:58
by Zephyris
The issue (as always) is time! Real life is taking over at the moment...

Re: 3d graphics repository

Posted: 20 Nov 2007 11:39
by humdingerx
Oh my gosh! It is my dream to play OpenTTD in 3D as well :) That last picture looks nice! I hope some time you get some free time and can make it!

Re: 3d graphics repository

Posted: 21 Nov 2007 11:45
by mikael
Looks very promising! I like the idea to begin with dummies of each object, make it work, and then bit for bit replacing the 3d objects with real and stunning graphics!