Skip to content
Closed
13 changes: 13 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Features
- Prototypes and points that are editable downstream.
- Export to USD.
- Faster rendering.
- USDMeshLight :
- Added node to add necessary attributes to geometry to convert to a USDMeshLight.
- Added Arnold, RenderMan, 3Delight and Cycles rendering.

Improvements
------------

- MeshLight : Added viewport visualisation of textures.

Fixes
-----
Expand Down Expand Up @@ -292,6 +300,11 @@ Features
- CopyFiles : Added node for copying files.
- RenameFiles : Added node for renaming files.

Improvements
------------

- MeshLight : Added viewport visualisation of textures.

Fixes
-----

Expand Down
3 changes: 3 additions & 0 deletions include/GafferCycles/IECoreCyclesPreview/ShaderNetworkAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ IECORECYCLES_API IECoreScene::ShaderNetworkPtr convertLightShader( const IECoreS
/// calling `convertLight()` and `convertLightShader()`.
IECORECYCLES_API void convertUSDShaders( IECoreScene::ShaderNetwork *shaderNetwork );

/// Returns a modified set of attributes conforming to the USDMeshLight specification.
IECORECYCLES_API IECore::ConstCompoundObjectPtr convertUSDMeshLightAttributes( const IECore::CompoundObject *attributes );

} // namespace ShaderNetworkAlgo

} // namespace IECoreCycles
2 changes: 2 additions & 0 deletions include/GafferSceneUI/Private/LightVisualiserAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,6 @@ GAFFERSCENEUI_API void addWireframeCurveState( IECoreGL::Group *group, const flo
/// made into a function that can be called by implementation shaders.
GAFFERSCENEUI_API void addConstantShader( IECoreGL::Group *group, const Imath::Color3f &tint, int aimType = -1 );

GAFFERSCENEUI_API void addTexturedConstantShader( IECoreGL::State *state, IECore::ConstDataPtr textureData, const Imath::Color3f &tint, const float saturation, const Imath::Color3f &gamma, int maxTextureResolution );

} // namespace GafferSceneUI::Private::LightVisualiserAlgo
1 change: 1 addition & 0 deletions include/GafferUSD/TypeIds.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum TypeId
USDAttributesTypeId = 119101,
USDShaderTypeId = 119102,
USDLightTypeId = 119103,
USDMeshLightTypeId = 119104,

LastTypeId = 119199

Expand Down
61 changes: 61 additions & 0 deletions include/GafferUSD/USDMeshLight.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2026, Cinesite VFX Ltd. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above
// copyright notice, this list of conditions and the following
// disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided with
// the distribution.
//
// * Neither the name of John Haddon nor the names of
// any other contributors to this software may be used to endorse or
// promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////

#pragma once

#include "GafferUSD/Export.h"
#include "GafferUSD/TypeIds.h"

#include "GafferScene/MeshLight.h"

namespace GafferUSD
{

class GAFFERUSD_API USDMeshLight : public GafferScene::MeshLight
{

public :

explicit USDMeshLight( const std::string &name=defaultName<USDMeshLight>() );
~USDMeshLight() override;

GAFFER_NODE_DECLARE_TYPE( GafferUSD::USDMeshLight, USDMeshLightTypeId, GafferScene::MeshLight );

};

IE_CORE_DECLAREPTR( USDMeshLight )

} // namespace GafferUSD
3 changes: 3 additions & 0 deletions include/IECoreArnold/ShaderNetworkAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ IECOREARNOLD_API void hashSubstitutions( const IECoreScene::ShaderNetwork *shade
/// \deprecated Use `IECoreScene::ShaderNetworkAlgo::applyRenderAdaptors()` instead.
IECOREARNOLD_API void applySubstitutions( IECoreScene::ShaderNetwork *shaderNetwork, IECore::InternedString attributeName, const IECore::CompoundObject *attributes );

/// Returns a modified set of attributes conforming to the USDMeshLight specification.
IECOREARNOLD_API IECore::ConstCompoundObjectPtr convertUSDMeshLightAttributes( const IECore::CompoundObject *attributes );

} // namespace ShaderNetworkAlgo

} // namespace IECoreArnold
3 changes: 3 additions & 0 deletions include/IECoreDelight/ShaderNetworkAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ void updateLightGeometry( const IECoreScene::ShaderNetwork *shaderNetwork, NSICo
/// tests.
IECOREDELIGHT_API void convertUSDShaders( IECoreScene::ShaderNetwork *shaderNetwork );

/// Returns a modified set of attributes conforming to the USDMeshLight specification.
IECOREDELIGHT_API IECore::ConstCompoundObjectPtr convertUSDMeshLightAttributes( const IECore::CompoundObject *attributes );

} // namespace ShaderNetworkAlgo

} // namespace IECoreDelight
3 changes: 3 additions & 0 deletions include/IECoreRenderMan/ShaderNetworkAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ IECORERENDERMAN_API VStructAction evaluateVStructConditional( const std::string
/// as `convert()` resolves vstructs internally anyway.
IECORERENDERMAN_API void resolveVStructs( IECoreScene::ShaderNetwork *shaderNetwork );

/// Returns a modified set of attributes conforming to the USDMeshLight specification.
IECORERENDERMAN_API IECore::ConstCompoundObjectPtr convertUSDMeshLightAttributes( const IECore::CompoundObject *attributes );

} // namespace IECoreRenderMan::ShaderNetworkAlgo
2 changes: 1 addition & 1 deletion python/GafferArnoldTest/ArnoldShaderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def testMeshLight( self ) :
self.assertEqual( n["type"].getValue(), "ai:light" )

self.assertTrue( "exposure" in n["parameters"] )
self.assertTrue( n["out"].typeId(), Gaffer.Plug.staticTypeId() )
self.assertEqual( n["out"].typeId(), Gaffer.Plug.staticTypeId() )

def testColorParameterMetadata( self ) :

Expand Down
Loading