xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM WIP Beta forum => Topic started by: BenJeremy on January 06, 2004, 06:53:00 PM

Title: Upcoming Skinning Features
Post by: BenJeremy on January 06, 2004, 06:53:00 PM
user posted image

Can anybody tell me what they are looking at?  biggrin.gif

(Yes, it's a mess... it's a test skin... and yes, the effects are intentional)
Title: Upcoming Skinning Features
Post by: BenJeremy on January 06, 2004, 07:03:00 PM
For those interested, the skin file (Right-click, Save As)
Title: Upcoming Skinning Features
Post by: ub312g0d on January 06, 2004, 08:17:00 PM
hmm, seems like transparency on text(not sure if thats new), Angle's on picture's/vids, some new image resizing or something? how does the image angle's work? Hmm, what does the different variables on the image skew do? (Z, tu...) it also seems as though you can set conditions depending on what section your in.  like having certain things light up when youre in apps, or games or whatnot.

This post has been edited by ub312g0d: Jan 7 2004, 04:22 AM <
Title: Upcoming Skinning Features
Post by: BenJeremy on January 06, 2004, 08:21:00 PM
QUOTE (ub312g0d @ Jan 6 2004, 11:06 PM)
hmm, seems like transparency on text(not sure if thats new), Angle's on picture's/vids, some new image resizing or something? how does the image angle's work? will you have to set each corner's xy co-ordinates?

Close.... it's "ZPoints" X, Y, Z, and Normal plus Texture placement on 4 points, instead of a normal position.

I had the idea stuck in my head tonight, so I put it into practice. The twisted image above is really two image gadgets, using different ZPoint sets.

