realbasic-games
[Top] [All Lists]

Re: Game engine test

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Game engine test
From: Mike Woodworth <mike at divergentmedia dot com>
Date: Sat, 25 Mar 2006 20:47:46 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20060317180027 dot 96F56117533D at lists dot realsoftware dot com> <4424B89C dot 2010408 at optusnet dot com dot au> <8268A93C-A492-41B9-A867-091978805AC2 at miensoftware dot com> <12B1852E-DE58-4871-A997-E7D44E40CBF4 at mindspring dot com> <BF4347D4-DEA4-4533-87BE-BEB12B106D91 at miensoftware dot com> <5FA27ACF-802D-4210-80DA-7E31FF0AAF60 at chaoticbox dot com> <F6EC35A8-63A1-4315-817F-B434D976A1BF at divergentmedia dot com> <CD676989-0D92-418F-87FA-9FDEF3FA2197 at chaoticbox dot com> <0FDC0C8A-9C1B-4A06-B0AE-439A9238E702 at divergentmedia dot com> <C2341D88-2A3F-4AAC-B856-85DD57872624 at chaoticbox dot com> <6AEFB6AE-7DBB-4D7A-88A1-E1CE82A7301F at divergentmedia dot com> <143FB87A-75C0-48F9-BEF8-CF70D6B47D4F at chaoticbox dot com> <A4B0A4A5-5B1D-4590-9897-9BA100246363 at divergentmedia dot com> <ACC11895-8913-4871-985D-7A33FFE5A082 at chaoticbox dot com> <B39D23F6-6762-4ABB-AED1-F03ABB7E8865 at divergentmedia dot com> <5B501C07-17C9-4C49-8F38-EF424EBEDDA3 at miensoftware dot com> <C6C526B1-9613-427E-A0EA-63637C6C9F7F at divergentmedia dot com> <7C8A4AD8-88A0-4895-9914-020C70DF0B27 at miensoftwar! ! e.com> <2850227A-835F-4892-B7CE-1BBEF81457DD at divergentmedia dot com> <D0E5136E-3B49-4234-9011-72AB6600A6C6 at miensoftware dot com>
sorry, it was a problem with my handling of normals...  all fixed.

so yeah, this was a quick drop in change - seeing 10x + increase in morph fps. i think somewhere in here there's one more big speed increase to be had, but i'm having a hard time following your code. where do you actually get and set the trimesh data?

mike


On Mar 25, 2006, at 8:39 PM, Lo Saeteurn wrote:

hmm... what sort of errors? Does it work with the original code? Are you running a Mac or Windows?


On Mar 25, 2006, at 5:27 PM, Mike Woodworth wrote:

hmm, that model throws errors the whenever i try to do anything.

mike

On Mar 25, 2006, at 8:20 PM, Lo Saeteurn wrote:

Sure.

Here is the werewolf model (12MB):
http://www.rpghorror.com/files/werewolf2.zip

On Mar 25, 2006, at 3:37 PM, Mike Woodworth wrote:

lo,

it looks like you've tried hard to optimize this already... lots of loop unraveling. I'll give it a try - probably out drinking tonight, but will look at it tomorrow.

ps: do you have any sample animations that are more complex? i'm already getting 900fps on the morph of this... i'd like to start with something a bit slower - easier to find bottlenecks.

mike


On Mar 25, 2006, at 6:24 PM, Lo Saeteurn wrote:

Here is the code:
http://www.rpghorror.com/files/animationbuilder.zip

Let me know if it requires plugins or anything.
The actual modification of the memoryblock happens in the method: Animation3D->ApplyMorpth

Scroll to this code (it was a for loop, but I changed it recently for some reason):
      if Normals=NIL or Normals1=NIL or Normals2=NIL then
        //No normals to interpolate so interpolate just points
        do
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent //apply % tweening to points
          position=position+4
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent
          position=position+4
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent
          position=position+4
        loop until position>c2
      else
        //interpolate points and normals
        do
          //apply % tweening to points
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent
          //apply % tweening to Normals
          value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+ (Normals2.singleValue(position)-value1)*percent

          position=position+4
          //apply % tweening to points
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent
          //apply % tweening to Normals
          value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+ (Normals2.singleValue(position)-value1)*percent

          position=position+4
          //apply % tweening to points
          value1=Points1.singleValue(position)
points.singleValue(position) = value1+ (Points2.singleValue(position)-value1)*percent
          //apply % tweening to Normals
          value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+ (Normals2.singleValue(position)-value1)*percent
          position=position+4
        loop until position>c2


On Mar 25, 2006, at 2:57 PM, Mike Woodworth wrote:


On Mar 25, 2006, at 5:49 PM, Frank Condello wrote:

On 25-Mar-06, at 5:26 PM, Mike Woodworth wrote:

On Mar 25, 2006, at 5:06 PM, Frank Condello wrote:
...
VecAdd, VecSub, and VecMult (vec*scalar) methods would be enough to be useful, but more exotic combinations (VecAddMult) and Matrix methods (VecMultMat4x4) plus Double precision versions (VecAddD) would help flesh it out ;)
...

well, i've done exactly this for mac osx.

Awesome! Payware? Freeware? Open source?

as industrious a capitalist as i am... even i cant justify charging for single line declares that wrap apple's hard work :) besides, showing up those people who bitch about how slow RB is compared to C will be payment enough.


does anyone have a simple test doing this the old scalar way that they can send me? i'll shoe horn my vdsp classes in, and we can get some quantifiable numbers. prefereably some simple example where we can compare fps between the two methods. (i'm not up enough on rb3d to do this, otherwise i might take a crack at it, but i'd love to show you guys what i've been doing with veclib).

Lo's animation builder may be a good test app, but I can't seem to find a link anywhere (I'm sure he'll chime in later).

Frank.

great. lemme know Lo, and if you can point me to the methods that are doing this, that'll make the switch even easier. I was actually talkign to asher @ RW about how some judicious miss use of vectorized vImage calls might speed this kinda stuff up leaps and bounds. and there's nothing i love more than staring at shark profiles (i wish that was sarcastic, but alas i am that geeky)

mike
--
Mike Woodworth
mike at divergentmedia dot com


_______________________________________________
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>

--
Mike Woodworth
mike at divergentmedia dot com


_______________________________________________
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>

--
Mike Woodworth
mike at divergentmedia dot com


_______________________________________________
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>

--
Mike Woodworth
mike at divergentmedia dot com


_______________________________________________
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>