Author Topic: Corona + Scene Nodes  (Read 1131 times)

2022-05-17, 23:00:04

John_Do

  • Active Users
  • **
  • Posts: 119
    • View Profile
Hello,

I'm currently approaching Scene Nodes and in the tutorial there is an example where a material and some shader settings are driven by Scene Nodes, with what seems to be a specific shader on the renderer side ( Redshift in this case ).

I failed to find a similar shader in Corona. Did I miss something ? Is it doable in Corona v8 ?

Here is the example (@6:15) :


2022-05-18, 00:09:27
Reply #1

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
I'm out of context here so, if you care, a ready made scene should be of most help...
But fundamentally, what is your goal?

2022-05-18, 00:29:35
Reply #2

Cinemike

  • Active Users
  • **
  • Posts: 1000
    • View Profile
A bad hack, I assume.
I used the undocumented Data shader that came with V8 (late). But it works. In all situations? I doubt it.
But it works for the scene you were referring to ;)

Heads up!
Rendering scene node cloners obviously has a bug with Corona render.
The cloned object's original (the sphere in the centre) is still being rendered (should not).

Have fun playing with the scene.
Michael

PS
There might be a proper solution to this, but I have not found it yet.
« Last Edit: 2022-05-18, 02:55:14 by Cinemike »

2022-05-18, 09:54:00
Reply #3

John_Do

  • Active Users
  • **
  • Posts: 119
    • View Profile
I'm out of context here so, if you care, a ready made scene should be of most help...
But fundamentally, what is your goal?

I don't have a specific goal except learning scene nodes and hopefully using it with Corona ;)

It's exactly like Houdini, where you can drive shading settings from scene attributes and data. But it requires some degree of integration on the renderer side to get those values.
In my example, the color of each instance is driven by it's index in the instances range ( = ratio ). Black at the start of the range, white at the end.

A bad hack, I assume.
I used the undocumented Data shader that came with V8 (late). But it works. In all situations? I doubt it.
But it works for the scene you were referring to ;)

Heads up!
Rendering scene node cloners obviously has a bug with Corona render.
The cloned object's original (the sphere in the centre) is still being rendered (should not).

Have fun playing with the scene.
Michael

PS
There might be a proper solution to this, but I have not found it yet.


Thank you Cinemike, except for the few quirks of the IR and the lack of viewport shading, it seems to work as expected, nice. What is this shader ? Some sort of debug tool ?

2022-05-18, 19:14:19
Reply #4

Cinemike

  • Active Users
  • **
  • Posts: 1000
    • View Profile
According to TomG it is there for debugging purposes.
The "wire" mode I used in my example scene reads the object color and makes it accessible to the Material op.
There are more interesting modes I have yet to explore :)

I had hoped to being able to use the native Mograph Color shader, unfortunately this did not work (the shader works fine in "old cloner" cases, though).

CU
Michael
« Last Edit: 2022-05-18, 19:18:04 by Cinemike »

2022-05-18, 20:56:45
Reply #5

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Yep primarily added for debugging, but if you can find a use for it, have at it! :)
Tom Grimes | chaos-corona.com
Product Manager | contact us