Jump to content



Photo

Video - BxBasicDMD - Textures


  • Please log in to reply
24 replies to this topic

#1 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 09 July 2015 - 04:30 PM

I've tried briefly with the following. Is it possible to use movietexture here?

 

I didn't try a standard 2DTexture yet from a file off another drive, but is this possible as well to load files outside of the .fpt?

 

Have you made use of FP imagelists? Maybe we could import pyprocgames dmd files as imagelists.

 

Loading *.* into FP doesn't make sense to me. Importing textures with .bmp,.jpg,.tga is all I can see inside FP texture importing. Where else can you import ?

 

 

Missing the videoURL.> Forum won't add it.

 

public class testCOmponent : BxBasicDMD
{
    public override void Start()
    {

         base.updateTexture();
          base.Start();

         WWW ww = new WWW(videoUrl);
         base.renderer.material.mainTexture = ww.texture;
         playMovie();
    }
            
       //mt.name = @"I:\ffff.mp4";
   
    public void playMovie ()
    {
        ((MovieTexture)base.renderer.material.mainTexture).Play();
    }

}


Edited by chepas, 09 July 2015 - 04:35 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#2 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 750 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 09 July 2015 - 06:03 PM

Linking unity to pyprocgame would be awesome. What are you working on?

#3 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 09 July 2015 - 08:57 PM

 

I've tried briefly with the following. Is it possible to use movietexture here?

 

I didn't try a standard 2DTexture yet from a file off another drive, but is this possible as well to load files outside of the .fpt?

 

Have you made use of FP imagelists? Maybe we could import pyprocgames dmd files as imagelists.

 

Loading *.* into FP doesn't make sense to me. Importing textures with .bmp,.jpg,.tga is all I can see inside FP texture importing. Where else can you import ?

 

 

Missing the videoURL.> Forum won't add it.

 

public class testCOmponent : BxBasicDMD
{
    public override void Start()
    {

         base.updateTexture();
          base.Start();

         WWW ww = new WWW(videoUrl);
         base.renderer.material.mainTexture = ww.texture;
         playMovie();
    }
            
       //mt.name = @"I:\ffff.mp4";
   
    public void playMovie ()
    {
        ((MovieTexture)base.renderer.material.mainTexture).Play();
    }

}

 

Don't do it over BasicDMD, but with a regular overlay...

 

The trick in FP is, when you import a texture, you can't see other files than bmp, jpg and tga. To overcome this, enter "*.*" in the file box => png will becomme pickable...

 

You indeed also can use WWW, but if you do that, we won't be able to take advantage of the native format (lighting fast loading) when we will convert it for you. Moreover, I think there is a very nasty Unity bug with that, which takes damn long time when you don't have internet connection...

 

Yes, we imported ImageLists, but never used it yet, except for some cycling overlays... so bugged I guess :).

 

Finally, I will check art some point for pyroc but it seems to be a whole new project...


UP2


#4 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 09 July 2015 - 09:11 PM

Don't do it over BasicDMD, but with a regular overlay...

The trick in FP is...

Ok cheers.

 

The WWW is me just trying to load local file. This forum removes the string if I try and post url to it but it's enough that I know it's possible outside of .fpt.

 

The dmd format. png  http://pyprocgame.pi...t-specification

 

Nice one.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#5 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 09 July 2015 - 09:17 PM

The format is easy to read, but I am afraid that reading+creating the texture on the fly will SLOOOOOOW down the loading.

I will think about it...

 

Good night guys...


UP2


#6 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 09 July 2015 - 09:40 PM

Yes, true. We do normally pre load these first, which is a bit costly anyway with lots of color frames.

 

If the imagelists worked the same way it would be no different I suppose being able to make sequences or pull frames.

 

 

Linking unity to pyprocgame would be awesome. What are you working on?

 

Sorry mate not much, just testing the waters on display.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#7 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 10 July 2015 - 06:12 AM

Nope: We could do a extetnal tool, converting dmd files to png/jpg series and importing it from fp's imagelists... it woudl be faster IMO,AND could be embed in upt format...


UP2


#8 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 10 July 2015 - 01:51 PM

Yes sounds good. I can create them faster than imagelists and less of a PITA to keep organized outside of FP.

 

They come in other size with color too. The original format from the manual is std 128x32. Whereas I have used 480x240 , 192x64 color in the past. You're welcome to take a couple and I have a small util/manager for converting\playing from images.

 

Have no idea how far you're at and wouldn't mind to try and port pyprocgame system where modes take priority of visible layers.

 

[priority 1] [Bottom] Score layer = score , player

 

[priority 2] High score mentions

 

Mode orbit (priority 10)

[Layer1] Image sequence = Imagelist[5,10]

[layer2] Text layer = "shoot orbit"

[layer3] textlayer="for £3"

 

[group1] = layer1 + 2 + 3

 

Overlay= group1

Overlay.transition = transition.Slide out transition.


https://github.com/C...ter/NetProcGame

 

Most of it is here ported anyway. Maybe I can mess with extending basicgame and adding from netprocgame the "Modes" "Game" "DmD".


Edited by chepas, 10 July 2015 - 01:53 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#9 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 11 July 2015 - 07:41 AM

just split to a dedicated NetProcGame topic....


UP2


#10 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 19 July 2015 - 01:19 PM

I added an imagelist of flipper images and set this to an overlay in FP. These automatically play in Unit3D.

 

I've looked through the ImageList & Overlay classes and did play about with them, but couldn't really figure it out. Changing images, stopping the timer etc.

 

Don't worry if it's not complete, it's just something that was on my mind after trying it.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#11 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 19 July 2015 - 02:33 PM

And you did not want it to play automatically?


UP2


#12 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 19 July 2015 - 02:38 PM

Yeah, I can see all the controls like play() etc if I instantiate a new ImageList but not sure how to link this class to an overlay.

 

Is it just standard AddComponent ?


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#13 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 19 July 2015 - 02:42 PM

Nope, and it moreover it is hard coded in importer...

This means that we would have to rebuild all our tables :S...

 

i will check that, but define better what would be the functions you would need for example...


UP2


#14 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 19 July 2015 - 03:06 PM

This means that we would have to rebuild all our tables :S...

 

 

:BDH:

 

Interval or even by Frames per second to match.

 

Overlay.SetImageList (string imagelist)

Overlay.ShowImage(ImageList il, int imageFrame)

Overlay.Nextimage

Overlay.PrevImage

Overlay.Hide() //// Is this possible or always will be white? Or you can destroy at runtime? I have not tried.

 

int fps;

Play(Imagelist, loop=false)

PlayFrames (imagelist,int start, int end, loop=false)

 

Make sense? You have similar methods I've seen around. I don't think you really need much more than that for now.. :)


Edited by chepas, 19 July 2015 - 03:07 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#15 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 19 July 2015 - 03:17 PM

Right, the current functions/variables  are (if you can catch the "imagelist" behaviour of the object):

 

public List<Texture2D> images;
public int current=0;
public float interval;


public void set_current(int texture);
public void next();
public void prev();


public void play();
public void play_rev();
public void stop();

You can then ste your interval (in seconds).

The only thing you'll have to do is call "stop()" first because it is called by default...


UP2


#16 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 19 July 2015 - 03:57 PM

Yes those are the functions I've already come across but "catching" it is what I can't do.

 

GetComponent? Already tried a lot of this yesterday with no luck.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#17 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 19 July 2015 - 06:49 PM

Tried again and giving up. Not worth my time keep trying to guess my way through the API, Unity & Unit3D.

                    Overlay overlay = GameObject.Find("Overlays/Overlay1").GetComponent<Overlay>();
                    Debug.LogError(overlay.imagelist);
                    try
                    {
                        Debug.Log(overlay.imagelist.ToString());
                    }
                    catch (System.Exception)
                    {

                        Debug.Log("Computer says No looping");
                    }

 

                    ImageList overlay = GameObject.Find("Playfield/Overlays/Overlay1").GetComponent<Overlay>().imagelist;
                    overlay.stop();

 

 

GameObject.Find("Playfield/Overlays/Overlay1").GetComponent<ImageList>().interval = 5000;

 

?


Edited by chepas, 19 July 2015 - 06:58 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#18 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 20 July 2015 - 09:34 AM

I understand this can be frustrating. Remember you are our first real Table Builder and we really appreciate your efforts...

 

I'll try this tonight. Take some rest ;)

 

Good luck.


UP2


#19 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 20 July 2015 - 09:39 AM

Don't worry about rest, I took the rest after this.

 

It probably would have been a lot easier if I had used a blank table completely stripped to do the testing with for insti-loading, but as you can see, I am trying to guess how to access the Imagelist.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#20 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 20 July 2015 - 09:43 AM

Yes I see. I think we will need to publish our scene graph...

We know there is a HUUUUGE lack of documentation. But documenting is a long task by itself...

 

We are glad you try things we didn't...


EDIT: Actually, you HAVE the scene graph: it's the one in the table Editor. But You don't have the associated components...


UP2