Jump to content


Photo

Decals with normal maps ?


5 replies to this topic

#1 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 21 October 2015 - 07:35 PM

Can decals have normal/spec maps ? (decals as in patches manually placed on the level)

 

Thanks.



#2 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 22 October 2015 - 03:32 AM

Yes they can. Given a normal map, they can be light-interacting too even if they're translucent.

#3 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2197 posts

Posted 22 October 2015 - 07:20 AM

Wow awesome! That is good to know! :o

Are there already decals with normal maps in use? I would love to see an example screen (or motorsep can do a screenie plz?) :)


"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

#4 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 22 October 2015 - 08:09 AM

That's something I was wondering about too :) (a sample material)

 

I assume it would be regular material with alphaTest. Not really a decal as you know them.



#5 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 22 October 2015 - 09:06 AM

For a translucent light-interacting decal, here's one of our standard cobwebs. It generates a rough normal map and a specular map from the diffuse image:
textures/darkmod/decals/webs/cobweb1
{
  qer_editorimage textures/darkmod/decals/webs/cobweb1_ed
  translucent
  noshadows
  twosided
  nonsolid
  sort 5

  bumpmap heightmap (textures/darkmod/decals/webs/cobweb1, 2)
  diffusemap textures/darkmod/decals/webs/cobweb1
  
  {
    blend specularmap
    map textures/darkmod/decals/webs/cobweb1
    red .25
    green .25
    blue .2
  }
}
You can see it's light-interacting if you wave a lantern round in front of it. Also, it won't glow in the dark like most transparent materials do. The glass crack decals work the same way.

For an alpha-tested version, our ivy pieces are a good example:
textures/darkmod/decals/vegetation/ivy_mixed_pieces
{
  surftype15
  description "foliage"
  noshadows
  nonsolid
  noimpact
  twosided
  qer_editorimage textures/darkmod/decals/vegetation/ivy_mixed_pieces_ed

  {
    blend diffusemap
    map textures/darkmod/decals/vegetation/ivy_mixed_pieces
    alphaTest 0.1
  }

  specularmap textures/darkmod/decals/vegetation/ivy_mixed_pieces_s
  bumpmap textures/darkmod/decals/vegetation/ivy_mixed_pieces_local
} 

  • SeriousToni likes this

#6 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2197 posts

Posted 22 October 2015 - 09:39 AM

Ahhh - the foliage textures, of course!! :laugh:


"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users