Author Topic: Smoothness of 3D objects  (Read 7089 times)

0 Members and 1 Guest are viewing this topic.

johney_red

  • Associate
  • Posts: 5
Smoothness of 3D objects
« on: September 14, 2010, 06:14:12 PM »
Hi,
I'm noob in 3D programming world, but I want to learn. When I load model, model doesn't  have sharp edges, example is cube: if cube is static in scene, the cube edges are no smooth. How I can accomplish  that my models have smooth edges? I should write shaders with GLSL library? I just need sign in witch direction I should go on... thank you in advance.

Best Regards

JeGX

  • Global Moderator
  • Capo Crimine
  • *****
  • Posts: 2385
    • oZone3D.Net
Re: Smoothness of 3D objects
« Reply #1 on: September 14, 2010, 07:34:59 PM »
Hi,
I'm noob in 3D programming world, but I want to learn.
GeeXLab is the perfect tool for learning 3D  :mrgreen:


Hi,
I'm noob in 3D programming world, but I want to learn. When I load model, model doesn't  have sharp edges, example is cube: if cube is static in scene, the cube edges are no smooth.
How I can accomplish  that my models have smooth edges?
The best way to get smooth edges is to use a model with smooth edges like the one in the OBJ demo in the code sample pack. You need a modeling tool to create such a model.

You can also try to tweak vertex normals. For that you need several normals per vertex. But this technique is more difficult.

johney_red

  • Associate
  • Posts: 5
Re: Smoothness of 3D objects
« Reply #2 on: September 14, 2010, 09:48:00 PM »
Thank you for fast answer!!! GeeXLab is great engine, I know that :thumbup:
I try to load model with more polygons and result is like on the picture below.
Every obj I load give me outside edges like on picture.
I believe that is render responsible for this.
Can I fix it some how?


JeGX

  • Global Moderator
  • Capo Crimine
  • *****
  • Posts: 2385
    • oZone3D.Net
Re: Smoothness of 3D objects
« Reply #3 on: September 15, 2010, 01:07:56 PM »
Aahhhh... we don't talk about the same thing....

Your problem is AA: Anti-Aliasing. To enable anti-aliasing in the free version of GXL, you have to edit the config.gxml file in GeeXlab folder and set the msaa element to 4, 8 or 16.

Code: [Select]
msaa="16"

I just tested on my laptop and only 16X MSAA seems to work.

If you don't want to use hardware anti-aliasing, you can also use a post pocessing filter to blur the final image:
http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/






johney_red

  • Associate
  • Posts: 5
Re: Smoothness of 3D objects
« Reply #4 on: September 15, 2010, 06:36:23 PM »
Ha ha  :punk:

my question was wrong, but you wind solution anyway..

Thank you wizard  :ryu: JeGX