Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Still FixSeams...  (Read 755 times)
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« on: May 30, 2008, 01:47:10 PM »

Hi,

I like to/need to come back to the fixseams-problem.
http://www.truevision3d.com/forums/tv3d_sdk_65/fixseams_problem-t17630.0.html;msg120873#msg120873
http://www.truevision3d.com/forums/tv3d_sdk_65/fixseams_fixed-t17826.0.html;msg122251#msg122251

I prepared a small test-project in vb.net 2005:
http://www.ttqv2.de/tmp_tom/tv3d/fixseamstest.zip

It loads two landscapes, which are perfectly fitting together:


On loading of the landscapes, the boundingbox is calculated in Sub CheckBoundingBoxes(land).
Here is the first problem, because the minimum y-value as returned from land.GetBoundingBox() is always 0, which is wrong. To confirm I read the y-values with GetHeightArray().

Then, second problem, I call land(1).FixSeams(land(0)) to adjust the normal-vectors of the edge where the landscapes touches to give a smooth transition.
This is totally ignored, nothing happens, but on the other side of the landscape, the y-values are suddenly flipped up Huh



Is it a bug in FixSeams? Am I wrong somewhere?
I would like to have the edge between the two landscapes in a way smoothened, that it lookes like one big landscape, no visible edges anymore. Since the y-values are ok, so there is no need to adjust altitude-values, it only has to do with the normals, I think.

Best reards,
Tom
« Last Edit: May 30, 2008, 02:14:04 PM by tom_namibia » Logged
newborn
Customers
Community Member
*****
Posts: 2437


WWW
« Reply #1 on: May 30, 2008, 02:46:54 PM »

did you try calling a computenormals after fixing the seams?
Logged

tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #2 on: May 30, 2008, 03:06:07 PM »

yes, makes no difference.
Logged
Lenn
Customers
Community Member
*****
Posts: 454

Ivan Miskelic


« Reply #3 on: May 30, 2008, 08:25:25 PM »

I never tested this but from your screenshot and how you describe it, it looks like the smoothing groups are wrong. It's just like when in max you export a model with two different smoothing groups, the lighting on the edge of those two will be fairly different and it looks like your screenshot, even if the verts are connected - their normals like you say are wrong. So in order for the edge verts to be lighted properly you'd need to know (i assume?) the next triangle to which the vert would be connected to, which obviously belongs to the next landscape, and then set the normal of it according to that. Ummmm... makes any sense?  Undecided

As far as seamless tileable landscapes go, yeah, that would make TV3D so much more valuable if they implemented it. It would be such an easy solution for making huge worlds. Now we have to improvise, and still get slower results than what would be possible if landscapes had no seams.
Logged

tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #4 on: May 31, 2008, 06:39:23 AM »

According to what Sylvian says, it is supposed to work.
At least the normals should be copied.
Unfortunally there is no way to set normals to Landscapes manually until now.
And at least the other side of the landscape should not be destroyed.
And at least Land.BetBoundingBox should not return 0 for the minimin-y.

So its bugs or I'm still doing something wrong Tongue .

Tom
Logged
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #5 on: June 02, 2008, 03:14:27 AM »

Good morning from Windhoek,

its gonna be a warm and sunny autumn day here in Namibia.
Would be so good, if there might be some new informations in this FixSeams-problem... Wink
I'm working on a geographical mapping projct and got somehow stucked because of this.

Best regards,
Tom
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #6 on: June 06, 2008, 03:18:40 PM »

Hello,

I have so many bugs to look ! If you want to help me, could you send to me a sample that reproduces the problem ? Any language will do except Delphi (and APL Wink).
Because I spend most of my time trying to do that and sometimes I can't even reproduce the problem.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #7 on: June 07, 2008, 02:22:13 AM »


I prepared a small test-project in vb.net 2005:
http://www.ttqv2.de/tmp_tom/tv3d/fixseamstest.zip

 Wink
Logged
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #8 on: June 12, 2008, 02:31:10 PM »

Hi Sylvain, could you reproduce the problem with the test-program, any news in this?
Tom
 Wink
Logged
Lenn
Customers
Community Member
*****
Posts: 454

Ivan Miskelic


« Reply #9 on: June 13, 2008, 11:15:47 AM »

Maybe you should repost this in the bugs forum (or bugtracker if it works)
Logged

SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #10 on: June 28, 2008, 04:32:01 PM »

Sorry for the delay

It took a while to see that the problem is really the SetRotation(0,180,0)

Could you try to avoid that ? It actually totally screw up the fixseams algorithm. It only works with rotation = 0,0,0 which is the normal case...

Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #11 on: June 29, 2008, 03:40:59 AM »

Hi Sylvain,

I did the rotation of the landscape, because my textures are generated on the fly out of geografic maps, which are rotated by 180° towards the landscape.
Now I have to rotete the textures on bitmap-level, which takes much more time.
Or is there a fast way, to apply a texture on a landscape with rotation like SetTextureModRotation for meshes?

But otherwise we are one step further. I removed the landscape-rotation and now FixSeams fixes the seams between landscapes with different presision. Very nice!  Smiley

But still the normals are not fine. So the transition between the landscapes is clearly visible. I realized, I should not use ComputeNormals() after FixSeams. Otherwise the normals are the same like before FixSeams.
This Screenshot shows the 2 landscapes after Fixseams. Huh


Here is the sampel updated with no landscape-rotation:
http://www.ttqv2.de/tmp_tom/tv3d/fixseamstestno180.zip

And still GetBoundingBox returns 0 for min_z.

Best regards,
Tom
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks