PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Tue Nov 21, 2017 5:46 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 39 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Tue Jun 30, 2009 11:07 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
should be fixed now; please re-download at http://www.pnp-terraincreator.com/shared/ralf/PnPTCAlphamapTextureExportPlugIn.dll


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Wed Jul 01, 2009 11:42 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
I got the latest version, the exporter works but there is only one xml file exported, nothing else
coveragemap_00000_00000_000.xml

Is that correct?


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Wed Jul 01, 2009 12:12 pm 
Offline

Joined: Fri May 29, 2009 3:50 pm
Posts: 19
I get all the textures and an xml file.

Am I supposed to get a material file?


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Wed Jul 01, 2009 12:36 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
According to the tutorial you cited in your first post, you have to convert this xml file to the appropriate ogre material file.
I'm working on a more elaborated exporter for ogre, which automatically generates the material files and is not restricted in the number of blended textures; but this is not yet released.


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Sun Aug 02, 2009 4:11 pm 
Offline

Joined: Fri May 29, 2009 3:50 pm
Posts: 19
We are still having trouble getting good files out of PNP. We are exporting as .png, but I have tried .dds. The .dds files are all completely black.

Here is a shot of what we are getting. Alpha map 00 looks right but alpha map 01 is completely transparent.


Attachments:
File comment: bad alpha
bad_alpha.jpg
bad_alpha.jpg [ 144.64 KiB | Viewed 316 times ]
Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Sun Aug 02, 2009 6:29 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
Did you export a material file for this terrain? Please post the contents here.

I assume, you only used 7 textures for this terrain. The first 4 are encoded in the RGBA channels of the texture shown in the right part of the image. And the next remaining 3 textures are encoded in the RGB channels of the texture shown in the left part of the image. As there is no eigth texture, the last texture channel (A) remains black.


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Sun Aug 02, 2009 8:46 pm 
Offline

Joined: Fri May 29, 2009 3:50 pm
Posts: 19
I am using 6 textures.

Is the alpha channel for alpha map 01 supposed to be transparent? Since the alpha channel is completely black, it shows up transparent in a viewer.

Seems wrong -

Is the shader supposed to ignore the alpha channel for the second alpha map since there are only six textures? When we load it up in the game - we have huge black areas that seem to correspond with alpha map 01.


Attachments:
coveragemap_00000_00000_000.zip [348 Bytes]
Downloaded 290 times
Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Mon Aug 03, 2009 2:34 pm 
Offline

Joined: Fri May 29, 2009 3:50 pm
Posts: 19
I talked to our lead programmer, who says our problem is probably in the shader, not the textures.

He explained that the alpha channel isn't used the same way it normally is, and these images look right for six textures.

Comments still apreciated in the interest of better understanding...


Top
 Profile  
 
 Post subject: Re: Alphamap Exporter Crashes
PostPosted: Mon Aug 03, 2009 9:26 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
With the settings you used for exporting the alphamaps, every channel (red,green,blue,alpha) of the exported texture file, is one alpha map on its own. So for example, the red channel is the alphamap for grass, the green for sand, the blue for snow, and the alpha channel for rocks.

Using a very basic shader to render the terrain you should render these textures in four render passes. In the first render pass, you select the grass texture and the alphamap texture and use the red channel of the alphamap to control the alpha of the grass texture. In the second pass, you replace the grass texture by the sand texture and use the green channel to control its opacity... and so on... Of course, with modern hardware you can render this in one pass (so this was just meant to make it clear).

Hope this helps


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 39 posts ]  Go to page Previous  1, 2, 3

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