logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 ... 11 12 [13]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Enhanced Monster Skins (Read 35656 times)
Dr.Flay™
Senior Member
****
Offline


ChaosUT-333networks

Posts: 374
Location: Kernow, UK
Joined: Dec 9th, 2012
Gender: Male
Re: Enhanced Monster Skins
Reply #180 - May 15th, 2016 at 5:06am
Print Post  
Lightning_Hunter wrote on May 14th, 2016 at 2:48am:
Dr.Flay™ wrote on May 14th, 2016 at 2:22am:
DXT1 does not support alpha channels, only a mask colour.


I am not an expert with DXT1 or anything, so I could be totally wrong here - but isn't there DXT1 with and without support for 1 Alpha Channel?  I created an alpha channel in photoshop with the Warlord skin, and photoshop gave me the option to export as DXT1 with 1 alpha channel.  When I imported this file in UnrealEd 2.1 and saved it as UTX to run in UT99, the Warlord appeared masked just fine.  Maybe I am wrong about the details of why this is, but the point is that it seems to be working fine.  I tried using a color for a masked texture (white, black, etc.), but it did not work.  Only an alpha channel with DXT1 worked!


I looked back through it to refresh myself, and just noticed how borked the wiki page is.
Yes indeed it does have an RGBA option, so I believe my trials had lead me to believe it was better to use DXT3 and 5 for alpha channels due to them being made for it, not forced.
I stick to normal 24bit textures in DXT1 for highest compression ratio and use the others for transparency depending on the type.

From the official doc (better link)
http://www.oldunreal.com/editing/s3tc/ARB_texture_compression.pdf
http://www.oldunreal.com/editing/s3tc/ARB_texture_compression.doc
Quote:
S3TC

Be aware that the enumerated format list is not necessarily the same as the list of supported formats. The main purpose of the format enumeration is to enumerate “normal-looking” formats so that an application can try them out without having any knowledge about specific extensions. This explains why the S3TC format enumeration doesn’t refer to the GL_COMPRESSED_RGBA_S3TC_DXT1_EXT format, which is understood as not being a “normal” RGBA format.


I can't find the guide that explained the difference between DXT-3 and 5, but it made sense finally.
If you use an Alpha channel, it will not have the 8:1 compression, so because with 3 and 5 you don't get the option, it made sense to keep DXT-1 for solid textures or the classic masking.

When you import a masked texture, you must remember to edit the properties and remind it that it is masked, or it won't work.


I also am no expert with DDS/DXT, and from all I have found over the years, there aren't any in the Unreal Universe.
Until recently most people were still reducing to 8bit before importing into UEd for compression.
Actually, most people probably still are.
  
Back to top
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 572
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Enhanced Monster Skins
Reply #181 - May 15th, 2016 at 9:33am
Print Post  
Imho the Wikipedia page explains quite well the different S3TC modes.
https://en.wikipedia.org/wiki/S3_Texture_Compression

The difference between the alpha channel in DXT3 and DXT5 is that, in DXT3 the alpha channel is stored with individual 4 bit per pixel, where as in DXT5 the alpha channel is using a compression.
  

HX on Mod DB. Revision on Steam. Löffels on Patreon.
Back to top
 
IP Logged
 
sn260591
Full Member
***
Offline



Posts: 111
Location: Russia
Joined: Aug 17th, 2011
Gender: Male
Re: Enhanced Monster Skins
Reply #182 - May 15th, 2016 at 4:38pm
Print Post  
han wrote on May 15th, 2016 at 1:53am:
sn260591 wrote on May 14th, 2016 at 9:16am:
If remaining textures will redrawn, then it is necessary to divide actors into groups to avoid problems with performance:

How about a (fixed size) hashtable you fill at runtime?

You can give examples how it is realized in UScript, please?
  

Sorry for my bad English
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 572
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Enhanced Monster Skins
Reply #183 - May 16th, 2016 at 11:05am
Print Post  
I have no example for uc, but it is a common datastructure. For 227 I would use some static array with dynamic arrays inside (if thats possible?). Without dynarray support it gets a bit more tricky, but there are ways around this issue. Like some huge array with hash table entries (enough for all texture replacements) which acts as a pool for the entries. Each of those entry elements have an index to the next hash slot element. Another int array to store the top level indices for the hash slots.

As I'm yet to tired for a proper explainations...
Quote:
// Hash table entry.
struct HashEntry
{
  var int HashNext;
  var Object Key;
  var Whatever Value; // Stored Data.
}

var HashEntry HashPool[512]; // Pool of unused entries.
var int HashPoolNext; // Next free Pool entry.

var int HashTable[32]; // Hash table entry point.

function int Hash( Object Key );  // Creates some hash out of Key and returns values from 0 to ArrayCount(HashTable)-1.

function HashInit()
{
  local int i;
  for ( i=0; i<ArrayCount(HashTable); i++ )
    HashTable[i] = -1;
  PoolNext = 0;
}

function void HashAdd( Object Key, Whatever Value )
{
  local int HashNext, HashKey;
  HashKey = Hash( Key );

  HashNext = HashTable[HashKey];
  if ( HashNext==-1 ) // No top level entry.
  {
     HashPool[HashPoolNext].HashNext = -1;
     HashPool[HashPoolNext].Key = Key;
     HashPool[HashPoolNext].Value = Value;
     HashTable[HashKey] = HashPoolNext++;
     return;
  }
  else
    HashNext = HashPool[HashTable[HashKey]].HashNext;

  // Now recurse into entries linked by HashEntry.HashNext...
  // [...]
}


Hope this is enough to explain my idea.
  

HX on Mod DB. Revision on Steam. Löffels on Patreon.
Back to top
 
IP Logged
 
Lightning_Hunter
Senior Member
****
Offline



Posts: 267
Location: somewhere on Earth
Joined: Mar 4th, 2003
Gender: Male
Re: Enhanced Monster Skins
Reply #184 - May 16th, 2016 at 5:32pm
Print Post  
Keep in mind, I am using UT99 for my primary engine.  I will work on the 227 version after I complete all the skins.  The mutator has to work in both engines.  I say we just stick with the mutator created by sn260591, since I've already edited the script to add all my skins.
  

For High-Res Unreal skins, click here.
Back to top
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 572
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Enhanced Monster Skins
Reply #185 - May 16th, 2016 at 6:39pm
Print Post  
Lightning_Hunter wrote on May 16th, 2016 at 5:32pm:
Keep in mind, I am using UT99 for my primary engine.  I will work on the 227 version after I complete all the skins.  The mutator has to work in both engines. 

I did, thats why 95% off my post was about implementing hash maps without requiring dynarray support.
  

HX on Mod DB. Revision on Steam. Löffels on Patreon.
Back to top
 
IP Logged
 
Lightning_Hunter
Senior Member
****
Offline



Posts: 267
Location: somewhere on Earth
Joined: Mar 4th, 2003
Gender: Male
Re: Enhanced Monster Skins
Reply #186 - May 16th, 2016 at 6:55pm
Print Post  
han wrote on May 16th, 2016 at 6:39pm:
Lightning_Hunter wrote on May 16th, 2016 at 5:32pm:
Keep in mind, I am using UT99 for my primary engine.  I will work on the 227 version after I complete all the skins.  The mutator has to work in both engines. 

I did, thats why 95% off my post was about implementing hash maps without requiring dynarray support.


Ah, well you will have to forgive my ignorance with coding, as I am definitely not a coder!  I misread your post and thought you made that code for 227. Sorry.   Lips Sealed
  

For High-Res Unreal skins, click here.
Back to top
IP Logged
 
Lightning_Hunter
Senior Member
****
Offline



Posts: 267
Location: somewhere on Earth
Joined: Mar 4th, 2003
Gender: Male
Re: Enhanced Monster Skins
Reply #187 - May 18th, 2016 at 1:09am
Print Post  
Just for reference, I have moved this discussion to an official project thread here:
http://www.oldunreal.com/cgi-bin/yabb2/YaBB.pl?num=1463427961

All new project development will be there instead. sn260591, I asked you a question in the new thread. Smiley
  

For High-Res Unreal skins, click here.
Back to top
IP Logged
 
Page Index Toggle Pages: 1 ... 11 12 [13] 
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo