Jump to content


Castleations!


7 replies to this topic

#1 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 17 September 2004 - 05:53 PM

Posted Image

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!

#2 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 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 ?

#3 NomadRock

    Senior Member

  • Members
  • PipPipPipPip
  • 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

#4 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 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..

#5 Dia

    DevMaster Staff

  • Administrators
  • 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


#6 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 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.

Posted Image

#7 NeZbiE

    Member

  • Members
  • PipPip
  • 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.
-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.

#8 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 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