Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: snakebox on 2016-12-13, 02:08:03

Title: Corona Distance Texture and Pflow?
Post by: snakebox on 2016-12-13, 02:08:03
Hi everyone,

I am playing around with some particles and I am trying to the corona distance texture to see the Pflow source as an object to take into consideration for the swapping of texture based on distance. but it doesn't seem to work?  Is this even supported or am I missing something?

I hope this makes sense, if not please let me know.

Thanks
Title: Re: Corona Distance Texture and Pflow?
Post by: maru on 2016-12-13, 16:55:13
I'll try looking into this asap. Does anything change if you toggle between "full geometry" and some simplified representation of the pflow in viewport? Would it be possible for you to use mesher to turn the pflow into regular mesh?
Title: Re: Corona Distance Texture and Pflow?
Post by: snakebox on 2016-12-13, 20:49:38
I'll try looking into this asap. Does anything change if you toggle between "full geometry" and some simplified representation of the pflow in viewport? Would it be possible for you to use mesher to turn the pflow into regular mesh?

No the real problem is that distanceTex won't allow the Pflow source to be seen as geometry. So the only current way I think of would be to cache out the particles or something, but that kind of defeats the purpose of a dynamic particle system in this case. 

I have tried both 20% viewport displayed and 100%, same thing. 

In an ideal world all you would add would  be the instance object the Pflow system uses, but not sure how distanceTex will understand that there are suddenly 500 instances of it.

thank you
Title: Re: Corona Distance Texture and Pflow?
Post by: snakebox on 2016-12-14, 00:13:14
Purely for reference, this is what I played around with:

https://vimeo.com/195414618 (https://vimeo.com/195414618)

So my initial test was to try and get the Target texture to change where ever an arrow hit (arrows are particles) using the distanceTexture.
Title: Re: Corona Distance Texture and Pflow?
Post by: TomG on 2016-12-15, 17:26:47
Mesher might work, did a quick test

- PF Source created, set to use a Box as its particle
- Mesher created with the PF Source in the Pick Object
- PF Source render properties set to not renderable
- Plane created, painted with a material that uses CoronaDistance in it - the Distance From is set to the Mesher object (here I just plugged that in to Self Illumination)

This will animate fine from what I can see. May be other options, here I was making the particles not show up in the render and just leaving the Mesher versions visible, but likely could make the Mesher ones invisible and the original particles left visible too. Not 100% sure that is the result you are looking for, but should let the target change based on the distance to the arrows I think.

Title: Re: Corona Distance Texture and Pflow?
Post by: snakebox on 2016-12-16, 01:43:47
Mesher might work, did a quick test

- PF Source created, set to use a Box as its particle
- Mesher created with the PF Source in the Pick Object
- PF Source render properties set to not renderable
- Plane created, painted with a material that uses CoronaDistance in it - the Distance From is set to the Mesher object (here I just plugged that in to Self Illumination)

This will animate fine from what I can see. May be other options, here I was making the particles not show up in the render and just leaving the Mesher versions visible, but likely could make the Mesher ones invisible and the original particles left visible too. Not 100% sure that is the result you are looking for, but should let the target change based on the distance to the arrows I think.

Hmm yeah that might work indeed! a little messy of an approach, but it does look like it works!  nicely done and thank you. I will have to try it out.
Title: Re: Corona Distance Texture and Pflow?
Post by: TomG on 2016-12-16, 04:27:18
Hopefully it does the trick! Just saw the animation on the other thread, looking good already :)
Title: Re: Corona Distance Texture and Pflow?
Post by: maru on 2017-02-14, 11:02:47
Reported on mantis as a minor issue: https://corona-renderer.com/bugs/view.php?id=2478
Title: Re: Corona Distance Texture and Pflow?
Post by: Ondra on 2017-03-11, 13:11:17
implemented