View previous topic :: View next topic |
Author |
Message |
Dragonsbrethren Member
Joined: 12 Apr 2009 Posts: 21
|
Posted: Fri May 22, 2009 3:08 pm Post subject: OBJ Importer/Exporter: Retain vertex colors |
|
|
Currently, the OBJ Importer and Exporter plugins don't retain the vertex colors, either from the original OBJ or the DeleD scene. The game I am modeling for uses vertex colors to simulate lighting, shadowing, and to recolor some textures. It would be very helpful if these two plugins could be updated to retain this information.
(I wasn't sure if I should post this here or in the feature suggestions forum, so feel free to move it if it's in the wrong place.) |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri May 22, 2009 6:56 pm Post subject: |
|
|
Well, your request is certainly in the right section!
Could you mail me (paul at delgine dot com) an example .obj containing vertex colors? That would save me a bit of time picking up this request. Thanks! |
|
Back to top |
|
|
Dragonsbrethren Member
Joined: 12 Apr 2009 Posts: 21
|
Posted: Fri May 22, 2009 8:21 pm Post subject: |
|
|
I just sent an email. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Sat May 23, 2009 9:03 am Post subject: |
|
|
Thanks for the .OBJ! Unfortunately, it doesn't seem to actually contain vertex colors(*), it has texture materials with a color attribute, a concept DeleD doesn't really support. In DeleD, a material layer is either texture or color, not both.
I'll try and see if I can mimic the materials by creating a multi-layered material (incl. reversed support in the exporter). An alternative would be assigning the color as single vertex color to all vertices in the face, but I think I prefer keeping material properties in the material as much as possible.
p.s. I'm not even sure .OBJ supports vertex colors, although according to the specs you can have per-vertex materials and interpolation, so that's probably how it would be done. Haven't encountered such files in the wild though. |
|
Back to top |
|
|
Dragonsbrethren Member
Joined: 12 Apr 2009 Posts: 21
|
Posted: Sat May 23, 2009 3:54 pm Post subject: |
|
|
Oh, okay, that's interesting. The game's map and object model format uses vertex colors, so I just assumed the exported obj file did as well. A mistake on my part, but it's good to hear that you are going to try to support these materials in DeleD. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Sun May 24, 2009 6:09 am Post subject: |
|
|
Ah, that makes sense! But wouldn't there be color gradients in the game then? Because they then got lost in the translation to .OBJ (unless there is some hidden information in the file I'm not seeing). |
|
Back to top |
|
|
Dragonsbrethren Member
Joined: 12 Apr 2009 Posts: 21
|
Posted: Mon May 25, 2009 8:18 pm Post subject: |
|
|
Yes, most of the game's vertices are merged and will produce a smooth gradient when color is applied to them. Some aren't, however, and are usually used to just recolor one texture without affecting another. The walls, floors, and ceiling vertices usually aren't merged to one another either.
Here's an in-game screenshot:
And here's that portion of the map circled in red. The green circle is where I was standing:
You can see the smooth lighting on the green portion of the wall (which is actually a gray wall texture), but the green doesn't bleed onto the white tiles below it. The floor also has smoothed spots of light. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Mon May 25, 2009 8:55 pm Post subject: |
|
|
Those are mighty fine screenshots!
Would you mind us using a few of them for the gallery and/or other parts of the Delgine site? It would be great if you could make one or two screenshots of the level in DeleD. One with the complete level (like the one you're showing here) and one showing something in detail? Anyway, just a suggestion, let me know! _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
|
Dragonsbrethren Member
Joined: 12 Apr 2009 Posts: 21
|
Posted: Tue May 26, 2009 12:44 pm Post subject: |
|
|
I'm afraid not, that's one of the game's existing levels exported to obj and imported to DeleD, and not something I made.
I'd be happy to post some screenshots of the custom level I'm working on once it's finished, though. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Tue May 26, 2009 6:37 pm Post subject: |
|
|
Dragonsbrethren wrote: |
I'd be happy to post some screenshots of the custom level I'm working on once it's finished, though. |
That would be totally awesome. _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
|
|