# Castleations!

7 replies to this topic

### #1Ed Mack

Senior Member

• Members
• 1239 posts

Posted 17 September 2004 - 05:53 PM

Description
From over the previous summer, my first real attempt at a 3dMax .3ds file importer and renderer, with a silly cloud renderer. Simply it's a skybox, with a large amount of billboarded cloud sprites, and some Max objects loaded with a oneliner.

From a technical point of view, it is of course pitiful, but hopefully you can cast your mind back to those days when you were simply pleased when your tga image loading code worked hehe. Probably the hardest bit of it all is my castle which I painstakingly placed through moving walls and towers untill it all sitted on the right place.

Anyway, show and tell!

### #2anubis

Senior Member

• Members
• 2225 posts

Posted 17 September 2004 - 06:08 PM

looks good... except for those gaps in the sky. that needs to be fixed. otherwise... neat
If Prolog is the answer, what is the question ?

Senior Member

• Members
• 785 posts

Posted 18 September 2004 - 07:12 AM

You can fix the seams by fixing your texture options. It has to do with texture blending and whether or not it can go over the [0,1] boundaries. I forget now, but I bet you are good enough to look it up.
Jesse Coyle

### #4Ed Mack

Senior Member

• Members
• 1239 posts

Posted 18 September 2004 - 08:38 AM

I read about the border problem on Flipcode, but forgot completely about it. Previous to that I scrutinised my tga loading code sure there was a problem with it :(

I think I shall look it up..

### #5Dia

DevMaster Staff

• 1120 posts

Posted 18 September 2004 - 05:20 PM

you need to use GL_CLAMP_TO_EDGE to get rid of the seams:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);


If you have old ogl headers, it might not be defined, but here's its #define:

#ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F
#endif


### #6Ed Mack

Senior Member

• Members
• 1239 posts

Posted 18 September 2004 - 06:17 PM

Aww, it worked! Thank you so much!

Here's the same engine running a navier stokes water solver (to low res) and a real-time deformable landscape (there's a bug in the height interpolation, I know). And, no seams! Thank you! That's annoyed me for a long time.

### #7NeZbiE

Member

• Members
• 61 posts

Posted 19 September 2004 - 03:34 PM

Looking pretty good there.
Some things you might want to try
-See if you can add detail/multitexturing for the landscape, as that makes a lot of difference in scene quality. It's a lot easier than it sounds.

Some triangle strips in your reflection rendering (are you using 2 pass rendering over an axis?) arn't shown.

### #8Ed Mack

Senior Member

• Members
• 1239 posts

Posted 20 September 2004 - 03:48 AM

It's old code, I'm not going to improve anymore. But thanks for the suggestions :)

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users