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
uv lightmap
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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.
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.