Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inquiry : Loading lightmaps technical references

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins
View previous topic :: View next topic  
Author Message
DexterZ
Member


Joined: 07 Mar 2019
Posts: 2

PostPosted: Thu Mar 07, 2019 4:45 am    Post subject: Inquiry : Loading lightmaps technical references Reply with quote

Hello,

Not sure if this is the right place to post my inquiry, I'm making a DMF loader on MonoGame for my maps. Is there any technical references I can look at on how to load the lightmaps from DMF format.

1. How get vertex UV for lightmaps
2. How get Texture lightmaps for group
3. Any tips hints and information of lightmaps DMF format

Thanks ^_^y
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Thu Mar 07, 2019 8:52 pm    Post subject: Reply with quote

Hi there!

It's great that you are building a DMF loader. It has been a while since I last worked on it (it was superseded by DXS, which might be a bit more self-explanatory to load in MonoGame), but let me try to answer your question.

Given a scene with the System texture and a generated lightmap you'll first encounter the material definition in the DMF:

Code:
16;system;System;0;4;0,System\system.bmp,1;;;0,LightMaps\new scene\new scene_LightMap0.bmp,3;


This is material definition for material "16", a combination of the System material with Lightmap0. The lightmap is always the 4th layer of the material, in this case there are two empty layers in between.

A bit further down in the DMF, you'll find the definition for the faces affected by this material:

Code:
4;16;0;1;5;4;1.8750000;0.0000000;-0.9375000;0.0000000;-0.9375000;-1.0000000;1.8750000;-1.0000000;0.0605469;0.0019531;0.0019531;0.0019531;0.0019531;0.0605469;0.0605469;0.0605469;


Here we define:
- A face with 4 vertices
- Material that is applied (16)
- Vertex indices for the 4 vertices
- 4 (u, v) pairs for the first texture layer
- 4 (u, v) pairs for the lightmap layer.

For additional (very brief) documentation on the DMF format, see the DeleD help. It doesn't document the lightmap specifics, but the lightmap is basically the same as an ordinary material layer (it just goes in a reserved 4th layer slot that can't be accessed from the UI). If you have any more specific questions, ask away!
Back to top
View user's profile Send private message Visit poster's website
DexterZ
Member


Joined: 07 Mar 2019
Posts: 2

PostPosted: Fri Mar 08, 2019 2:35 am    Post subject: Reply with quote

Paul-Jan wrote:
Hi there!

It's great that you are building a DMF loader. It has been a while since I last worked on it (it was superseded by DXS, which might be a bit more self-explanatory to load in MonoGame), but let me try to answer your question.

Given a scene with the System texture and a generated lightmap you'll first encounter the material definition in the DMF:

Code:
16;system;System;0;4;0,System\system.bmp,1;;;0,LightMaps\new scene\new scene_LightMap0.bmp,3;


This is material definition for material "16", a combination of the System material with Lightmap0. The lightmap is always the 4th layer of the material, in this case there are two empty layers in between.

A bit further down in the DMF, you'll find the definition for the faces affected by this material:

Code:
4;16;0;1;5;4;1.8750000;0.0000000;-0.9375000;0.0000000;-0.9375000;-1.0000000;1.8750000;-1.0000000;0.0605469;0.0019531;0.0019531;0.0019531;0.0019531;0.0605469;0.0605469;0.0605469;


Here we define:
- A face with 4 vertices
- Material that is applied (16)
- Vertex indices for the 4 vertices
- 4 (u, v) pairs for the first texture layer
- 4 (u, v) pairs for the lightmap layer.

For additional (very brief) documentation on the DMF format, see the DeleD help. It doesn't document the lightmap specifics, but the lightmap is basically the same as an ordinary material layer (it just goes in a reserved 4th layer slot that can't be accessed from the UI). If you have any more specific questions, ask away!


Thank you very much Sir Paul! If I have a time I'll do the DXS loader, appreciated all the information you gave me and I got it working now.

https://youtu.be/esJTK_oLnqI

This tools is really RAD! T_T don't let it die T_T


EDIT:

I tweet my developement using DELED as my MAP:
https://twitter.com/Dexteryozity/status/1057219447633526784

The game can be downloaded @ :

https://dexterous.itch.io/ | Froggy Hop

Many thanks ^_^y
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Fri Mar 08, 2019 8:59 am    Post subject: Reply with quote

Wow, that's awesome! Well done there... lease keep us posted, we love to see the cool stuff you are doing with the DeleD tech!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum