uv lightmap

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
ignorator
Posts: 13
Joined: Fri Sep 21, 2007 1:36 am

uv lightmap

Post by ignorator »

Hi,

i want to calculate the u,v coordinates for a given mesh for lightmapping...

I was looking for a tutorial but i only found tutorials for some sort of 3d modelling software.

greetings
ignorator
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Try IrrEdit. But otherwise, yes, it's the job of 3d modellers.
ignorator
Posts: 13
Joined: Fri Sep 21, 2007 1:36 am

Post by ignorator »

thx... but actually i was looking for a way to calculate them on the fly in my program. but i'm not sure how an unwrapping algorithm might work.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I don't think that it is possible to calculate lightmap UV coords on the fly. You'd have to calculate lightmaps on the fly. Something similar to what irrEdit does (don't know if it is already possible, maybe with some scripting).
It's even not that easy for normal textures. You can use the makePlanarMapping algorithm, or check the sphere scene node for a sphere mapping. But these mappings are pretty basic. You won't get nice results for advanced mesh geometries. You really do noeed an editor in mose cases, because you have to make the mapping for each face. While you can access faces (or better vertices) in Irrlicht, the typical access in Irrlicht is through mesh buffers, i.e. on a sub-mesh level.
Post Reply