Iris2.de

Iris2-Forum
It is currently Sun Oct 25, 2020 3:01 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Oct 18, 2007 10:33 pm 
Offline

Joined: Thu Oct 18, 2007 10:30 pm
Posts: 5
I've been trying to figure this out for a few days now, hopefully someone in this forum can help me out. I'm trying to figure out how the 2D UO client implements uneven terrain. I believe Iris used to have a 2D client, so I'm assuming the developers figured this out. I would greatly appreciate some information on how this is done.

I'm trying to create my own isometric terrain engine, and I really liked the way UO's 2D client had uneven terrain, it made it look much more realistic. I'd love to be able to include this feature in my engine, I just can't figure out how they did it.

Thank you in advance for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 1:02 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
to try the 2d client, use the last stable iris version and switch with Z or so (see readme)

the trick we use for elevations is stretching the ground tiles, even in 2d mode. you basically need to draw textured polygons instead of sprites. this can be tricky depending on the lib you use, since it is rather a 3d technique "misused" for 2d.

an alternative would be to make "ramp" tiles, but you'll need lots of extra graphics (ramps in 8 directions, and possibly in multiple vertical angles) , and you have to place them, so that might be even more difficult, and it won't lend itself well to create uneven terrain.

good luck !


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 2:24 pm 
Offline

Joined: Thu Oct 18, 2007 10:30 pm
Posts: 5
Thank you very much for your reply. I was thinking of some ways to do it with textured polygons in OpenGL. It did seem easier to "cheat" by using 3D to draw the terrain.

Do you know if this is how the official UO client did it? This is more a curiosity than anything. It looks like I'm going to go the 3D route.

Again, thanks for your reply.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 9:17 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
since the 2d client uses an orthographic cam to draw the terrain, there is no "perspektive depth" involved, so there is no difference between using 3d coordinates for the polygon and using 2d coordinates and calculate the "y += height*some_factor" yourself.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 27, 2007 4:31 pm 
Offline

Joined: Thu Oct 18, 2007 10:30 pm
Posts: 5
I've decided to keep my terrain "2D" using textured quads. Originally I was going to generate a 3D terrain with textured quads and then draw my 2D sprites on top of it. What I'm going to do now is just draw a normal isometric 2D terrain, but offset the vertices on the Y axis according to the height of that particular vertex. This seems like it will be easier to mix with my 2D sprites then going with a full 3D terrain.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group