Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I've decided to make levels as separate files, in order to make it easier to handle the game. Problem is, I'm trying to use Coppercube's lightmapping while making a level. I've tried to save a lightmapped node as an irrLicht XML file, and I can see that it saves two texture coordinates there, for both the main texture and its lightmap. I won't be using this format exactly, but I still need to get both texture and lightmap UV coordinates, and then be able to set them. Getting coordinates with ccbGetMeshBufferVertexTextureCoord() is pointless, because it seemingly returns coordinates of a main texture, so I'm not sure how to get coordinates of a lightmap. Similar problem is present with setting the coordinates. I know there is ccbSetMeshBufferVertexTextureCoord(), but it seems that it sets coordinates for both textures at once. So far, I tried: - Adding more coordinates (ccbSetMeshBufferVertexTextureCoord(node, 0, 0, new vector3d (1.2, 0.8, 0), new vector3d (0.8, 1.2, 0));). Coppercube says that my parameters are wrong; - Setting coordinates as an array of vectors. Not sure how to describe the effect, but it just doesn't work. Is there any way to do this? Am I missing something important and obvious? |
||||
|
I’d recommend baking the lighting directly in Blender. Then you can fine-tune the blending between the color texture and the lighting in a 2D editor, which will give you a better result. That’s assuming I understood your question correctly. |
||||
|
I thought about using Blender's lightmapping before, but it was quite confusing to set up (you know, much more confusing than going "Light mapping -> Calculate!" in Coppercube). But, if there really is no way around, I guess I'll try to find out how to do it. Regardless, thanks for your suggestion, Guest. Will see wether it works out or not. |
||||
|
It’s pretty simple to do in Blender - just go to the Bake section in the render settings and set it up to bake the lighting. There’s plenty of material on how to do it, including YouTube tutorials. The main thing is to make sure your model’s UVs are set up properly. |
||||
|
Yeah, so, that's not happening. Since I rely on some simple texturing, I'll have many UV problems for sure. From what I gathered, it isn't all too simple, at least for me. I'll see if I can manage it though. Still, in case I can't manage this... I have plans of using dynamic lighting, in case everything else fails. Not the best approach, in my opinion. |
||||
|
Yeah, the issue is that the UV layout has to be set up so each polygon is separate on the map - that way baking works correctly. If you’re using a texture atlas and a lot of polygons overlap in the UVs, then baking won’t help you. |
||||
|
|
||||
|
Just so you know, the original color map (the artwork on the texture) was AI-generated. |
||||
|
So, if Blender is of no help here, and Coppercube doesn't allow me to set texture coordinates for the second texture (which is supposed to be the light map)... Well, dynamic lighting it is, I suppose. Regarding the AI-generated artwork, that's fine by me, in this case (it's not necessary to spend much time to make an example, or something like that). Thanks for help, Guest. |
||||
|
|