View previous topic :: View next topic |
Author |
Message |
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Wed Dec 20, 2006 6:31 pm Post subject: |
|
|
The answer from the C4 forums is that the mesh needs to be completely closed in order for C4 to cast shadows correctly.
Unfortunately the Feeling Viewer does not cast shadows, so cannot be reliably used to test exports. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Dec 21, 2006 3:02 pm Post subject: |
|
|
First of all, version 0.51a of the exporter just got released, get it here
Gauntlet: Ah, that's good news, thanks!
JamesH: After reading through that thread at therathon I've been thinking about your problem with non-closed meshes for while. The way I see it, there are tree parties involved in your toolchain:
1. DeleD - a generic modeler. Any 'polygon soup' will do, closed or non-closed is of no importance
2. The Collada exporter - The Collada format is by design is even more generic in nature than DeleD.
3. C4 - Does in itself not require closed meshes, but the shadow algorithm does.
As I can only influence (1) and (2), and it's unlikely that Eric will be switching shadowing algorithms anytime soon (in particular because I'm not too sure there even exist such algorithms that efficiently deal with open geometry) here is what I think we could do:
a) We could build some optional validation rules into the exporter that would warn you of open geometry. We could have this implemented very fast as it is little work, but it would not help you much in solving the problem (besides telling you what primitive contains the problem)
b) We already have plans to extend DeleD itself with a geometry 'analyzer', that will search for a pick of potential problem area's (t-junctions, open geometry, non-convex geometry, etc.). This would also help solving the problem by selecting the edges of problem areas, so you can quickly see where the exact problem is and solve it.
My question to you is: given that solution (b) will take a bit of time (i.e. it could be included in the next release, very early 2007), and will probably only be fully available in the DeleD PRO version, do you think extending the exporter with said functionality (a) would be a good idea? |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Thu Dec 21, 2006 3:21 pm Post subject: |
|
|
Yes, I think a) would be a good idea short term for me as I tend to work a lot on my laptop that C4 will not run on, and if I need to really check where the problem areas are, I can load the model into the C4 Model Viewer when at my workstation.
I suppose it is going to be practice creating models without open geometry, and trial and error getting it right. But definitely a step in the right direction.
I'll also look forward to b) long term as well.
Many thanks for your prompt reply.
James. |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Thu Dec 21, 2006 10:13 pm Post subject: |
|
|
JamesH wrote: |
I suppose it is going to be practice creating models without open geometry, and trial and error getting it right. But definitely a step in the right direction.
|
It has to be said: if the plug-in API of DeleD was just a little bit richer, it would be pretty easy to write a plug-in that would seal any open holes, select open edges, etc. |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Thu Dec 28, 2006 5:14 pm Post subject: |
|
|
A bit of an update, I'm having more success exporting to the C4 engine with Triangluate set to None. |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Thu Dec 28, 2006 5:27 pm Post subject: |
|
|
An example of the difference in exporting with Triangulate set to None, and set to All Polygons. I created a simple cylinder and exported.
None
All Polygons
By the way you can try this yourself. The C4 demo does not include the Tools folder, but if you follow this thread, you can download the tools folder and add the folder to your C4 demo. You can then import and export the models. Be aware that C4 has a new editor at the end of the month and the demo will be updated. |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Thu Dec 28, 2006 8:24 pm Post subject: |
|
|
I've updated the process to get model into the C4 model viewer
To get the model into C4
- Export the model remembering to add the .dae extension in the DAE export filename box.
- The dae file should go in the C4\Import\dae folder
- The tga file should go in the C4\Imort\tga folder
- Open C4
- Press ESC to remove the game interface
- Press tilde twice to open the menu bar
- Select New World from the tools menu
- Select Import Scene from the World menu
- Select the dae file and it should be displayed in the world (you can add the textures at this point, import the texture, select it in the material manager and Ctrl-M to add it to a selected model, or just leave it blank for the time being)
- From the Edit Menu, Select All (Ctrl-A)
- From the Node Menu, Convert to Generic Mesh (Ctrl-Shift-C)
- Select Export model from the World menu
- Once saved, from the Tools menu select Open Model and the imported COLLADA model will be displayed in the Model Viewer.
Just a couple of extra steps to convert the imported model to a generic mesh. |
|
Back to top |
|
|
granada Team member
Joined: 07 Aug 2004 Posts: 1955 Location: England
|
Posted: Thu Dec 28, 2006 8:31 pm Post subject: |
|
|
Thanks for the info JamesH.
I hope the proces gets shorter,soon .
Dave _________________ AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580 |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Thu Dec 28, 2006 8:44 pm Post subject: |
|
|
granada wrote: |
Thanks for the info JamesH.
I hope the proces gets shorter,soon . |
I hope so too, we'll find out in the next build. But I can import the model now in a matter of seconds, so it's not too painful, but it has been trial and error getting there. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Thu Dec 28, 2006 9:58 pm Post subject: |
|
|
Thanks for sharing that info JamesH, that's great. Info like that is very helpful to DeleD/Collada users out there so keep up the good work. |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Fri Dec 29, 2006 2:31 am Post subject: |
|
|
Quote: |
in particular because I'm not too sure there even exist such {shadow} algorithms that efficiently deal with open geometry |
Yes, there does: Shadow maps. Eric will add shadow map support to some future version of C4, according to his roadmap.
In (ahem) 3ds Max, there is a "select open edges" command. There is also a "bridge" command to create geometry that bridges selected edges, and a "seal holes" command that does those things for all open edge loops. I would love to see such features added to DeleD. In the very best of worlds, the DeleD plugin API would be rich enough that you, or me, or anyone, could build such a command as a plug-in (and have that command show up in the button panel). |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Fri Dec 29, 2006 7:41 am Post subject: |
|
|
jwatte wrote: |
In (ahem) 3ds Max, there is a "select open edges" command. There is also a "bridge" command to create geometry that bridges selected edges, and a "seal holes" command that does those things for all open edge loops. I would love to see such features added to DeleD |
That would be great |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Sat Dec 30, 2006 2:57 pm Post subject: |
|
|
I've been spending the last day going through numerous DeleD -> C4 exports to find out where the problem lies in open and closed meshes.
I created 2 cube primitives in DeleD, one cutting through the other and then I unioned them. I exported the first model with the cubes separate and the second export was with the cubes unioned. I then imported the models into C4 and there seemed to be a problem with the unioned mesh, some of the mesh was not closed and there were shadow problems displayed in the the C4 model viewer.
So, to test if it was the union function that was causing the problems in DeleD, I exported the models without the union function applied, I then unioned the 2 cubes using the union function in C4. The same result was apparent as exporting a unioned model from Deled.
This image is the cubes imported separately
This image is the cubes unioned in C4
Just to make sure that the union function was working correctly in C4, I created two similar cubes in C4 and applied the union function and it worked ok.
This image is the cubes created separately in C4
This image is the cubes Created and unioned in C4
I tried exporting with the Triangluate set at All Polygons and None, but the result was the same. |
|
Back to top |
|
|
JamesH DeleD PRO user
Joined: 04 Dec 2006 Posts: 24 Location: York, UK
|
Posted: Sat Dec 30, 2006 4:52 pm Post subject: |
|
|
Getting closer .....
I've used a C4 Collada exporter to export a cube created in C4 and compare it against a cube created in DeleD.
If you would like to view them, they can be downloaded here
Apologies for not doing this earlier, I completely forgot that someone over in the C4 community wrote a C4Collada exporter.
Cheers
James. |
|
Back to top |
|
|
collada Member
Joined: 27 Mar 2007 Posts: 5
|
Posted: Tue Mar 27, 2007 7:15 pm Post subject: |
|
|
JamesH wrote: |
I've posted a question over at Terathon to find out if anyone knows of a COLLADA file checker that can possibly look for potential problem areas |
The COLLADA Refinery at sourceforge includes a Coherency Checker |
|
Back to top |
|
|
|