You create a named set of points, then use those in the element. elements can share ZPoint sets (needed when I get a tweening modifier for smooth scroll of an element, textured onto a quad moving in 3-D space.  <
Title: Upcoming Skinning Features
Post by: ub312g0d on January 06, 2004, 08:26:00 PM
Any eta on when alpha masking will be enabled? That(aside from 3d skinning) is the feature im most looking foward to in the future.  The image skewing must be good for something...  <
Title: Upcoming Skinning Features
Post by: BenJeremy on January 06, 2004, 08:32:00 PM
QUOTE (ub312g0d @ Jan 6 2004, 11:15 PM)
Any eta on when alpha masking will be enabled? That(aside from 3d skinning) is the feature im most looking foward to in the future.  The image skewing must be good for something...

Well, technically, it's not just skewing, it's moving all four corners in 3-D... if I add a tweening modifier tied to the smooth-scroll ticker, you'll be able to move text elements and image elements around in 3-D (think about it for a moment).

As for alpha masking, I really need to bang on the rendering stuff for that... I'm always scanning for information on how it might be done. It should be simple - but I'm thinking I'll have to write a pixel shader to do it (something new for me) if I can find a standard set of operators to do it. It's low priority compared to the other things I'm doing for the new release. .7 will be 'significant' - and the skins will add some impressive capabilities. I might also dabble with 3-D objects.  <
Title: Upcoming Skinning Features
Post by: koldfuzion on January 06, 2004, 07:25:00 PM
damn awesome!   i see you have the previously mentioned pinwheel menu working too.. very nice!

what are the 1 2 3 4 5 for?

QUOTE
The image skewing must be good for something...


What if you had a kick ass layout with a tv in it (think the RING skin) but the TV was at a slant, so much that you couldnt create a skin with it because the perspective would look all FU.  

thats what makes it incredibly delicious. smile.gif
Title: Upcoming Skinning Features
Post by: fLEx7325 on January 06, 2004, 10:10:00 PM
Nice! I can imagine the possibilities.. That new menu feature can make skins look more 3d and it looks like u could probably use it to look like the ms dash.  Could those point modifiers (skew) also be used on preview vids, and text? I was just thinking of a skin that could use that feature.  Oh, and do u have an ETA for the public release?  wink.gif
Title: Upcoming Skinning Features
Post by: DBZRacer on January 06, 2004, 11:32:00 PM
OOOOHHHH!!! ZPoints!!! And that pinwheel menu looks awesome!

To add to KF's question, why is it that Futuram is selected but Conflict Desert Storm is the preview vid?  <
Title: Upcoming Skinning Features
Post by: koldfuzion on January 06, 2004, 10:45:00 PM
geniusalz better quit playing tetris and get hot on some dx programming,  gonna be hard for MXM Skinner to keep up. smile.gif
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 01:17:00 AM
QUOTE (koldfuzion @ Jan 6 2004, 11:25 PM)
damn awesome!   i see you have the previously mentioned pinwheel menu working too.. very nice!

what are the 1 2 3 4 5 for?

QUOTE
The image skewing must be good for something...


What if you had a kick ass layout with a tv in it (think the RING skin) but the TV was at a slant, so much that you couldnt create a skin with it because the perspective would look all FU.  

thats what makes it incredibly delicious. smile.gif

The 1 2 3 4 5 is using conditionals to enable/disable a numeric selection based on the displayed values.

Basically, it's possible to make a custom menu/skin combo, for example, that features hotspot-type selection.

The pinwheel arrangement are text fields using offsets into what's selected. There is also no stop on either end -  the menu cycles from bottom to top and vice-versa.

The ZPoints need to be calculated, if shifting through the "Z" values... but that should be a trivial exercise for somebody who knows what they are doing. My example isn't too careful about handling that, thus the ugly placement and skewing.
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 01:19:00 AM
QUOTE (DBZRacer @ Jan 7 2004, 02:21 AM)
OOOOHHHH!!! ZPoints!!! And that pinwheel menu looks awesome!

To add to KF's question, why is it that Futuram is selected but Conflict Desert Storm is the preview vid?

That's because it's using an offset value to show the "previous" preview video.

The "WIP" has the ability to do a CIRKULAR-type menu layout in a more direct manner.

biggrin.gif
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 01:23:00 AM
QUOTE (fLEx7325 @ Jan 7 2004, 02:10 AM)
Nice! I can imagine the possibilities.. That new menu feature can make skins look more 3d and it looks like u could probably use it to look like the ms dash.  Could those point modifiers (skew) also be used on preview vids, and text? I was just thinking of a skin that could use that feature.  Oh, and do u have an ETA for the public release?  wink.gif

Yes, I have ZPoints working on image elements (which means static or video), and I'll also add the capability to text elements and maybe even the menu. Once the "tween" modifier is in place, you'll be able to create very sophisticated pseudo-menu blocks using text fields, though...


As for an ETA, well, I have to finish the System UI, Plug-In system, and remove the need for MXM.xml in "Dash mode" (user will edit all settings from the system menu) before it goes "public"
Title: Upcoming Skinning Features
Post by: geniusalz on January 07, 2004, 02:49:00 AM
Oh wow, where have I been?  Tweening is good, actually, great.  I always wanted that.  3d is good too

KF: I actually was looking over some directx stuff recently to use in skinner, but right now I don't have anything figured out.
MY motivation was the awful slowness of alpha-blended PNG files, that can have a much higher framerate using directx.  Also, I'd be able to do semitransparent boxes and such.

Yeah, and if you know anyone that can do directx in vb (or even c++, as long as they make an activex object out of it), refer them to this thread
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 05:27:00 AM
I'll post an update to MXM tonight, probably, with the ZPoints capability.

I wished I had time to get on those ActiveX components for you, geniusalz... I really want to get the FontBundler stuff moved out of the "illegal" status and into a nice cohesive tool.  <
Title: Upcoming Skinning Features
Post by: MrSelfDestruct on January 07, 2004, 07:58:00 AM
QUOTE (BenJeremy @ Jan 7 2004, 02:16 PM)
I'll post an update to MXM tonight, probably, with the ZPoints capability.

I cant wait for this. 3d skins sounds dank
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 08:31:00 AM
QUOTE (MrSelfDestruct @ Jan 7 2004, 11:58 AM)
QUOTE (BenJeremy @ Jan 7 2004, 02:16 PM)
I'll post an update to MXM tonight, probably, with the ZPoints capability.

I cant wait for this. 3d skins sounds dank

I'm tweaking the "ZPoints" concept a hair.... you'll be able to tell MXM what the primitive type is (such as a triangle list, or fan) and make more complex "objects" - just make sure you get the mappings correct. wink.gif So you'll be able to wrap textures around fairly complex objects. How I go about handling them with modifiers... well, that's anubody's guess.

I'll have to play around with the modifier stuff, for now, the easiest will be a tweener, which merely maps, point-for-point between two sets (no mismatches - if you are using the QUADLIST ZPoint set as the bas, you must use the same for a destination) given a value between 1.0 and -1.0 (0.0 represents the "base" location). As you scroll back and forth, during the smooth scroll process, I'll adjust the tweener number.

I may also allow a "source" (other than the smooth-scroll period) for the tweener, just to make it generic, and later allow you to put it on a timer, causing an object to move between points, for example. Dunno... I'm sure when I get it in, somebody will figure out ways to do crazy $hit with it.  laugh.gif

For smooth-scrolling 3-D animation in menus, you'd set up a tweener modifier with two sets of Z-Points - the Previous item location and the next item location, for each item displayed... set the source as the menuscroller, and for end items, you might have to get creative (actually, you could shift the texture mapping - the last two numbers in the ZPoint)


For those who know the math, you can do some wild things. Each "Z Point" is 6 values:

X (0-640), Y (0-480), Z (0-1.0), Normal (-1 to 1), TextureU (0 to 1), TextureV (0 to 1)

Normals can be changed to warp the image's appearance. The textureU is like the "X" of the texture (V is the "Y") and you can adjust those values to slide things around. Quads are defined in a clockwise manner (Top Left, Top Right, Bottom Right, Bottom Left).

I'll try a preview video tonight, when I get home, to make sure that still works fine.

Title: Upcoming Skinning Features
Post by: geniusalz on January 07, 2004, 09:29:00 AM
Custom animated menus are great.  Can't wait.

Cirkular remix very high on my todo list.  (Maybe I'll make it low resource so it can be included with MXM)
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 10:31:00 AM
QUOTE (yourwishismine @ Jan 7 2004, 02:25 PM)
QUOTE (geniusalz @ Jan 7 2004, 01:29 PM)
Custom animated menus are great.  Can't wait.

Cirkular remix very high on my todo list.  (Maybe I'll make it low resource so it can be included with MXM)

I liked the thought in Circular, but when I went to use it, it was really slow and seemed buggy... as it didn't accept my menu selections about 20% of the time, tryed it on both my xboxes and got the same results... it was difficult to navigate as well... as it only seemed to accept left and right on the game controller instead of the standard up and down... I'm not dissing your skin genuisalz... when I saw the screen shots of it.. I wanted to use it as my main skin.. but then I was disappointed by the troubles that I had with the above mentioned... I have used other skins that really slowed down the box, other wise great skins, just too resource hungry...

Well, to defened geniusalz on the left/right thing... I think that was the intention there. Some people like the "horizontal" navigation for menus. The option is for horizontal or vertical... not both (though I could add that, as confusing as it might be for some.).
Title: Upcoming Skinning Features
Post by: geniusalz on January 07, 2004, 10:52:00 AM
QUOTE (yourwishismine @ Jan 7 2004, 03:25 PM)
it didn't accept my menu selections about 20% of the time, tryed it on both my xboxes and got the same results...

Not accept menu selections as in ignore the keypresses?  Don't know why it would do that.  It worked for me 100%

The skin had no video in the main layout (besides the preview vid).  I guess the problem could be that I was using 2 fullscrees alpha png's instead of just one overlay.  But that should never be a problem.
Speed was fine on my xbox.

One problem was that it didn't show folder icons properly, so I had to remove them from the smaller thumbnails.  However, the new version of MXM supports multiple thumbnails without having to create multiple menu elements, so that will be fixed.
Title: Upcoming Skinning Features
Post by: SlackNet on January 07, 2004, 11:07:00 AM
I can't wait to see all the crazy stuff that comes for this.....It's going to be sweet!
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 11:41:00 AM
I should probably qualify my earlier statement, BTW... the update tonight will be a "WIP" binaries update, not a public release.

(Of course, that depends on how late I have to work tonight, since we are in crisis mode ATM)
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 01:05:00 PM
QUOTE (DBZRacer @ Jan 7 2004, 04:52 PM)
QUOTE (BenJeremy @ Jan 7 2004, 01:41 PM)
(Of course, that depends on how late I have to work tonight, since we are in crisis mode ATM)

Since when does work not revolve around crisis modes?  laugh.gif

Well, the thing is, I'd be home right now, except we have to call Japan - thus the late work day... but hopefully we can resolve some issues.
Title: Upcoming Skinning Features
Post by: BenJeremy on January 07, 2004, 06:35:00 PM
OK, I've updated the "WIP" binaries with the new "ZPoints" stuff, including the "Tweener"

New screenshot (Updated - "Refresh"if you don't see Godzilla)

user posted image

Yes, those are warped videos.

and the MXM_Skin.xml used....

Look at it for an example of how to do the ZPoints and Tweener modifiers. I basically created a layout in Corel Draw, rotating my blocks, then exported as a 640x480 jpg, and used the pixel positions for each corner to position the text element ZPoints.

The tweener is a bit crude at the moment. I am considering expanding it to allow multiple "tweens" -  Instead of A -> B, you might have A -> B -> C -> D, but the tweening looked good enough in my test.
Title: Upcoming Skinning Features
Post by: Jezz_X on January 07, 2004, 11:01:00 PM
QUOTE


   <Layout Screen="Menu">
  <LayoutElement Type="Text" Source="CGTitle" Section="-2">
     <TextColor>0xA8FFFFFF</TextColor>
     <Pos L="117" T="126" W="101" H="32"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="-1">
     <TextColor>0xD4FFFFFF</TextColor>
     <Pos L="126" T="151" W="132" H="27"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle">
     <TextColor>0xFFFFFF00</TextColor>
     <Pos L="136" T="183" W="183" H="52"/>
     <IsMenu Wrapped="true" Horizontal="false">true</IsMenu>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="1">
     <TextColor>0xD4FFFFFF</TextColor>
     <Pos L="123" T="210" W="186" H="32"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="2">
     <TextColor>0xA8FFFFFF</TextColor>
     <Pos L="107" T="238" W="205" H="52"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="3">
     <TextColor>0x7FFFFFFF</TextColor>
     <Pos L="79" T="252" W="339" H="63"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="-3">
     <TextColor>0x7FFFFFFF</TextColor>
     <Pos L="85" T="109" W="170" H="20"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="-4">
     <TextColor>0x54FFFFFF</TextColor>
     <Pos L="59" T="126" W="131" H="19"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="4">
     <TextColor>0x54FFFFFF</TextColor>
     <Pos L="57" T="236" W="142" H="32"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="5">
     <TextColor>0x29FFFFFF</TextColor>
     <Pos L="48" T="211" W="104" H="22"/>
  </LayoutElement>
  <LayoutElement Type="Text" Source="CGTitle" Section="-5">
     <TextColor>0x29FFFFFF</TextColor>
     <Pos L="41" T="149" W="100" H="23"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="GameIconP">
     <Scaling X="True" Y="True"/>
     <Pos L="360" T="150" W="40" H="33"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="GameIcon">
     <Scaling X="True" Y="True"/>
     <Pos L="374" T="192" W="46" H="35"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="GameIconN">
     <Scaling X="True" Y="True"/>
     <Pos L="363" T="231" W="45" H="34"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="PreviewMediaP">
     <Scaling X="True" Y="True"/>
     <Pos L="380" T="12" W="135" H="97"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="PreviewMedia">
     <Scaling X="True" Y="True"/>
     <Pos L="462" T="155" W="141" H="107"/>
  </LayoutElement>
  <LayoutElement Type="Image" Source="PreviewMediaN">
     <Scaling X="True" Y="True"/>
     <Pos L="398" T="287" W="144" H="116"/>
  </LayoutElement>
   </Layout>
</
Title: Upcoming Skinning Features
Post by: geniusalz on January 08, 2004, 12:12:00 AM
QUOTE (BenJeremy @ Jan 7 2004, 11:35 PM)
OK, I've updated the "WIP" binaries with the new "ZPoints" stuff, including the "Tweener"

New screenshot (Updated - "Refresh"if you don't see Godzilla)

user posted image

Yes, those are warped videos.

and the MXM_Skin.xml used....

Look at it for an example of how to do the ZPoints and Tweener modifiers. I basically created a layout in Corel Draw, rotating my blocks, then exported as a 640x480 jpg, and used the pixel positions for each corner to position the text element ZPoints.

The tweener is a bit crude at the moment. I am considering expanding it to allow multiple "tweens" -  Instead of A -> B, you might have A -> B -> C -> D, but the tweening looked good enough in my test.

cool!

I tried it out, and it looks good.  However, there is a little problem with text being horizontally compressed.  Here's what I mean

When you start MXM, the text is fine.
user posted image
When you go to an item with long text, it gets horizontally compressed (expected)
user posted image
However, when you go back to the short text it also gets compressed (not expected)
user posted image
Title: Upcoming Skinning Features
Post by: geniusalz on January 08, 2004, 12:37:00 AM
This really is amazing.

A few suggestions:
-Allow a tween speed modifier
-Tween for the color tag as well
-Easing options

-Most important IMO, the ability to define MXM to wait for an animation to complete before starting the new one.  Animation could be speeded up by using the shift key in realtime.  I'm saying this because the current system looks amazing when you scroll one at a time, but holding the directional button down just kills the effect.

Again, thanks for an amazing dash, and continuous dedication to make it even better
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 01:44:00 AM
QUOTE (unleashx @ Jan 7 2004, 11:13 PM)
That's some extreme stuff your doing there, BJ. Really great. beerchug.gif

Maybe I should talk to you more (but not before I reach my goal) biggrin.gif . Keep up the good work.

This is OT and please pardon me, but anyways, I'm thinking of some ways to add a new the menu layout in UnleashX. There are two things I'm looking at: 1) Horizontal (due to requests) and 2) Fix points. Number 1 is easy enough but Number 2 is what I'm very keen on doing and been giving a thougt for a while. Basically, the user (thru skinning of course), will provide a series of coordinates for each menu item (X, Y and Width only, no Z-Points biggrin.gif ). The items will be displayed using these coordinates, instead of being listed down vertically or horizontally. This will give the user the capability to have several columns, rounded or even V-shaped layout for the menus or like the menu in DVD movies. Now, I don't know how your DVD mode or CDI (or was it XDI? I beg your pardon) mode works, but if it was something similar or even the same, I'd like you to know in advance that I'm planning to do this (too) and hope that you don't get offended or anything. The "dev scene" is a little bit shaky right now and I don't wanna rock the boat a little further. Please tell me what you think.

OK... "DVD-R" mode is basically just intended to force MXM to optimize for DVD operations. XDI mode is a compatibility mode to work with the old CPX MenuX created menus, so MXM can simply replace the menux xbe. They don't really effect skinning all that much, but alter some things to give priority for the skinner, since in all likelyhood, the skins were selected to go with the collection of games or programs on a DVD-R.

As for the "free form" menus and such, I'm using the "gadget strings" AKA text elements, to display the information. By adding the ability to use offset information in the skin, I can internally change the text to match a menu item to be displayed. The nice thing about XML is that you can "add" to your specification fairly easily. In this case, we are unhooked from a normal menu block (the logic for running it is not completely tied to the menu block in the app).

Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 01:50:00 AM
QUOTE (geniusalz @ Jan 8 2004, 04:37 AM)
This really is amazing.

A few suggestions:
-Allow a tween speed modifier
-Tween for the color tag as well
-Easing options

-Most important IMO, the ability to define MXM to wait for an animation to complete before starting the new one.  Animation could be speeded up by using the shift key in realtime.  I'm saying this because the current system looks amazing when you scroll one at a time, but holding the directional button down just kills the effect.

Again, thanks for an amazing dash, and continuous dedication to make it even better

The tween is currently based on a fixed value, 500ms, which will be adjustable soon. It's tied into the main system, to keep the tween value constant among all elements using it.

Color is one I hadn't thought of. I will look at adding that.... I was going to add an Opacity value to the ZPoints, too.

Easing Options?

On the issue of waiting for the animations to complete - yes, I thought about that last night. I will fix it so if the tween is in progress, it will not start a new one (unless the direction is different). Some tweeking in the special case of changing direction, though.


The text issue is another thing I will look at. I have an idea what might be happening there.

Oh.... I also forget to add the tweener to the image element. I'll throw that in tonight, depending on what time I finish work (another conference call to Japan)
Title: Upcoming Skinning Features
Post by: geniusalz on January 08, 2004, 01:54:00 AM
Easing as in accelerating/decelerating tweens (a la Macromedia Flash)
Its a neat effect.
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 01:57:00 AM
QUOTE (geniusalz @ Jan 8 2004, 05:54 AM)
Easing as in accelerating/decelerating tweens (a la Macromedia Flash)
Its a neat effect.

Ahh... so as I go between 0.0 and 1.0, the number would change as it approached either end? OK, I'll think about that one.
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 02:33:00 AM
Does anybody have a handy function to take a time period value between 0.0 and 1.0 and return an "eased" tween value such as this graph displays:

user posted image
Title: Upcoming Skinning Features
Post by: geniusalz on January 08, 2004, 02:44:00 AM
Well, Flash does only one of easing in or out, (lets you specify which one, and the amount of easing)
But both can also work together

user posted image
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 04:07:00 AM
laugh.gif


Now, can somebody give me the quicky formulas for each of these?

I could probably work it out myself, but that might take some time... what I'm looking for is a simple C function I can call like so:

float CalculateEasedTween( float fValue, int iStyle ) // Where 0=neither (returns fValue), 1=Ease In, 2=Ease Out and 3=Ease both


Any takers?

Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 05:05:00 AM
Oh... and when I get some more "tweening" sources (such as periodic timers), I can do some much nicer scrolling text fields.
Title: Upcoming Skinning Features
Post by: crobar on January 08, 2004, 09:19:00 AM
QUOTE

yspeed = .2;
yfriction = .1;
ygravity = .8;
yweight = .10;
ythrust = 1.4;
ygoal = 130;
xgoal = 23;

yspeed = yspeed*yfriction+(ygoal-_y)*ygravity*yweight*ythrust;
_y += yspeed;
yspeed = yspeed*yfriction+(xgoal-_x)*ygravity*yweight*ythrust;
_x += yspeed;
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 09:28:00 AM
QUOTE (crobar @ Jan 8 2004, 01:19 PM)
i have some tweening scripts i worked on in flash...im not sure if you could use those or not...

QUOTE

yspeed = .2;
yfriction = .1;
ygravity = .8;
yweight = .10;
ythrust = 1.4;
ygoal = 130;
xgoal = 23;

yspeed = yspeed*yfriction+(ygoal-_y)*ygravity*yweight*ythrust;
_y += yspeed;
yspeed = yspeed*yfriction+(xgoal-_x)*ygravity*yweight*ythrust;
_x += yspeed;

I appreciate it... but that's awfully complicated (as if the underlying stuff isn't alreayd complicated  huh.gif ).

I'm just looking for a function that takes a value form 0.0 to 1.0 and spits outa value from 0.0 to 1.0, with the "ease" factor built in. Nothing specific really required on the "ease factor" - any arbitrary value should do there.

Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 10:47:00 AM
blink.gif

Phew... hopefully, work on the eye candy will be mostly done by tomorrow night, and I can get the UI hammered out (swing by the Actionscripting forum to check out the white papers on the other two things I'll complete for the next public release as part of the FileManager enhancements)



Title: Upcoming Skinning Features
Post by: geniusalz on January 08, 2004, 01:08:00 PM
CODE
float CalculateEasedTween( float fValue, int iStyle )
{
 if(iStyle == 0)
   return fValue;
 else if(iStyle == 1)
   return pow(fValue, 2);
 else if(iStyle == 2)
   return 1 - (pow (1 - fValue, 2));
 else if(iStyle == 3)
   if(fValue<0.5)
     return 2 * pow(fValue,2);
   else
     return 1 - (2 * pow(1 - fValue, 2));
 else
   return 0;
}


They do plot right, tell me if they work right as well
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 01:15:00 PM
Cool. When I get home tonight I'll give it all a shot.
Title: Upcoming Skinning Features
Post by: BenJeremy on January 08, 2004, 01:27:00 PM
Tweener modifier options:

<Modifier Type="Tweener">
<Prev>SomeZPoint</Prev>
<Next>SomeOtherZPoint</Next>
<NextColor>0x00000000</NextColor> (Fade into black oblivion?)
<PrevColor>0xFFFFFFFFF</PrevColor> (Fade into burning whiteness?)
<Source>MenuScroll</Source>
<Period>1000</Period> (This will be the same as setting MenuScroll in <Periods> of skin)
<Ease>both</Ease>
</Modifier>

Of course, the comments would not be in your skin file....

Options for "Ease":
  • None (Default)
  • In
  • Out
  • Both

    Options for "Source":
  • MenuScroll
     Attached to menu up/down
  • Periodic
     Moves between source and Next ZPoint set on cyclical period 0 -> 1
  • ReversePeriodic
     Moves between Next and source ZPoint set on cyclical period 1 -> 0
  • CylonEye
     Moves back and forth between Next and source ZPoint set on cyclical period 0 -> 1 -> 0 -> 1 and so forth.

    One interesting idea I had was to create a simulation of the NYC Times Square "Zipper" - having the newsfeed zip around a corner of a building....


  • Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 01:51:00 PM
    CODE
    float CalculateEasedTween( float fValue, int iStyle, float fFactor )
    {
     float fFactor2 = fFactor * 3 + 1;
     
     if(iStyle == 0)
       return fValue;
     else if(iStyle == 1)
       return pow(fValue, fFactor2);
     else if(iStyle == 2)
       return 1 - (pow (1 - fValue, fFactor2));
     else if(iStyle == 3)
     {
       float fMultiplier = 0.5 / pow(0.5, fFactor2);

       if(fValue<0.5)
         return fMultiplier * pow(fValue, fFactor2);
       else
         return 1 - (fMultiplier * pow(1 - fValue, fFactor2));
     }
     else
       return 0;
    }
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 02:00:00 PM
    Little test:

    user posted image

    EDIT: The styles actually are 0,1,2,3 but I don't feel like changing it

    And the other function was the equivalent of a 0.33 factor
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 02:07:00 PM
    QUOTE (BenJeremy @ Jan 8 2004, 06:27 PM)
    CylonEye
     Moves back and forth between Next and source ZPoint set on cyclical period 0 -> 1 -> 0 -> 1 and so forth.

    laugh.gif , couldn't you just call it cycle or something?
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 02:25:00 PM
    QUOTE (geniusalz @ Jan 8 2004, 06:07 PM)
    QUOTE (BenJeremy @ Jan 8 2004, 06:27 PM)
    CylonEye
      Moves back and forth between Next and source ZPoint set on cyclical period 0 -> 1 -> 0 -> 1 and so forth.

    laugh.gif , couldn't you just call it cycle or something?

    By your command!  laugh.gif  I'll change it to K.I.T.T.




    I'll add the ease factor when I get home. Just got off my conference call, but I need to wait for some files to be e-mailed here at work (I'll be at another location in the morning)
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 05:02:00 PM
    :::sigh:::

    Well, didn't fix the text resizing issue, but give the latest "WIP" a whirl, as I've posted it.

    Opacity isn't functional yet, but color should be working (so for text, you could use that to alter the opacity)
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 05:28:00 PM
    I'm on it
    Is the ease factor in yet?
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 05:29:00 PM
    smile.gif
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 05:42:00 PM
    <EaseFactor>1.0</EaseFactor> ?
    Color tween works sweet.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 05:56:00 PM
    laugh.gif
    All I see is (float) (double) 1.0f etc etc
    Didn't know C++ was that bitchy about types (I thought java was bitchy enough)

    Anyway,
    >>>    return fValue;
    should be
    >>>   return fReturn;

    And I read somewhere pow was overloaded.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 05:59:00 PM
    QUOTE (geniusalz @ Jan 8 2004, 09:56 PM)
    You made mincemeat of my code! laugh.gif
    All I see is (float) (double) 1.0f etc etc
    Didn't know C++ was that bitchy about types (I thought java was bitchy enough)

    Anyway,
    >>>    return fValue;
    should be
    >>>   return fReturn;

    Doh! Quick fix... I'm uploading the update at the moment. 1 minute for the binaries, a bit longer for the source.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 06:01:00 PM
    Yeah, pow() goes a bit crazy, and I like to cast, anyway.... it always pays to make explicit casts for things (prevents some potential bugs)
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 06:24:00 PM
    CODE
     
        0xA8FFFFFF
        
        
       MenuP1
       MenuP3
       
       both
       0.2
       0xD4FFFFFF
       0x00000000
       MenuScroll
        

        
     

     
        0xD4FFFFFF
        
        
       Menu0
       MenuP2
       0xFFFFFF00
       0xA8FFFFFF
       
       both
       0.2
       MenuScroll
        

        
     

     
        0xFFFFFF00
        
        
        
       MenuN1
       MenuP1
       0xD4FFFFFF
       0xD4FFFFFF
       
       both
       0.2
       MenuScroll
        

        true
     

     
        0xD4FFFFFF
        
        
       MenuN2
       Menu0
       0xA8FFFFFF
       0xFFFFFF00
       
       both
       0.2
       MenuScroll
        

        
     

     
        0xA8FFFFFF
        
       
       MenuN3
       MenuN1
       0x00000000
       0xD4FFFFFF
       
       both
       0.2
       MenuScroll
        

        
     
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 08, 2004, 06:58:00 PM
    I'll take a look at things, but the tween is already "cooked" at that point to be a value from 0.0 to 1.0

    Dunno why it's not working with the period tag. Strange.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 08, 2004, 07:13:00 PM
    huh.gif

    edit:
       else if ( _tcsicmp( sEaseType, _T("in") ) == 0 )
       {
          m_iEaseType = ETT_NONE;
       }
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 02:07:00 AM
    QUOTE (geniusalz @ Jan 8 2004, 11:13 PM)
    Up/down problem happens with 'out' and 'both'.  'In' doesn't work at all, even though the code is the simplest huh.gif

    edit:
       else if ( _tcsicmp( sEaseType, _T("in") ) == 0 )
       {
          m_iEaseType = ETT_NONE;
       }

    OK.... figured out a few problems, and fixed them.

    Try out the latest update which I just upped a few minutes ago.

    Now off to work (no net access there, either sad.gif but I'll be busy testing product on the bench, so no time for it anyway... I'll make an appearance around lunch time)
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 03:04:00 PM
    CODE
     
        0xA8FFFFFF
        
        
       MenuP1
       MenuP2
       500
       in
       0.33
       0xD4FFFFFF
       0x00000000
       MenuScroll
        

        
     

     
        0xD4FFFFFF
        
        
       Menu0
       MenuP2
       0xFFFFFF00
       0xA8FFFFFF
       500
       in
       0.33
       MenuScroll
        

        
     

     
        0xFFFFFF00
        
        
        
       MenuN1
       MenuP1
       0xD4FFFFFF
       0xD4FFFFFF
       500
       in
       0.33
       MenuScroll
        

        true
     

     
        0xD4FFFFFF
        
        
       MenuN2
       Menu0
       0xA8FFFFFF
       0xFFFFFF00
       500
       in
       0.33
       MenuScroll
        

        
     

     
        0xA8FFFFFF
        
       
       MenuN2
       MenuN1
       0x00000000
       0xD4FFFFFF
       500
       in
       0.33
       MenuScroll
        

        
     
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 03:08:00 PM
    I think it has something to do with the position... I see the effect right now (time for dinner, though), as I was just checking out the color tweening myself.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 03:44:00 PM
    My guess is that the problem has to do with the fact that there are only 5 textboxes on the screen at any given time.  When going 'next', each one moves in from the 'next' position.  Since there is no textbox that has 'next' as the topmost textbox, it disappears.

    Maybe I'll add a duplicate text element at each end
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 03:46:00 PM
    QUOTE (geniusalz @ Jan 9 2004, 07:44 PM)
    My guess is that the problem has to do with the fact that there are only 5 textboxes on the screen at any given time.  When going 'next', each one moves in from the 'next' position.  Since there is no textbox that has 'next' as the topmost textbox, it disappears.

    Maybe I'll add a duplicate text element at each end

    Yes, that's it. It needs an "invisible" item on each end, for the end item to fade into.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 04:14:00 PM
    Yes, that fixed the visual effect nicely....


    My test menu file

    I added "3" and "-3" elements, normall invisible, but fading to the prev/next color on the appropriate ends.

    Period of 200 looks nice. Might even be ok with a faster one, but then you'll lose any smoothing with "ease" options.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 04:16:00 PM
    Oh, and for those looking for "masked video" - you can now do this, after a fashion, by using a ZPoint set of TriangleList primitieves to create the area you want to display, leaving off, of course, the holes. Tricky part: Mapping the TU/TV coordinates to the triangle vertices (get out your graph paper!)
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 05:17:00 PM
    sad.gif
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 05:25:00 PM
    user posted image

    It's a sequence of points, in multiples of 3 describing a set of one or more triangles in 3-D space. With a ZPoint set, you can define a hundred of these triangles, for example, in full 3-D, and map a texture on it.

    In the image above (Snagged via GIS), you could define the two triangles with 6 points. Put them together, and you get a quadrangle (but then you could use a quadlist.


    user posted image

    Trianglefans start at a point, then you "splay out" with subsequent points (at least 2 more) - they are very efficient.

    user posted image

    TriangleStrips are also efficient.

    Mapping for TU and TV is simple enough - TU is between 0.0 and 1.1 representing the width of the texture applied to it. Mapping TU=1.0 and TV=0.0 means you've mapped the Top Right corner of the texture to the vertice (or point) when the Xbox renders the triangle.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 05:33:00 PM
    Wow.  I haven't ever played with DX 3D stuff, but I think I got it.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 05:40:00 PM
    QUOTE (geniusalz @ Jan 9 2004, 09:33 PM)
    Wow.  I haven't ever played with DX 3D stuff, but I think I got it.

    Yeah, it's not too hard. Keep the "Normal" (Fourth parameter) at 1.0 and it will be fine - that's the angle from the vertice, in this case a right angle, that the texture is laid onto the primitive. Warp the normal and you get funky effects. This is used for things like spheres and such...

    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 05:46:00 PM
    wink.gif

    I'm seeing something here
    Spherikal!
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 06:25:00 PM
    dry.gif at all...
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 06:33:00 PM
    QUOTE (geniusalz @ Jan 9 2004, 10:25 PM)
    Hmm.. Z and N values don't seem to do anything dry.gif at all...

    Try intersecting two primitives with differing Z values.

    They become more useful with rotations, anyway.

    Hmmm... Normals not working? They are assigned with "w="  in the point element.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 06:55:00 PM
    Ah, thanks.
    Know of a place I can find a detailed guide for this?
    Edit: or an app that lets me do this in realtime.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 09, 2004, 07:04:00 PM
    QUOTE (geniusalz @ Jan 9 2004, 10:55 PM)
    Ah, thanks.
    Know of a place I can find a detailed guide for this?
    Edit: or an app that lets me do this in realtime.

    Hmmm... you might be able to with some 3-D apps, then export to 3ds, which I think is a text-based format, and grab mappings and such from that.

    Dunno... I'm just getting into the 3-D stuff from the programming end in earnest.
    Title: Upcoming Skinning Features
    Post by: geniusalz on January 09, 2004, 07:14:00 PM
    Too bad Blender doesn't do 3ds ... only VRML.  It's only 2.2 megs too


    BTW, can you set the priority of the video thread to low?  This will prevent a lot of choppiness with the menu animations.
    Title: Upcoming Skinning Features
    Post by: BenJeremy on January 10, 2004, 03:44:00 AM
    QUOTE (geniusalz @ Jan 9 2004, 11:14 PM)
    Too bad Blender doesn't do 3ds ... only VRML.  It's only 2.2 megs too


    BTW, can you set the priority of the video thread to low?  This will prevent a lot of choppiness with the menu animations.

    Hmmm.... perhaps VRML format might give you the information you need. It's XML like, isn't it?

    As for the choppiness, that's a side effect of loading the video files from the hard drive (bandwidth bugaboo) - The test skin gets bad when more than one preview video is opened at a time, and on my system it's particularly bad, because the drive is dying. Don't know that there's much ofa way to smooth it out, as the video is somewhat tied into the frame rendering anyway. I will be working on some of the image rendering stuff anyway...
    Title: Upcoming Skinning Features
    Post by: BenJeremy on February 27, 2004, 05:04:00 AM
    QUOTE (boomboom @ Feb 27 2004, 03:16 AM)
    BJ - I've been working on the UnleashX converter code some more, (I'll have a complete list of modifications needed to be 100% compatible with UnleashX skins).  

    I was wondering, though, if you could allow values greater than 1 for TU and TV?  That way, you can tile textures (think the background for UnleashX/MS Dash).

    It would depend on my addressing mode, but you could try it out.... I may need to include the texture addressing mode in the ZPoint spec.
    Title: Upcoming Skinning Features
    Post by: boomboom on February 27, 2004, 07:33:00 AM
    What may be easy is to include tweens based on the passage of time.  You could tween the X-Y coordinates of the tiled texture.  This way, you wouldn't have to rotate the entire 3d object, but just alter the Y value of the texture:

    Matrix uvmat = Matrix.Identity;
    uvmat.Translate(0,slide,0);
    dev.Transform.Texture0 = uvmat;
    dev.TextureState[0].TextureTransform =
    TextureTransform.Count2;
    dev.SamplerState[0].AddressU = TextureAddress.Wrap;
    dev.SamplerState[0].AddressV = TextureAddress.Wrap;

    This would allow UnleashX type animation (normals on a sphere pointed inwards, sphere encloses viewport, texture spinning).

    What fun!  I'm envious that you get to write this code!  Fun, fun, fun!