Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / DeleD 2.45 CE Lightmap problem ?

Author
Message
RonsWare
13
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 2nd Jul 2012 12:32
Hello everyone.

Does anyone know how i can solve this problem ?

For example , if i make a hole in a block with the " Extract "
function and let an lightmap be created.

I get this.

I use a directional light.

I hope the pictures makes it more clear.

As always your effort is much appreciated.

Thanks
Cheers Ron.

This is an screen from the " WIP " 3D Engine.



And here from DeleD 2.45 CE.



Programming is learning
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 3rd Jul 2012 04:00
Could be either different directions of the face normals or possibly just need to add to the same smoothing group

RonsWare
13
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 4th Jul 2012 16:35
I have tried to merge the polygons.

That did not work

I made 3 objects to get a window en merge them together.

That did not work also

I keep trying to solve this problem.

Thanks for the effort

Cheers Ron

Programming is learning
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jul 2012 11:13
@RonsWare
I think that after you create the light map in Deled, it saves that as a bitmap file. You have to change the UVs of your objects in the scene that use the light map in texture mode. Ultimately, you'll need 2 sets of UVs - one for your regular textures, and one for the light map. If you are exporting to direct x objects, you could texture 1 with UVs for the regular textures, and the other with the UVs for the light map. You then position the two objects in the same place and inverse alpha or dark ghost the one with the light map.

I don't see any options to export an object with a light map, that is why I think you would have to manually adjust the UVs to be able to use the lightmap and export that object as it's own thing.

When Deled generates the lightmap, it must store the UVs somewhere. I'm not quite sure where though.

Enjoy your day.
RonsWare
13
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 19:56
I don't now how to export a .X file with lightmap using DeleD.

I have the plugin installed to export .X files

But i see no way to export a lightmap ?

Thank's Latch

I am learning every day.

Cheers Ron.

Programming is learning
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Jul 2012 00:11
Quote: "But i see no way to export a lightmap ?"

In your example, are you using the DBPro exporter plugin? If that's not working there are a couple of alternatives - but they take some initial work.

The light map UV information is saved when you save the file as a Deled Scene. There is the XML format, and an older DMF format. The .dmf format is easier for me to deal with because I find it much cleaner than the xml format. It's just numbers separated by ';' .

If you aren't comfortable with parsing text files, then this really won't be useful to you. If you are, then you could try:

1. Look up DMF v1.1 file format in the Deled help .
2. You'll notice that the UV information is stored in a block that looks something like this:



The first number tells you the number of vertices. In this example it's 3.

The next number is the material number defined earlier in the file. 16 in this case which is the lightmap material in the test I'm doing.

The next 3 numbers are the vertex indeces - that means which vertex number the data applies to - 5,0,1 in the first line

The next bunch of floats are the UV data. There are 12 values here, not 6. The reason is that I have a regular texture on my object and a light map. These represent 2 sets of UV values each applied to the vertex index indicated earlier. So here there are 3 groups of 4 UVs. The first 2 are the regular texture UVs, the next 2 are my light map UVs.

3. Once you familiarize yourself with the format, create a basic scene and save it with a light map as a .DMF file. Open up the file and take a look at it and see if everything makes more sense.

Once you understand the format, you can get the UV data you need in different ways. If you are comfortable writing a plugin for Deled, you can and export an X file or DBPro file exactly as you need it.

Another option is to write a parser in DB that will take the DMF file and extract the information you need.

It sounds like a lot of work, and initially it would be. But once it's done, you don't have to do it again.

A note about the possibility of creating a Direct X file from the .DMF : an X file takes only quads or triangles. That means the highest number of indeces for a polygon in an x file is 4 - the standard is 3. The DMF file may contain polygons with more vertices than this. To deal with this, select all of the faces of the object(s) in Deled and use the triangulate function to convert them to triangles. Now when you save your DMF file, it will only have polygons made up of 3 vertices which can convert nicely to a direct X file without any trouble.

In the end, you'd have to have some means of building a custom file DBPro or Direct X with the lightmap UVs and texture in it. I'm sure the Deled community would be thrilled with a plugin that did this.

Enjoy your day.
RonsWare
13
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 20th Jul 2012 15:01
@Latch

Thanks again.

I am working on it

Cheers Ron.

Programming is learning

Login to post a reply

Server time is: 2024-04-18 04:47:25
Your offset time is: 2024-04-18 04:47:25