Castleations!

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Sep 17, 2004 at 17:53

04-09-17.thm.jpg

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!

7 Replies

Please log in or register to post a reply.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Sep 17, 2004 at 18:08

looks good… except for those gaps in the sky. that needs to be fixed. otherwise… neat

7543b5c50738e23b200e69fe697ea85a
0
NomadRock 101 Sep 18, 2004 at 07:12

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.

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Sep 18, 2004 at 08:38

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..

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Sep 18, 2004 at 17:20

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
065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Sep 18, 2004 at 18:17

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.

water.jpg

760a6f5fe0bf771163e05e808716020b
0
NeZbiE 101 Sep 19, 2004 at 15:34

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.
-smooth shading for water

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

Are you loading/generating your landscape? If you post your interpolation code, I’m sure I could help.

065f0635a4c94d685583c20132a4559d
0
Ed_Mack 101 Sep 20, 2004 at 03:48

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