Author Topic: Procedural textures  (Read 1239 times)

Offline iagofg

  • byte
  • *
  • Posts: 12
    • View Profile
Procedural textures
« on: July 13, 2011, 08:57:55 pm »
I'm trying to make procedural textures. Can I made it in jPCT-AE?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Procedural textures
« Reply #1 on: July 13, 2011, 09:08:06 pm »
I'm not sure, what exactly you mean...you want to generate textures based on some formula?

Offline iagofg

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Procedural textures
« Reply #2 on: July 14, 2011, 07:29:11 pm »
Yes, for example Plasmas, water, patches to textures, and so on.

I've seen after posting ITextureEffect. Maybe I can use that?? Is it the best choice?

The effect is applied every frame automatically? or Must I call to applyEffect every frame I want to redraw it?

Danke schön!

refs.
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/ITextureEffect.html
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#applyEffect()

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Procedural textures
« Reply #3 on: July 14, 2011, 08:39:28 pm »
Yes, that's what it's meant for. If you want to change the texture every frame, you have to apply the effect every frame...but i don't recommend to do that, because it requires a new texture upload every frame, which is costly, especially with mip-mapping being enabled on that texture.