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 

CSG problems with exported DMF Files

 
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 Community Edition
View previous topic :: View next topic  
Author Message
herbert
Member


Joined: 03 Mar 2006
Posts: 3

PostPosted: Fri Mar 03, 2006 4:32 pm    Post subject: CSG problems with exported DMF Files Reply with quote

Hi all,
for tests of my engine I have written a converter to make files of my own format from DMF Files created by deleDLite. For example I loaded Castlesiege and could render the exported model fine in my renderer.
Now I try to perform CSG with another self written tool on this data and found some bugs, which I could track down to the fact, that, that not all objects in the provided files are closed. For example, the "front wall" box iis not closed at the bottom.
My understanding is, that objects used for CSG MUST BE CLOSED and this explains the effects I see.
Deled itself also does a CSG when performing a lightmap calc. Now I ask myself, how this works...
My current idea is to "reconstruct" missing polygons to make brushes closed for the CSG, but I am not really happy with that....
Any ideas are appreciated,,
Thanks very much,

Herb
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Fri Mar 03, 2006 5:11 pm    Post subject: Reply with quote

Hi there Herbert,

In theory, objects must indeed be closed for CSG to work. But, this does not have to be the case in all situations. For example, if I create a cube in DeleD, remove its bottom polygon and the perform CSG Subtraction on it, it works perfectly. I can't think of a situation in which it wouldn't work at the moment, but I'm sure there are.

I'm not sure how your CSG routines work. I use a BSP-based algorithm myself. In your case, you either need to close objects yourself (which will be very easy with the upcoming DeleD 1.4) or write some tool to do that task automatically. I think the latter would be rather a difficult taks though. Besides that, even if the object is closed, there might also be polygons INSIDE the object, causing CSG routines to error out.

Btw, DeleD does not perform CSG when it is lightmapping the scene. Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
herbert
Member


Joined: 03 Mar 2006
Posts: 3

PostPosted: Fri Mar 03, 2006 5:42 pm    Post subject: Reply with quote

Hi Jeroen,
thanks for the fast reply. I try to perform CSG unions and use an algorithm based on the article by Stefan Hajnoczi (If I remember correctly, I found that on flipcode) about .MAP file loading. Currently I do not use a BSP based algorithm as you do, but in future I will do so.
I will try the way of closing the objects myself and test (my project primarily is to learn stuff).
Thanks again,
Herb
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Fri Mar 03, 2006 7:02 pm    Post subject: Reply with quote

No problem, keep us posted! Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sindwiller
DeleD PRO user


Joined: 25 May 2005
Posts: 331
Location: Zürich. Switzerland

PostPosted: Fri Mar 03, 2006 7:43 pm    Post subject: Reply with quote

Why you dont just release the sources of your tool under the GPL? Wink

That was just a thought you know...

Wfr, Sindwiller
_________________
"Ave Jeroen et Paul-Jan!" populus clamant.
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Fri Mar 03, 2006 9:19 pm    Post subject: Reply with quote

Who, me? Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sindwiller
DeleD PRO user


Joined: 25 May 2005
Posts: 331
Location: Zürich. Switzerland

PostPosted: Fri Mar 03, 2006 9:36 pm    Post subject: Reply with quote

No, i meant herbert. But you could release some things under the GPL... couldnt you? Very Happy

Wfr, Sindwiller
_________________
"Ave Jeroen et Paul-Jan!" populus clamant.
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


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

PostPosted: Sat Mar 04, 2006 1:56 pm    Post subject: Reply with quote

Nah, we are not that big fans of the GPL and other contagious license schemes. Any code we release (like the plugin sources, and perhaps other stuff in the future) will most likely be completely license free (or BSD-style-licensed at most). It's all just a matter of taste. Very Happy
Back to top
View user's profile Send private message Visit poster's website
herbert
Member


Joined: 03 Mar 2006
Posts: 3

PostPosted: Sat Mar 04, 2006 3:54 pm    Post subject: Reply with quote

Andreas,

If you like, I could send you the interesting parts in my CSG code. You could get the code as is, it is far away from being finished and optimized. I will change a lot (e.g. using a BSP Tree approach) and I will not be able to answer questions.

Greetings,
Herb
Back to top
View user's profile Send private message
Sindwiller
DeleD PRO user


Joined: 25 May 2005
Posts: 331
Location: Zürich. Switzerland

PostPosted: Sat Mar 04, 2006 9:19 pm    Post subject: Reply with quote

herbert,

you can send it to me but i cant use it for something. My programing skills are limited and at the moment, i dont have time to expand those. It was just an idea that if you release your sources on a open license (GPL, LGPL, Zlib, BSD-like) anyone could use your code and improve it.

Wfr, Sindwiller

ps. Like i can see, you have readed my blog Shocked Very Happy
_________________
"Ave Jeroen et Paul-Jan!" populus clamant.
Back to top
View user's profile Send private message
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 Community Edition 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