lightmaps from Coppercube

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

lightmaps from Coppercube

Post by st0ph »

Hello irrlichters :)

I used blender to model my level, then i imported the the level into coppercube to add lights and other effects
after that I exported the level as a .OBJ file, and that gave me a .mtl file and a folder that contains the lightmaps (.png files)

The problem is that when I load my level using code it does not import the lightmaps !

If you have a solution please help :/
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: lightmaps from Coppercube

Post by hendu »

The .obj format does not support more than one texture coordinate. That is often needed for lightmaps.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: lightmaps from Coppercube

Post by st0ph »

@hendu is there any other solution where I can use lightmaps and still have the fast loading for my level as with .obj file ?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: lightmaps from Coppercube

Post by Mel »

Create your custom format to store both texture coordinates, and create a mesh combiner that picks the coordinates from 2 equal models, and store them in your new format. That is what i had to do when i could no longer use the B3D format to store 2 sets of mapping coordinates in my meshes
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: lightmaps from Coppercube

Post by st0ph »

First, I wish you a Happy birthday Mel :)

thanks for that, but unfortunaty I don't have the time nor the knowledge to do what you're suggesting :/
Is there any other solutions ?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: lightmaps from Coppercube

Post by hendu »

Fast loading with obj? It's one of the slowest formats to load.

Pick a format that supports such; Mel mentioned b3d supports it.
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: lightmaps from Coppercube

Post by st0ph »

But CopperCube does not have a .B3D exporter :(
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: lightmaps from Coppercube

Post by hybrid »

I guess there's a standard way for Coppercube to export lightmaps. Your choice via .obj is definitely not the one. Maybe .irr export works. But maybe just ask Niko what the best solution is. There are the Ambiera forums where you can ask for such help.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: lightmaps from Coppercube

Post by Mel »

st0ph wrote:First, I wish you a Happy birthday Mel :)

thanks for that, but unfortunaty I don't have the time nor the knowledge to do what you're suggesting :/
Is there any other solutions ?
Thank you :)

Well, the knowledge is something that is acquired with time. In fact it is not very hard to create a custom format. take a look at the example 23, the one about SMesh handling. Creating a custom format is almost the same, with the diference that instead of some formula, you pick your data from a file. You have to care about vertex and indices arrays and that is all. You don't even have to extend the SMesh class, its methods are enough.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply