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 

Lightmapper broken on a particular DXS file (Solved!)

 
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 Bugs
View previous topic :: View next topic  
Author Message
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Thu Jun 30, 2011 12:07 am    Post subject: Lightmapper broken on a particular DXS file (Solved!) Reply with quote

When I run the lightmapper on this scene, it shows nothing in the DeleD render, and the texture files it outputs are strange and black/white blocky. Any idea why this occurs?

http://ssntails.srb2.org/level82.zip

Lightmapper options:
Lightmap Size: 2048x2048
Individual Texture Minimum Size: 32x32
Individual Texture Maximum Size: 128x128
Number of (Blur) Filter Passes: 0
Generate Shadows: true
Consider Non-Selected Objects: true
Bake Scene Ambient Color into Lightmap: false
Normal Auto Smooth Crease Angle: 0
File Format: TGA


Last edited by Spaddlewit on Sat Jul 09, 2011 12:37 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Thu Jun 30, 2011 7:40 am    Post subject: Reply with quote

Ai, I'm afraid the lightmapper ain't my cup of tea (PJ made that part of DeleD), so I can't help you here. Anyone else?
_________________
Check out Figuro, our online 3D app! More powerful 3D tools for free.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Thu Jun 30, 2011 11:05 am    Post subject: Reply with quote

If it helps, what's even weirder is if I delete all of the objects in that scene, then create two new objects, and try to lightmap THOSE, the same problem still occurs.

Is there an easy way I can copy all of my objects out of that scene and into a new one? (I have important info in the Comments fields that I'd like to retain...)
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Thu Jun 30, 2011 12:55 pm    Post subject: Reply with quote

Spaddlewit wrote:
If it helps, what's even weirder is if I delete all of the objects in that scene, then create two new objects, and try to lightmap THOSE, the same problem still occurs.

Is there an easy way I can copy all of my objects out of that scene and into a new one? (I have important info in the Comments fields that I'd like to retain...)


Hmm, copying from within DeleD won't copy the comments (see http://www.delgine.com/forum/viewtopic.php?t=4496) so that won't help right now.

If you duplicate the file in windows explorer and then manually change it so it only contains the objects you really want, that would probably work. But i fail to see how this would help with the lightmapper problem?
_________________
Check out Figuro, our online 3D app! More powerful 3D tools for free.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Thu Jun 30, 2011 8:31 pm    Post subject: Reply with quote

Jeroen wrote:
If you duplicate the file in windows explorer and then manually change it so it only contains the objects you really want, that would probably work. But i fail to see how this would help with the lightmapper problem?


*) Load level82.dxs
*) Delete all objects in the scene
*) Create two new cubes and angle a light in such a way that they cast shadows on eachother
*) Try lightmapper. Doesn't work.
......
*) Go to File/New and create a new scene
*) Create two new cubes and angle a light in such a way that they cast shadows on eachother
*) Try lightmapper. Works!

So I doubt it's so much a bug in the lightmapper with the level geometry so much as some other little nuance in the file data that makes it go on the fritz.
Back to top
View user's profile Send private message Visit poster's website
AWM Mars
Member


Joined: 06 Jan 2010
Posts: 1195
Location: Wilts England

PostPosted: Fri Jul 01, 2011 8:14 am    Post subject: Reply with quote

I don't have a solution for you, but I did carryout some testing on your model.

First I applied some textures (standard ones) to some of the elements, as the original didn't have any supplied.

I then lightmapped the scene and got nothing.

Then I raytraced the scene and got this:


I then disabled your light and added another directional light, in a different orientation and raytraced that and got this result:


I checked out both the dxs file content and could not see anything that would prevent this from lightmapping (albeit it I am limited in my knowledge in this field), and also each component of the scene, looking for clues, I drew a blank.

I can confirm the following observations:
No lightmaps were created in the 'Lightmaps' folder for the original level, albeit the folder was created 'level82'

A folder was created for my revised version, and a couple of lightmaps were created, albeit only one included any lightmap detail, from the area where I placed the standard textures. This doesn't however explain why the shadows would not show up in the lightmapped viewport.


Whilst this doesn't fix the problem, maybe seeing this, someone will be able to figure out what is the problem. Smile
_________________
Politeness is priceless when received, cost nothing to own or give, yet some cannot afford.

Checkout:
http://www.awm.mars.yourinside.com/
http://www.bccservices.co.uk
http://www.localtradecheck.co.uk
Back to top
View user's profile Send private message Visit poster's website
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Sun Jul 03, 2011 5:44 pm    Post subject: Reply with quote

Been playing with it a bit more...

I just removed all of my materials from the scene, then re-added a material and assigned it to the geometry. Now lightmapping works.

My guess is that there's a bug in DeleD somewhere with reading the materials info from the DXS file?? Something must not be getting copied in right, even though in the Material Options everything looks okay...
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sun Jul 03, 2011 7:09 pm    Post subject: Reply with quote

Good to see you found a work-around, good job!

Indeed, it seems something ain't right when it comes down to materials and lightmapping. More investigation needed, me thinks. If you find out anything, let us know!
_________________
Check out Figuro, our online 3D app! More powerful 3D tools for free.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Mon Jul 04, 2011 1:20 am    Post subject: Reply with quote

Well, it appears that workaround only sufficed for a much smaller scene that is also experiencing the same problem (I have several scenes with this same issue). The level82.dxs file doesn't get fixed when I try this workaround.

I'd mess around with the code, but I don't have a Delphi compiler.
Back to top
View user's profile Send private message Visit poster's website
Spaddlewit
Member


Joined: 24 Aug 2009
Posts: 244
Location: Florida, United States

PostPosted: Sat Jul 09, 2011 12:30 am    Post subject: Reply with quote

FIGURED IT OUT

In the <settings>, shadowOpacity was set to 0. If it is 0, then no lightmaps get generated since the shadows are, well.. totally transparent.
Back to top
View user's profile Send private message Visit poster's website
AWM Mars
Member


Joined: 06 Jan 2010
Posts: 1195
Location: Wilts England

PostPosted: Sat Jul 09, 2011 6:52 am    Post subject: Reply with quote

Actually, to set the opacity of shadows, its in the Scene tab, not in settings. Smile

It doesn't explain why the shadows showed up in Raytracer, unless it uses different default settings?
_________________
Politeness is priceless when received, cost nothing to own or give, yet some cannot afford.

Checkout:
http://www.awm.mars.yourinside.com/
http://www.bccservices.co.uk
http://www.localtradecheck.co.uk
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 Bugs 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