Engine related question: Multiples surface type per surfaces

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Engine related question: Multiples surface type per surfaces

Post by christianclavet »

Hi.

Have a question concerning the shading capabilty.

I know Irrlicht, could use Lightmaps, Vertex Shading (I think), Bump map, and Normal maps.

Is there a way I could combine 2 surface type in a surface?
Example:

Surface 1
Layer 0 - Color texture (EMT_SOLID)
Layer 1 - Lightmap (EMT_LIGHMAP)
Layer 2 - Bumpmap

More details:
I want to have a building with bricks rendered with a Lightmap (proper shadowing), but also use an Bumpmap for the cracks.

There are 4 layers in Irrlicht textures surface definition, is it possible to blend multiple types?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Even though this may seem difficult to most at first, it is actually quite trivial.

All you have to do is modify the bump mapping pixel shader to do an extra texread from the lightmap texture (Using the lightmaps texcoords) and multiply it with its final output colour.

This should produce the effect you desire.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks Blindside.

Is there a tutorial or some code example somewhere that could help me doing that?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I was going to try to modify Irrlicht's parallax mapper in the source for you to include this, but it is written in ASM not HLSL or GLSL, so maybe someone with some ASM shader experience could help.[/code]
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply