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

Author Topic: [] Decal questions  (Read 832 times)

Legacy

  • General Accounts
  • *
  • Posts: 117
    • View Profile
[] Decal questions
« on: Oct 03, 12, 08:33:38 AM »

Hi, I've got two questions concerning decals:

1. If I apply a sample decal from HSL like this:

Code: [Select]
//TEST: decal test
    CreateKeyValueSpec( "TestDecal", "" )
    AddKeyValueSpec( "TestDecal", "diffuse = string,/Textures/Gravel_Ground_2.dds" )
    AddKeyValueSpec( "TestDecal", "normalMap = string,null.dds" )
    AddKeyValueSpec( "TestDecal", "heightMap = string,null.dds" )
    AddKeyValueSpec( "TestDecal", "tileCount = integer,4" )
    AddKeyValueSpec( "TestDecal", "spacing = float,0.25" )
    AddKeyValueSpec( "TestDecal", "decalSize = gaussian,1" )
    AddKeyValueSpec( "TestDecal", "decalRotation = gaussian,0" )
    AddKeyValueSpec( "TestDecal", "killTime = gaussian,1000000" )
    AddKeyValueSpec( "TestDecal", "killWhileVisible = boolean,false" )
   
    data as ID = GetKeyValueSpecDefaultData( "TestDecal" )
    decalID as Integer = CreateDecal( data, instance.GetPosition(), "0,-1,0", "0,1,0", false )

I got only single-colored block on the ground. The color changes when I change the input diffuse texture and it matches its corner color. What am I doing wrong?

2. How does one create ever-lasting decals? I need some sort of never-disappearing decals for my purpose. It it possible? Setting killTime to -1 seems not to work...

Thank you
« Last Edit: Oct 26, 12, 01:48:00 PM by HE-Cooper »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Decal questions
« Reply #1 on: Oct 03, 12, 02:22:59 PM »

I don't know about q #1, but for your second one, we were in a similar predicament when we were going to try to use decals.  We could not find a good way to make them permanent, so in the end, we decided to use billboards instead.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Decal questions
« Reply #2 on: Oct 03, 12, 07:22:08 PM »

I don't know about q #1, but for your second one, we were in a similar predicament when we were going to try to use decals.  We could not find a good way to make them permanent, so in the end, we decided to use billboards instead.

Did you use billboards for stuff like graffiti on walls etc?

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Decal questions
« Reply #3 on: Oct 03, 12, 08:13:43 PM »

Not so much graffiti, but we have a board that we place cards onto and are using billboards for the cards.  You could use billboards for graffiti-type things, but if it is something that is permanent, you may wish to put that into the models' textures.

For something which is tagged in real-time in the game, perhaps it does not need to be permanent.  For instance, typically bullet holes fade out, so the tagging could as well.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.