Author Topic: Inconsistent behaviour with VertexController on plane edge  (Read 2310 times)

Offline altwho

  • byte
  • *
  • Posts: 3
    • View Profile
I'm trying to draw terrain from a heightmap by using a VertexController applied to a plane. I get abnormal behaviour when applying height values to the vertices on the starting edge of a plane.

Screenshots:
Picture 1 (what I want to happen):http://dy.fi/7m0
Picture 2 (the problem):http://dy.fi/3ci

The plane is modified using nearly identical code, by setting a single row of the heightmap to a contain the same value in all of its columns. The only difference is on which row of the heightmap the same height value is. The artifacts in picture 2 only appear when applying height values to the first [quads*2] vertices of the plane. Basically in a nutshell I need the heightmap to apply consistently to all the vertices in the plane.
Sorry if I'm being too brief, but I lost my previous message when the forum logged me out because of the default timeout.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Inconsistent behaviour with VertexController on plane edge
« Reply #1 on: May 29, 2012, 07:56:15 pm »
I'm not sure if i understand the problem correctly...these pictures are very different in viewing angle and pretty low on contrast. Maybe you can draw the wireframe on top!?

Offline altwho

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Inconsistent behaviour with VertexController on plane edge
« Reply #2 on: May 29, 2012, 08:19:04 pm »
Yes, you're probably right about the wireframe  :)
Pictures with the correct behaviour: http://dy.fi/8f2 and overview http://dy.fi/3cl
Pictures with the wrong behaviour: http://dy.fi/3c8 and overview http://dy.fi/3cf

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Inconsistent behaviour with VertexController on plane edge
« Reply #3 on: May 29, 2012, 08:55:09 pm »
...and the correct structure is continuous and the faulty one has gaps is part of the problem...or not?

Offline altwho

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Inconsistent behaviour with VertexController on plane edge
« Reply #4 on: May 29, 2012, 09:04:31 pm »
The gaps are part of the problem.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Inconsistent behaviour with VertexController on plane edge
« Reply #5 on: May 29, 2012, 09:19:18 pm »
I've no idea how you are using the controller and apply the heightmap, so it's hard to find out what's wrong here. I'm not aware of any problem with using the controller, so my first guess would be that your code does something that it shouldn't when applying the actual height. A test case would be helpful...