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 

OBJ Importer/Exporter: Retain vertex colors

 
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
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Fri May 22, 2009 3:08 pm    Post subject: OBJ Importer/Exporter: Retain vertex colors Reply with quote

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
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


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

PostPosted: Fri May 22, 2009 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Fri May 22, 2009 8:21 pm    Post subject: Reply with quote

I just sent an email.
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


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

PostPosted: Sat May 23, 2009 9:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Sat May 23, 2009 3:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


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

PostPosted: Sun May 24, 2009 6:09 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Mon May 25, 2009 8:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


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

PostPosted: Mon May 25, 2009 8:55 pm    Post subject: Reply with quote

Those are mighty fine screenshots! Smile

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! Smile
_________________
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
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Tue May 26, 2009 12:44 pm    Post subject: Reply with quote

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. Smile
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: Tue May 26, 2009 6:37 pm    Post subject: Reply with quote

Dragonsbrethren wrote:
I'd be happy to post some screenshots of the custom level I'm working on once it's finished, though. Smile


That would be totally awesome. Smile
_________________
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
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