[Preset] Woofer.vtx

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
morte0815 Offline
Member
Posts: 59
Joined: Sep 2004
Reputation: 0
Location: Germany
Post: #1
Hi!

This is my first preset. I hope you like it.
PHP Code:
// woofer.vtx
// Author - morte0815

float angle 0;

void Init()
{

}

void Quad(float xfloat yfloat zfloat widthfloat tu_u,float tv_lfloat tu_b float tv_r)
{
gfxBegin(PRIM_QUADLIST);
gfxTexCoord(tu_utv_l);
gfxVertex(x,y,z);
gfxTexCoord(tu_btv_l);
gfxVertex(x+width,y,z);
gfxTexCoord(tu_btv_r);
gfxVertex(x+width,y+width,z);
gfxTexCoord(tu_utv_r);
gfxVertex(x,y+width,z);


gfxEnd();
}


float Length(float xfloat y)
{
  return 
Sqrt(x*x+y*y);
}

void Render()
{
  if (
BASS>0.5f)angle += TIMEPASS*5;
  if (
BASS<0.5f)angle -= TIMEPASS*5;
  
  
gfxTranslate(0025.0f);
    
    
gfxRotate(-100,1,0,0);
    
gfxRotate(angle,0,0,1);
  
  
    
gfxSetTexture(TEXTURE_ALBUMART);
    
    for (
int i = -1010i++)
  {
    for ( 
int j = -1010j++)
    {
      if (
Length(i,j) <= 10)
      {
      
float height=(Length(i,j)/10.0f*BASS);
      
height+=((10.0f-Length(i,j))/10.0f*TREBLE);
      
height+=((5.0f-Length(i,j))/10*MIDDLE);
      
Quad(i,j,height,1,(i+10)/20.0f,(j+10)/20.0f,(i+1+10)/20.0f,(j+1+10)/20.0f);
      }
    }
  }
  
  
  
      
    
gfxEnd();
    


Now some Questions:
Is there a manual with all functions listed?
How do the environmentmaps work?

CYA Morte
(This post was last modified: 2006-10-03 15:17 by morte0815.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #2
YEYH for u!
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #3
only 'guide' so far is this => http://forum.xbmc.org/showthread.php?tid=22365

Please feel free to add it to our online-manual (WIKI)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
pike Offline
Project Manager
Posts: 4,868
Joined: Sep 2003
Reputation: 29
Location: Sweden
Post: #4
Thanks Morte! Better docs are coming.
I'm quite impressed with your first preset, looking forward to seeing what else you can do, hehe

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
morte0815 Offline
Member
Posts: 59
Joined: Sep 2004
Reputation: 0
Location: Germany
Post: #5
--- gone to two new threads ----
(This post was last modified: 2006-10-03 19:38 by morte0815.)
find quote
pike Offline
Project Manager
Posts: 4,868
Joined: Sep 2003
Reputation: 29
Location: Sweden
Post: #6
morte, would be good if you created one topic per item, much easier to get an overview then! and also mention the name in the topic name

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
morte0815 Offline
Member
Posts: 59
Joined: Sep 2004
Reputation: 0
Location: Germany
Post: #7
pike Wrote:morte, would be good if you created one topic per item, much easier to get an overview then! and also mention the name in the topic name
OK, no problem!
find quote
MrC Offline
Team-XBMC Developer
Posts: 88
Joined: Jan 2004
Reputation: 1
Location: England
Post: #8
Hey Morte, great work mate.

Thanks for taking the time to have a play with Vortex.

As mentioned the docs are currently being worked on but feel free to ask me if there is anything you need help with, but you seem to be doing quite well on your own.

Also let me know if there is anything you think needs adding, math functions etc.

Looking forward to more of your work.

Cheers!

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
morte0815 Offline
Member
Posts: 59
Joined: Sep 2004
Reputation: 0
Location: Germany
Post: #9
MrC Wrote:Hey Morte, great work mate.

Thanks for taking the time to have a play with Vortex.

As mentioned the docs are currently being worked on but feel free to ask me if there is anything you need help with, but you seem to be doing quite well on your own.

Also let me know if there is anything you think needs adding, math functions etc.

Looking forward to more of your work.

Cheers!

I have to thank you for giving us such a great tool to play with!NodNod

I think some more explanation of the blending functions would be great and (if not already there) some functionality for specifying the alpha level of an texture would be great (for transitions, so you could smoothly blend them from a to b).
find quote