Author Topic: Chaos Scatter - Switch ON/OFF  (Read 1955 times)

2023-04-14, 19:06:07

WAlban

  • Active Users
  • **
  • Posts: 7
    • View Profile
Hi, maybe someone thought of this already but would it be possible to implement a switch function for chaos scatter?

IMO the switch would make the work in editor much more fluid for example if used with camera clipping or just to render quick previews without these extreme parsing times.

Warmest regards,
Alban

2023-04-14, 19:35:32
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5466
    • View Profile
You can use the C4D native approach, no? Uncheck the green checkmark so that the object is ignored (do that on the Scatter itself, and it disappears from viewport and render). Unless you are looking for something different, in which case let us know :)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2023-04-18, 09:23:48
Reply #2

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3872
  • Bengamin
    • View Profile
    • Cormats
Or perhaps you can set the scatter viewport display to ''None'' and it will still render when needed?

Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2023-05-04, 10:13:57
Reply #3

mario3lhd

  • Active Users
  • **
  • Posts: 20
    • View Profile
Great to see someone else mentioning this problem. I don't know why its not relevant enough. When you have really complex scene - when you have more than 10-20 chaos scatter objects you dont have time to switch off one by one. If you just put it in one folder and hide it - that doesn't make parsing time quicker.

I've also talked about this and no big help here:
https://forum.corona-renderer.com/index.php?topic=38100.msg204516#msg204516

My solution was and still is this one in the attachment. It turns off/on every scatter and proxy object in the scene. (ctrl + double click on chaos scatter and proxy objects). I bet it can be done in code but i'm not a programmer.

2023-05-04, 11:10:06
Reply #4

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3872
  • Bengamin
    • View Profile
    • Cormats
It seems painting them off in one click seems easier than multiple clicks to turn them off? Even grouping them in a null and turning that off in less clicks is also doable. The result is the same, one is faster and less time saving. This is just my personal opinion btw. ;)

Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2023-05-04, 11:27:59
Reply #5

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3872
  • Bengamin
    • View Profile
    • Cormats
Just wanted to add that we are working on a lister for C4d and it should be possible to do this. ;)
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2023-05-04, 14:50:00
Reply #6

mario3lhd

  • Active Users
  • **
  • Posts: 20
    • View Profile
It seems painting them off in one click seems easier than multiple clicks to turn them off? Even grouping them in a null and turning that off in less clicks is also doable. The result is the same, one is faster and less time saving. This is just my personal opinion btw. ;)



I agree. But in a large scene - i don't stack my chaos scatter objects like this. I have "null" inside of null. Null with scatter, proxies and its distribute on objects - lets name that null cabbage. Another null is named trees, another grass bla bla. So to get to every scatter like in your nice example - i can't organize my scene like that. And in a heavy scene there is decent amount of scrolling in play.
In that example - my method wins ;) by far


Just wanted to add that we are working on a lister for C4d and it should be possible to do this. ;)



looking forward to this!

2023-05-05, 13:11:36
Reply #7

mario3lhd

  • Active Users
  • **
  • Posts: 20
    • View Profile
Here is the script for searching every proxy and chaos scatter object - then it turn it on/off.
Only problem is - it can't find proxies and scatters inside of nulls. So if anyone knows how to modify this code, please let me know.



import c4d

def main():
    doc = c4d.documents.GetActiveDocument()
    proxies = []
    scatters = []
   
   
    for obj in doc.GetObjects():
        if obj.GetType() == 1035544: 
            proxies.append(obj)
        elif obj.GetType() == 1058682: 
            scatters.append(obj)
   
   
    for proxy in proxies:
        if proxy[c4d.ID_BASEOBJECT_GENERATOR_FLAG]: 
            proxy[c4d.ID_BASEOBJECT_GENERATOR_FLAG] = False 
        else:
            proxy[c4d.ID_BASEOBJECT_GENERATOR_FLAG] = True 
   
    for scatter in scatters:
        if scatter[c4d.ID_BASEOBJECT_GENERATOR_FLAG]: 
            scatter[c4d.ID_BASEOBJECT_GENERATOR_FLAG] = False 
        else:
            scatter[c4d.ID_BASEOBJECT_GENERATOR_FLAG] = True 
           
    c4d.EventAdd() 
   
if __name__=='__main__':
    main()

2023-05-05, 13:41:03
Reply #8

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3872
  • Bengamin
    • View Profile
    • Cormats
Try this! ;) One to turn them off, one to turn them back on. I suggest assigning a shortcut command for them. Have fun.

« Last Edit: 2023-05-05, 13:47:23 by Beanzvision »
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2023-05-05, 14:28:45
Reply #9

mario3lhd

  • Active Users
  • **
  • Posts: 20
    • View Profile
Thank you!! I'm really thankful for your reaction.

One bug I must notice - when you have scatter/proxy inside of a null - it works perfectly but notice the irony - when its not inside of null -  proxy objects as a child of chaos scatter doesn't turn off/on.

Anyway - many thanks!!


2023-05-05, 14:38:02
Reply #10

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3872
  • Bengamin
    • View Profile
    • Cormats
No probs, here's an update. It will disable all proxies and scatters regardless if in a null or not. Also, if you execute it again, it will turn them back on :) There is a down side though, if some scatters and proxies are enabled and others aren't, it will enabled what was disabled and vise versa. So for it to work properly (for now), all must either be enabled or disabled.
« Last Edit: 2023-05-05, 14:52:58 by Beanzvision »
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2023-05-05, 15:52:04
Reply #11

mario3lhd

  • Active Users
  • **
  • Posts: 20
    • View Profile