OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Near-uniform tessellation of a concave polygon for heightmaps


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Kanpachi
Newbie


Joined: 19 Apr 2017
Posts: 2

PostPosted: Wed Apr 19, 2017 12:13 pm    Post subject:
Near-uniform tessellation of a concave polygon for heightmaps
Reply with quote

I am given the contour/boundary of a concave polygon which cannot have holes, and I need to apply a heightmap to it. To this end, I need to perform a near-uniform tessellation of the polygon to generate a mesh.

A picture would be worth a thousand words here, but alas, I don't have 2 posts yet. Razz

How can I perform this tessellation? Ideally, the solution could parameterize the 'resolution' of the vertices to adjust the detail of the mesh.

If this is somehow possible using OSG's built-in tessellation library that would be ideal, but I'm open to introducing an additional (hopefully lightweight) dependency if necessary.

Thanks!
Back to top
View user's profile Send private message
Kanpachi
Newbie


Joined: 19 Apr 2017
Posts: 2

PostPosted: Thu Apr 20, 2017 5:43 pm    Post subject:
Reply with quote

This didn't attract much interest, but for posterity, I achieved results I am fairly happy with using the difficult-to-Google Triangle library by a fellow named Jonathan Shewchuk. I'd post a direct link but I'm still not allowed Smile
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 300

PostPosted: Sat Apr 22, 2017 3:28 pm    Post subject:
Re: Near-uniform tessellation of a concave polygon for heightmaps
Reply with quote

Hi
I think nobody respond because there multiple path for it
Your problem can be split in two:
1)tesselation
2)real (not screen space) displacement mapping

1)Tesselation
-osgUtil::Tesselator
-or Tesselation Shader

2)Real Displacement mapping
For this step You must be sure of your level of understanding of OpenGL(and osg) because you'll have to use transformfeedback
Todo so you'll have to draw your vertices as points, displace them according your heightmap texture (in VS) and store them is a buffer for future use (in GS)
(The Transformfeedback spec says theres no garanty to indices stay the same but in practice i never saw mess in GS ouput sequence)

Cheers



Kanpachi wrote:
I am given the contour/boundary of a concave polygon which cannot have holes, and I need to apply a heightmap to it. To this end, I need to perform a near-uniform tessellation of the polygon to generate a mesh.

A picture would be worth a thousand words here, but alas, I don't have 2 posts yet. Razz

How can I perform this tessellation? Ideally, the solution could parameterize the 'resolution' of the vertices to adjust the detail of the mesh.

If this is somehow possible using OSG's built-in tessellation library that would be ideal, but I'm open to introducing an additional (hopefully lightweight) dependency if necessary.

Thanks!


Last edited by mp3butcher (Julien Valentin) on Sat Apr 22, 2017 9:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 300

PostPosted: Sat Apr 22, 2017 9:55 pm    Post subject:
Re: Near-uniform tessellation of a concave polygon for heightmaps
Reply with quote

mp3butcher wrote:
Hi
I think nobody respond because there multiple path for it
Your problem can be split in two:
1)tesselation
2)real (not screen space) displacement mapping

1)Tesselation
-osgUtil::Tesselator
-Tesselation Shader

2)Real Displacement mapping
For this step You must be sure of your level of understanding of OpenGL(and osg) because you'll have to use transformfeedback
Todo so you'll have to draw your vertices as points, displace them according your heightmap texture (in VS) and store them in a buffer for future use (in GS)
(The Transformfeedback spec says theres no garanty that indices remain the same but in practice i never saw mess in GS output sequence)

Cheers



Kanpachi wrote:
I am given the contour/boundary of a concave polygon which cannot have holes, and I need to apply a heightmap to it. To this end, I need to perform a near-uniform tessellation of the polygon to generate a mesh.

A picture would be worth a thousand words here, but alas, I don't have 2 posts yet. Razz

How can I perform this tessellation? Ideally, the solution could parameterize the 'resolution' of the vertices to adjust the detail of the mesh.

If this is somehow possible using OSG's built-in tessellation library that would be ideal, but I'm open to introducing an additional (hopefully lightweight) dependency if necessary.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Polygon Rendering bhanu406 General 1 Thu Mar 16, 2017 9:18 am View latest post
No new posts uniform buffers for transform stack a... Gedalia Pasternak General 0 Mon Mar 13, 2017 3:17 pm View latest post
No new posts Glsl structs and osg::Uniform. How? Steal General 3 Thu Jan 26, 2017 12:04 pm View latest post
No new posts Draw open polygon Bruno Oliveira General 2 Thu Nov 17, 2016 10:11 am View latest post
No new posts Polygon offset for line geometries, Z... raymon General 1 Thu Jul 14, 2016 11:05 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP