PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Sun Sep 24, 2017 7:19 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Interface to sector element detail textures.
PostPosted: Thu Aug 24, 2006 8:13 am 
Offline

Joined: Tue Aug 01, 2006 7:32 pm
Posts: 31
Looking through plug-in SDK, I looked through the Sector classes for interfaces to access which textures are used on a single sector element as well as the UV of those textures. It seems all I have access to is the FINAL blended textures.

Basically I want to export mesh/element/uv information to my own own format so that I can just have the detail textures loaded in my renderer rather than load all the variations of the blended textures as this either sacrafices too much detail or uses up too much texture memory. I'd rather use the GPU power available and work from the detail source.

Any way I can accomplish the above with the sdk?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 24, 2006 8:40 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Yes, thats already possible.

From the sector object to be exported you can get the "texture layer":

Code:
CIPnPTCSectorTextures01* pTextures=Sector.GetSectorTextures();


From this texture layer object, you can get the texture which is applied to one heightmap element (at the position x/y):

Code:
int iTex=pTextures->GetTexture(x,y);


And the UV coordinates at that terrain position:

Code:
PnPTCUV uc=pTextures->GetTextureUV(x,y);


You can get the texture object corresponding to the integer value of iTex by using the method:

Code:
CIPnPTCTexture01* pTex=pTextures->GetTexture(iTex);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 24, 2006 9:56 am 
Offline

Joined: Tue Aug 01, 2006 7:32 pm
Posts: 31
Thanks Ralf, I will give it a shot next week and see how it goes :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron