HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Texture Banks, Layers question  (Read 2225 times)

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Texture Banks, Layers question
« on: Sep 09, 15, 02:50:32 PM »

I have been working on texture banks and such. It appears that you can only have 2 layers in a material, is this true? If so, does this mean on a player character you can have a skin layer, then a layer for something like tattoos?
And does this mean you can't have a third layer for dirt and grime?

Also, would pieces work so you can turn on and off each tattoo separately? I am trying to get the overall design concepts here, and am a bit confused about the "pieces" for textures. :)
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Texture Banks, Layers question
« Reply #1 on: Sep 09, 15, 07:17:53 PM »

In the current model (base_female), there are some parts that have only 2 texture banks, while other parts do have 4 texture banks.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Texture Banks, Layers question
« Reply #2 on: Sep 10, 15, 11:03:11 AM »

Yes, but within each one, you are currently only able to specify two layers.  The "pieces" are the list of things that can be selected for each layer - generally containing some textures and some palette information.  So no, you wouldn't be able to use pieces to have mutltiple, individually-toggled tattoos within the same material on a character part.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Texture Banks, Layers question
« Reply #3 on: Sep 10, 15, 11:38:57 AM »

Thanks guys. Sarrene was helpful on Skype as well. She clarified to me that texture banks and tinting were two different things. She also said there might be a way to use the Decal system for characters.

So, pieces are the textures you choose from for a layer, and only one piece per layer can be active at one time. And only two layers per material. So, you could have a base skin layer then a layer for tattoos, make-up, etc, but you would only be able to use one of those options?

If that is the case, then I could make several copies of the base skin mesh, and apply a different material to each, then let the player choose a base skin/mesh for some of the customization, and a second layer for the other half of the customization. I know this would add to the resource usage and overhead but seems like it would work.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Texture Banks, Layers question
« Reply #4 on: Sep 10, 15, 08:29:13 PM »

I have made 3 textures for my base character, following the Human Female example that is included with HE.
Here is my .dtb file:
Code: [Select]
!
! Texture bank definition
!
[Root]
Character\Dynamic_2\TextureBanks\s_hum_male_base\

[Layout]
-Base Skin


[Layers]
{Base Skin}
   Type=Skin
   Region=(0,0,1023,1023)
   {Settings}
     Palette1=Skin,SkinBlend.dds     
   {Files}
     (1024,1024)
     s_hum_male_1_d.dds
     s_hum_male_head_brown_d.dds
     s_hum_male_head_red_d.dds
     s_hum_male_1_n.dds
     s_hum_male_1_n.dds
     s_hum_male_1_n.dds   
   {Pieces}
      (Diffuse)
        Blends=3
         Human Caucasian
           DefaultBlend=0
         Human African
           DefaultBlend=1
         Human Asian
           DefaultBlend=0
     (Normal)
        Blends=3
         Human Caucasian Normal
           DefaultBlend=1
         Human African Normal
           DefaultBlend=0
         Human Asian Normal
           DefaultBlend=0

So far it has no effect in the engine, so what is the next step? Also, in the Wiki under the section for Parts Files http://wiki.heroengine.com/wiki/Technical:Parts_Files#Banks it says to include used texture banks:
 Banks

In this section, specify all texture banks used by the parts in this .par file. This is so that HSL scripts that work with part files are guaranteed to have access to these before any parts are selected that use them.

Exanple code from the wiki:
Code: [Select]
! bang to comment line
! Human Parts definition file
!
[Root]
Character\Dynamic\Human\Female\

[Slots]
!
! The slots are the areas defined for the Human in which various parts can go
!
Hair Base
   Keyword=name:Base;type:hair;hasIncludes:no;path:hair;order:1;
Hair Bangs
   Keyword=name:Bangs;type:hair;hasIncludes:no;path:hair;order:2;
   % onif(Hair Base)
   % LODoff(6)
Helmet
   Keyword=name:Hat/Helmet;main:headwear;type:clothing;
   % hides(Hat)
Head
Torso
Left Arm
Right Arm
Waist
Left Leg
Right Leg

[Divisions]
Hair: Hair Base,Hair Bangs
Head: Head,Helmet
Upper Body: Torso,Left Arm,Right Arm
Lower Body: Waist,Left Leg,Right Leg

[Parts]
!
! Slot: Part, Mesh file
!
Hair Base: Empty,empty
Hair Base: Bowl,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_bowl.hgm
   % hides(Hair Bangs)
Hair Base: Medium,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_medium.hgm
   % hides(Hair Bangs)
Hair Base: Mop,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_mop.hgm
   % hides(Hair Bangs)
Hair Base: Wiry,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_wiry.hgm
   % substitutes(Hair Bangs:Parted Long,empty)
Hair Base: Bobbed,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_bobbed.hgm
Hair Base: Flip,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_flip.hgm
Hair Base: Cropped,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_cropped.hgm
Hair Base: Long,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_long.hgm
Hair Base: Short,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_short.hgm
Hair Base: Spiked,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_spiked.hgm
Hair Base: Cornrows,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_cornrows.hgm
   % substitutes(Hair Bangs:Parted Long,empty)
Hair Base: Wavy,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_wavy.hgm
Hair Base: Half Tied,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_halftied.hgm
Hair Base: Tied Up,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_tiedup.hgm
Hair Base: Double Tied,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_doubletied.hgm

Hair Bangs: Empty,empty
Hair Bangs: Curved,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_curved.hgm
Hair Bangs: Parted,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_parted.hgm
Hair Bangs: Parted Long,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_parted_long.hgm
Hair Bangs: Split,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_split.hgm

Helmet: Empty,empty
Helmet: Round Dome,Character\Dynamic\Human\Shared_Geometry\Helmet\helmet_round_dome.hgm
   % hides(Hair Bangs)
   % substitutes(Hair Base:Wiry,Cropped)
   % substitutes(Hair Base:Short,Cropped)
   % substitutes(Hair Base:Mop,Cropped)
   % substitutes(Hair Base:Spiked,Cropped)
   % substitutes(Hair Base:Bobbed,Cropped)
   % substitutes(Hair Base:Medium,Cropped)
   % substitutes(Hair Base:Flip,Cropped)
   % substitutes(Hair Base:Wavy,Cropped)
   % substitutes(Hair Base:Half Tied,Cropped)
   % substitutes(Hair Base:Bowl,Cropped)

Head: FaceGen,head_whole_facegen.hgm

Torso: Bare,torso_bare.hgm
   Keyword=default

Upper Right Arm: Bare,arm_ur_bare.hgm

Lower Right Arm: Bare,arm_lr_bare.hgm
   % LODSubstitutes(3,LoResBare)
Lower Right Arm: LoResBare(alternate),arm_lr_bare_lowres.hgm
   Keyword=lores

Waist: Pants,legs_pants_default.hgm
   Keyword=default

Lower Right Leg: Bare,leg_lr_bare.hgm
  Keyword=footwear

Lower Left Leg: Bare,leg_ll_bare.hgm
  Keyword=footwear

[Banks]
female_base_upper_body
female_base_lower_body
hair
female_head

It has Banks right near the bottom. In the part files included with HE (humanlike_female.par) it doesn't have Banks. Again, what gives? Any help is, as always, appreciated. :)
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Texture Banks, Layers question
« Reply #5 on: Sep 11, 15, 02:29:09 PM »

I have tried several edits to my files, and still can't seem to get my skin blends to work in the Character Manager in HE. I've tried examples from the Sunok, Monkeytok, Female (Head and Base Body), etc. as well as spending hours on the Wiki and can't figure out what the problem is.

I have also broken my character into 2 pieces, head and body, with a texture bank for each set up. Any ideas?

Edit: After more experimenting, it looks like my .dtb files aren't even being read and the default texture I set in Max is being applied. And the next question is "Did you name the material ~dtb_blahblah", and the answer is yes, yes I did! I created the texture bank folder, the dtb, etc. and I am beginning to wonder if this has to do with my Export errors, perhaps not including a vital piece of data to connect the model to the dtb.
« Last Edit: Sep 11, 15, 09:22:01 PM by Amarak »
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Texture Banks, Layers question
« Reply #6 on: Sep 12, 15, 10:41:07 PM »

I have finally tracked down the problem with my dynamic textures. This was all caused by a simple mistake, and I quote me saying this:
And the next question is "Did you name the material ~dtb_blahblah", and the answer is yes, yes I did! I created the texture bank folder, the dtb, etc. and I am beginning to wonder if this has to do with my Export errors, perhaps not including a vital piece of data to connect the model to the dtb.

And therein lies the problem, I named the materials ~dtb instead of ~dt2 !!
Such a small, simple little oversight causing so much trouble.  :-[

Logged