realbasic-games
[Top] [All Lists]

Re: OBJ and 3DS support for vertex colors

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: OBJ and 3DS support for vertex colors
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Sat, 20 Aug 2005 10:03:51 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <8DF2BB08-78E5-4A06-B484-895B5868CC47 at miensoftware dot com> <98D5C6A8-4D28-4AAC-9D45-664AA46DD36E at chaoticbox dot com> <D962D06D-00DB-4899-A24F-5553090F959B at miensoftware dot com> <CAE9040D-2C53-47E2-81EC-3B54FA9F6C50 at chaoticbox dot com> <C67E7CE8-E64B-4C39-A825-14CD0A88C271 at miensoftware dot com> <75099C14-B525-45F5-B96A-6FF18C435514 at chaoticbox dot com> <D1B36A2F-97EE-4B71-BC3B-BD3A5548541A at miensoftware dot com> <049C1457-8F68-4A08-A591-E874CF0EC7B7 at chaoticbox dot com> <034341D7-ECC5-4072-8B76-7E9F1DC660DD at miensoftware dot com>
Thanks for your help Frank!

I've been working on this on and off for the past few days it it seems to work now using an accurate Ray-Triangle test. I can set a point light and it is able to cast vertex lights along with vertex shadows. If I want spot lights, it can be easily achieved by putting an object behind the light.

The next step is to expand on this and create per pixel lighting by ray-tracing the entire scene and generating a mesh-based lightmap, but I'll leave this for another day if I decide to do it...

On Aug 16, 2005, at 10:30 AM, Lo Saeteurn wrote:

Alright. Thanks for your help. I'll give it a shot.


You pretty much have to run the vertex and normal through the same rotation matrix. I'm not sure if Quesa has methods to let you can extract the appropriate matrix so this might be a bit of a pain (or a major pain if the object is transformed by one or more parent groups). You'll have to take scaling into account as well... :/

Everything's *much* easier if all static geometry is already in worldspace before giving it to Quesa. Static geometry is also more efficient this way since Quesa won't have to do redundant transforms every frame. I know this may not be practical based on stuff you've previously posted here (e.g. your modular world editor) but a little more pre-processing to get vertexes into worldsapce from the get-go can prevent a lot of headaches later on.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>