playMaker

Author Topic: How to do this with playmaker  (Read 3954 times)

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
How to do this with playmaker
« on: April 05, 2014, 11:45:25 PM »
Hello wondering if playmaker or unity can do this and how

thanks

http://www.syntaxwarriors.com/2012/xna-alpha-mapping-with-pixel-shader-and-rendertarget2d/
« Last Edit: April 14, 2014, 06:01:22 AM by jgalvezpa »

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #1 on: April 07, 2014, 08:45:33 PM »
bump!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: How to do this with playmaker
« Reply #2 on: April 08, 2014, 03:52:20 AM »
Hi,

 is the example provided works? If that's the case, simply change that RemovePlanetChunk function to be public and you can then access it using the invoke action.

bye,

 Jean

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #3 on: April 08, 2014, 09:15:10 AM »
i want to use it differently, with an explosion i don't know much about scripting
can i create that script with states machines? and how?

rendertarget2d doesn't exist in unity i think.

« Last Edit: April 09, 2014, 12:06:13 AM by jgalvezpa »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: How to do this with playmaker
« Reply #4 on: April 09, 2014, 04:36:08 AM »
Hi,

Basically, it's quite advanced, and involving to port this to a 100% PlayMaker solution. This would require some large ground work to provide access to this in a practical way. Hence, I agree with Alex, looking for a proper SDK provided by a third party asset make sense and then we could plug Playmaker with few custom actions to control that SDK.

My advice would be to simply edit that function to make it public and then call it from playmaker with your vector 2 point of choice.

Have you experimented with this already? In a case of explosion, what is the interaction you expect? that gameobjects as they fly mask the texture as they fly over it?


Bye,

 Jean

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #5 on: April 09, 2014, 09:42:22 PM »
hey could you do the script really quick and send it to me , i don't know nothing about scripting.
about the explosion for example i want when the bomb explode, the sprite looks like has been broken just like the video

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #6 on: April 11, 2014, 09:08:35 PM »
bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: How to do this with playmaker
« Reply #7 on: April 14, 2014, 04:54:29 AM »
Hi,

 for this, you really need to use a sprite slider like:

https://hutonggames.fogbugz.com/default.asp?W1177

 else, can you draw a example of the final result? cause in this video, there is no "explosion", just manual hand drawing.


bye,

 Jean

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker (SOLVED)
« Reply #8 on: April 14, 2014, 05:35:21 AM »

I want the explosion to be the same like in video, i search for plugins like slicer and fracture etc but they dont work like in the video.
Somebody told me to this

In unity the easiest way would be to have an image (with alpha channel) and use the methods in Texture2d like getpixel/setpixel to modify the alpha channel to create holes/missing areas. Using those same functions you can check for collision when shooting at it. Though that may be slow, building the same functionality into a shader might get better results as you can leverage the gpu instead of the cpu. I would start with the Texture2D methods and see how it works out. Then move to a shader based solution if you need to.

How can i do that with playmaker?

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #9 on: April 15, 2014, 12:01:57 AM »
i figure out that is all about shaders and alpha channels.ore specifically a shader method called 'Alpha mapping'.
Alpha mapping is done by using the original texture and another greyscale texture that defines what parts are visible or not.

The idea of the shader is to go through each pixel in the original texture and check how black each pixel in the greyscale image is at the same coordinate. The blacker the pixel in the greyscale picture is the higher the alpha value (more visible) the pixel in the original texture becomes. Since all this is done on the GPU it is lightning fast and leaves the CPU ready to do the actual logic for the game

do you have any experience doing that? i will try to learn

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #10 on: April 15, 2014, 09:32:41 PM »
bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: How to do this with playmaker
« Reply #11 on: April 17, 2014, 11:27:44 AM »
Hi,

 Give me few more days, I will work something out using the project sample you mentionned.

bye,

 Jean

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #12 on: April 17, 2014, 03:52:53 PM »
thanks really appreciated, i will try also to do it

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: How to do this with playmaker
« Reply #13 on: April 28, 2014, 11:59:49 AM »
Hi,

 ok, Here we go. Lucky you, it's the first custom samples that will be features on the ecosystem I am working on:

MaskTextureDrawing Sample

With this, you will be able to cut out a texture using the alpha channel of anothe texture, all of this being non desctructive. It's basically a masking system.

Tell me if you have questions.

Bye,

 Jean

 

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Re: How to do this with playmaker
« Reply #14 on: May 02, 2014, 10:36:09 PM »
Hi thanks for making this, i want to know i how to delete the texture when collide with something, like a bomb