Skip to content

Update rdl2_json_exporter to include node outputs #299

Open

Description

@pramsey1234

scene_rdl2: cmd/rdl2_cmd/rdl2_json_exporter needs to be updated to export information about outputs. The information will include name, type, position in the order, and whether the output is uniform or not.

Some Implementation Thoughts

  • add an "outputs" record which is a peer to "attributes"
  • add a record for each output name
  • in each record have
    "attrType" - using the same type names as in attributes. The "attr" prefix isn't quite perfect for an output but matching the naming in the "attributes" records to clarify they are the same seems valuable
    "uniform" - a boolean value to indicate whether the output is uniform or not. This could default to false and be left out for false.
    "order" - a positive integer to indicate the 0 based numbering of the output. The order is important so the output record of an evaluation can be properly interpreted.

Question

Will users of the json generated by rdl2_json_exporter be able to ignore the extra "outputs" record until they're updated to use the new record or will they error on the unrecognized record name?

Activity

  1. converted this from a draft issue on Sep 23, 2026
  2. pramsey1234 commented on Sep 23, 2026

    @pramsey1234
    Author

    I imagine the generated file for ND_separate3_color3 would be something like:

    {
    	"moonray version" : "unspecified",
    	"scene_classes" : 
    	{
    		"ND_separate3_color3" : 
    		{
    			"attributes" : 
    			{
    				"in" : 
    				{
    					"attrType" : "Rgb",
    					"bindable" : true,
    					"default" : [ 0.0, 0.0, 0.0 ],
    					"order" : 0
    				}
    			},
                "outputs" : 
                {
                    "outr" : 
                    {
                        "attrType" : "Float",
                        "order" : 0
                    },
                    "outg" : 
                    {
                        "attrType" : "Float",
                        "order" : 1
                    },
                    "outb" : 
                    {
                        "attrType" : "Float",
                        "order" : 2
                    }
                },
    			"type" : "Map"
    		}
    	},
    	"scene_rdl2_version" : "17.1.0.0"
    }
    
  3. moved this from Planning to Ready in Multi-output shaderson Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions