Git Product home page Git Product logo

cortex's People

Contributors

andrewkaufman avatar boberfly avatar bradleyhenke avatar carstenkolve avatar cnpinto avatar compso avatar danbethell avatar danieldresser avatar danieldresser-ie avatar davidsminor avatar dboogert avatar donboie avatar ericmehl avatar est77 avatar goddardl avatar ivanimanishi avatar johnhaddon avatar koichitie avatar ldmoser avatar lento avatar lucienfostier avatar markdjwilliams avatar medubelko avatar mrpetru avatar murraystevenson avatar proberts-cinesite avatar stefanfeess avatar timlehr avatar tomc-cinesite avatar yannci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cortex's Issues

Windows port, various issues

Hi all,

Posting a bug report on a platform currently unsupported by Cortex is probably a bad idea but I am currently at a loss as to how to approach this issue. On Visual Studio 2013 x64 I am compiling Cortex with my custom branch here:

https://github.com/boberfly/cortex/tree/windows

I have recently introduced IECore/IECoreExport.h to all the includes in anticipation to support dynamic .dll's for Windows and this is a requirement to correctly export definitions without making a custom .def file.

The problem now is with boost intrusive_ptr. Currently MSVC has the following error:

Error 588 error C2664: 'void IECore::intrusive_ptr_release(const IECore::RefCounted *)' : cannot convert argument 1 from 'IECore::FileNameParameter *' to 'const IECore::RefCounted *' C:\Users\Boberfly\Documents\Development\windows\gafferDependencies\include\boost\smart_ptr\intrusive_ptr.hpp 97 1 IECore
Error 3923 error C2664: 'void IECore::intrusive_ptr_release(const IECore::RefCounted *)' : cannot convert argument 1 from 'IECore::FileNameParameter *' to 'const IECore::RefCounted *' C:\Users\Boberfly\Documents\Development\windows\gafferDependencies\include\boost\smart_ptr\intrusive_ptr.hpp 97 1 IECore
Error 7283 error C2664: 'void IECore::intrusive_ptr_release(const IECore::RefCounted *)' : cannot convert argument 1 from 'IECore::MatrixMultiplyOp *' to 'const IECore::RefCounted *' C:\Users\Boberfly\Documents\Development\windows\gafferDependencies\include\boost\smart_ptr\intrusive_ptr.hpp 97 1 IECore
Error 18752 error C2664: 'void IECore::intrusive_ptr_release(const IECore::RefCounted *)' : cannot convert argument 1 from 'IECore::FileNameParameter *' to 'const IECore::RefCounted *' C:\Users\Boberfly\Documents\Development\windows\gafferDependencies\include\boost\smart_ptr\intrusive_ptr.hpp 97 1 IECore

First hint is they're not const, a first tweak was I made was taking out const in RefCounted.h :
inline void intrusive_ptr_release( IECore::RefCounted *r )
Which caused more of these issues but for constified versions of classes derived from RefCounted. So that's the only 'hint' I could come up with.

This issue looks suspiciously like an earlier attempt at porting Cortex to Windows, albeit at a time when intrusive_ptr probably had a different design implementation in Cortex:
https://code.google.com/p/cortex-vfx/issues/detail?id=49

Thanks all!

Support MissingBehaviour argument in CompoundData and CompoundObject

Currently the CompoundData and CompoundObject member() methods take a clunky pair of ( throwExceptions, createIfMissing ) bools, rather than the nice MissingBehaviour enum we use in IndexedIO and SceneCache. Make them use a MissingBehaviour enum instead.

Should we define another enum with the same values, or move the MissingBehaviour enum to the global namespace somewhere? If so, where?

Remove **kw use from auto-parenting mechanism

10d8c0e describes some problems with the *_kw mechanism used for passing arguments to the auto-parenting mechanism, and introduces a new backwards-compatible mechanism using the "parentArgs" argument. We need to tidy this up so that the new mechanism is the only one, and *_kw arguments can be used by widgets for their own purposes.

compiling MtoA Extension returns error

When compiling against MtoA 0.25.* we get this error, I'll sort it here and commit the patch to my fork first.

contrib/IECoreArnold/src/IECoreArnold/mtoaExtension/ProceduralHolderTranslator.cpp: In member function 'virtual AtNode* ProceduralHolderTranslator::CreateArnoldNodes()':
contrib/IECoreArnold/src/IECoreArnold/mtoaExtension/ProceduralHolderTranslator.cpp:60: error: no matching function for call to 'ProceduralHolderTranslator::IsMasterInstance(MDagPath&)'
/software/mtoa/linux.centos6.x86_64/0.25.3/2014//include/translators/NodeTranslator.h:276: note: candidates are: virtual bool CDagTranslator::IsMasterInstance()

Ash

Consider adding time variable hierarchy to SceneInterface

Our implementation of HoudiniScene (derived from SceneInterface) has an add-hoc method to specify the time in which we want to query the hierarchy that is coming out of the Houdini nodes.

Also, we are starting to consider implementing a GafferScene (also derived from SceneInterface) where the hierarchy is also dependent on time.

Let's discuss here what would be the advantages of doing this and also the challenges.

Need Support For Pixel Aspect Ratio in IECoreRI

One feature we will need for doing our rib exports through IECoreRI is the ability to set pixelAspectRatio. It looks like this will be a fairly easy addition - currently, it is hardcoded to 1 in IECoreRI::RendererImplementation::outputCamera:

it = camera->parameters().find( "resolution" );
ConstV2iDataPtr d = runTimeCast<const V2iData>( it->second );
RiFormat( d->readable().x, d->readable().y, 1 );

What should we call the parameter? float camera:pixelAspectRatio?

OIIO

  • Consider using image readers/writers from OIIO ( removing duplicates )
  • Consider using the color transformations from OIIO ( removing duplicates )
  • Not entirely related, but while revisiting the Image readers, see if we can handle more than one file extension for a format (example: jpg, jpeg, JPG)

Create tags for animatedTransform and animatedAttribute in SceneCache

We currently have no reliable way to detect when there's animated attributes or animated transforms without bounds (no objects) at any location in the hierarchy of a SceneCache.

Our readers in Houdini and Maya rely on the boundSamples() as a hint for that, and set their outputs as dirty only when there are animated bounding boxes. This of course fails on the two situations described above...

If SceneCache writes sceneInterface:animatedTransform and sceneInterface:animatedAttribute tags we could distinguish these cases. But this means creating two new tags on the whole hierarchy when there's animation and we should check the file size and memory consumption before doing it.

Houdini Camera Converters

We'd like to be able to convert IECore::Cameras to and from Houdini. Once we have this, we could start storing cameras in SceneCache files, allowing us to ditch FBX from our pipeline completely.

Tags in SceneInterface propagating down the hierarchy

I would like to open a discussion here about changing a bit SceneInterface functions for tag queries.

Instead of having a bool parameter includeChildren in readTags() and hasTag() the idea would be to have an enum value passed instead: localTags, descendentTags, localAndDescendentTags, ancestorTags, localAndAncestorTags, allTags.

The current behavior would be, when includeChildren=False to be the same as localTags. When includeChildren=True it's the same as localAndDescendentTags.

As we integrate tags in Gaffer, by first focusing on Tag filter implementation, it looks like it's beneficial to respond quickly whether a parent location matches the filter. Also, now considering negating a Tag (for the purposes of filtering as well), it seems required to be able to query the same thing, which would be either "ancestorTags", or "localAndAncestorTags".

If we implement that, we would again break binary compatibility in Cortex 8, but hopefully for the better.

Add gl attribute for selectable

This would allow us to render geometry in the OpenGL viewport which does not affect selection. ( Current need is for light decays ).

ls support for ambiguous padding for non-contiguous frames

Currently, if we look for a file sequence with ambiguous padding and non-contiguous frames, we get no result for any padding other than 1.

I've prepared a test case to be added to cortex to check for that (to be added to the existing testLs class in test/IECore/FileSequence.py):

import os
import unittest
import shutil
from IECore import *

class testLs( unittest.TestCase ) :
    def testAmbiguousPaddingNonContiguous( self ):

        self.tearDown()
        os.system( "mkdir -p test/sequences/lsTest" )

        s1 = FileSequence( "test/sequences/lsTest/a.#.tif 98,100,103" )
        s2 = FileSequence( "test/sequences/lsTest/a.##.tif 98,100,103" )

        for f in s1.fileNames() :
            os.system( "touch '" + f + "'" )

        l = ls( "test/sequences/lsTest/a.#.tif" )
        self.assertTrue( l )
        self.assertEqual( s1.fileName, l.fileName )
        self.assertEqual( s1.frameList.asList(), l.frameList.asList() )

        l = ls( "test/sequences/lsTest/a.##.tif" )
        self.assertTrue( l )
        self.assertEqual( s2.fileName, l.fileName )
        self.assertEqual( s2.frameList.asList(), l.frameList.asList() )

    def tearDown( self ):

        if os.path.exists( "test/sequences" ) :
            shutil.rmtree( "test/sequences" )

unittest.main()

Automatic library loading for unknown typeIds

We often run into situations where, for example, the user imports a python module, writes out a scene cache containing an object defined in one of that python module's libraries, and is henceforth unable to read that scene cache because the data file contains an unregistered typeId (unless they remember to import the python module so the library gets loaded or whatever).

This can get annoying, so it'd be good to have some kind of mechanism for automatically loading libraries for unregistered type ids

Sphere primitive generator improvements

Currently the sphere primitive in mesh mode is generating as quads. These do not subdiv nicely.

Also - the poles are a bit funky when subdived and the verts along the seam don't appear to be correctly merged.

cheers

(these problems manifesting in gaffer)
screenshot

Add Cortex Primitives to Houdini

We want to have IECore::Primitives and IECore::ParameterisedProcedurals as proper Houdini GU_Primitives, flowing through the SOP chains. This will work similarly to OpenVDB primitives, in that the SOP will show a single prim and point per mesh, which is really just a smart pointer to the Cortex object in memory, exposing only the proper bounds and centroid to Houdini. This will require:

  • GEO and GU implementations so they can live in a GU_Detail
  • Ability to create them (just targeting SceneCache nodes at this point)
  • GUI_PrimitiveHook and GR implementations for viewport rendering (Houdini 12.5 only)
  • Converter SOP should be modified to switch between native geo and these prims
    • FromConverters should recognize them and return the smart pointer
    • ToConverters should have a parameter to create native geo or these fancy prims
  • OpHolders and ProceduralHolders should stop using the blindData hack
    • They'll need a way to specify individual prims, using the name attrib or groups

I'm well on the way to getting the first 3 parts working, but have some questions that are worth answering before I get too much further. So far my implementation is specific to PrimitivePtrs, which means I would have to duplicate many of the classes for Procedurals, and again for some other objects we might like to store (CoordinateSystems for example). So my questions are:

  1. Would it make more sense to store ObjectPtrs and have a single set of classes that can hold any Cortex object? Or are more specific implementations preferable (we can make some assumptions about Primitives that we can't make about Objects in general)?

  2. If the answer to 1 is to store ObjectPtrs, do we care that the detail will show 5 meshes, 5 procedurals, and 5 IntVectorDatas as "15 CortexObjects"? The user won't have a good idea of how many of each. I can add extra text to the nodes that actually create / manipulate them, but that won't persist onto native Houdini nodes.

  3. These GU_Prims are not very manipulable in the viewport. Is it possible to make custom GU_Prims pickable?

Investigate Maya crashes when selecting SceneShape nodes

I have an example file with about 700 characters loaded into a single sceneShape node that will crash maya if selected.
It looks like it crashes when using selection IECoreGL::Selector::IDRender. If I force IECoreGL::Selector::OcclusionQuery in SceneShapeUI.cpp it seems to go away. Why?

maya encountered a fatal error

Signal: 11 (Unknown Signal)
Stack trace:
/lib64/libc.so.6() [0x36d6c32920]
IECoreGL::Selector::loadName(unsigned int)
IECoreGL::State::bind() const
IECoreGL::Scene::render(IECoreGL::State_) const
IECoreMaya::SceneShapeUI::draw(MDrawRequest const&, M3dView&) const
THsurfaceShapeUI::draw(TdrawRequest const&, T3dPort&) const
TdrawRequestImpl::draw() const
TdrawProcess::handleDraw(TdrawRequest&)
TdrawProcess::draw(TdrawRequest&)
TdrawProcess::traversalRefresh()
TdrawProcess::mpRefresh(T3dView_, TdrawTraversalPtrArray&)
TdrawProcess::refresh(T3dView_, TdrawTraversal&)
TidleRefreshCmd::refreshRecursive(T3dView_, Tmodel_, TdagPath const&, TdrawArgs&, TdisplayAppearance, bool, bool)
TidleRefreshCmd::refreshBaseRender(T3dView_, bool, bool, TdisplayAppearance, bool, bool, bool)
TidleRefreshCmd::refresh(T3dView_, TdisplayAppearance, bool, bool, bool, bool, TrefreshType, bool, bool)
TtoolRefresh::refresh(T3dView_, TrefreshType, bool, bool)
TanimIdleCmd::refreshViews(TplaybackViewMode)
TcurrentTimeCmd::viewTime(TanimTime, bool, bool)
TcurrentTimeCmd::editTime(TanimTime const&)
TcurrentTimeCmd::doIt(TargList&)
TmetaCommand::doCommand(TargList&)
Mel_Command_Dispatch(SphNode_)
node_exec
fc_ifelse
node_exec
f_function_entry_node
node_exec
sophia_call_executable
SophiaExecutable::evaluate(void_)
TcommandEngine::executeCommand(Tstring const&, bool, bool, TmelCmdResult*, unsigned int)

Support GeometricData::Interpretation in IECoreRI

This needs to be used in ParameterList and PrimitiveVariableList to decide the renderman type of the data. Once this is done we should entirely abandon the typeHints system, which should simplify both those classes and also the Renderer.

Optimise IECoreRI::shader()

Splitting this out into a ticket of its own, since the discussion in GafferHQ/gaffer#1156 is getting rather lengthy, and is about a different set of changes.

David's already made some good progress :

So, after playing around with IECoreRI a bit, I managed to get that 8 seconds down to 5.5. Here's what I've done so far:

replaced boost::format and string concatenation in ParameterList::appendParameter with something more manual
reordered string comparisons in RendererImplementation::shader(), as "surface" and "shader" are the most common
replaced type == "shader" with !strcmp( type.c_str(), "shader" ) in RendererImplementation::shader() to avoid constructing strings over and over again
Avoided making that parametersCopy variable in RendererImplementation::shader(), and rejecting "__handle" inside ParameterList::ParameterList() instead
It also looks like you can knock another half second off by commenting out the bit in RendererImplementation::shader() that builds the type hints - apparently it doesn't like making all those map insertions.

And I had the following to say :

Nice!

Did you actually measure the type == "shader" change to strcmp() on its own? It sounds a bit fishy, because direct string <-> const char * comparisons are defined (and shouldn't make temporaries). If we really want to speed up the comparisons though, we should think about taking InternedString arguments in Renderer methods rather than std::string.

Now we have GeometricTypedData, we should be able to ditch the typeHints hack entirely. It would take a little bit of work in both IECoreRI and Gaffer to check that we were tracking the geometric type appropriately, but I think it'd be well worth doing - cleaner and faster.

Context menu on SceneShape messes with Maya viewport at times

I believe this may also happen with ParameterisedProcecurals, but when we right Click on SceneShapes to get the context menu in Maya, sometimes will make Maya refresh the viewport, showing the previous GL render, which can be of two kinds:

  • In component mode: it may show the previously selected component.
  • In object mode: it will show the render, of what I believe was the picking render (render of the region below the cursor), zoomed on the whole screen.

It seems to me that the GL buffers in Maya are being swapped without been re-rendered. Are we interfacing with Maya appropriately?

Optimize factory function for Object::create

This has shown in some profiles, and I believe that by converting the map to InternedStrings it could help.
This would require changing the typeName() function to return InternedString.

Renderers to use doubles instead of (or in addition to) floats

SceneInterface provides transforms as M44d, but the Renderers only accept M44f. I think there are other cases where we have to convert between the two all the time as well. Can we just support double now? Or both at least? Does this seem reasonable for Cortex 9 or should it wait?

SceneCache caching and GL optimizations

Continuing the discussion in the comments of #9. What can we do to optimize SceneCache use when hosted in 3d apps? Lucio has 2 branches currently:

  1. with an LRUCache for loaded objects, which is stored per SceneCache, but without the GL optimizations from #9
  2. above + ToGL optimizations from #9

So far his testing in Maya has shown branch 1 to be advantageous on a large crowd of similar low res characters, and on a single high res, constant topology, animated character with many small parts. Branch 2 helps a bit, but is a marginal benefit in Maya. He was finding that the GL cache was getting overloaded with data, and he needed to set a higher max cost.

Add a Houdini UT_Cache for Cortex

This can be used to manage Cortex caches in a UI along with all the other normal Houdini caches. We should wait for #33, so we have a global object cache to manipulate. We'd probably also want access to the IECoreGL cache here I guess. Any others?

Houdini Light Converters

We'd like to be able to convert IECore::Lights to and from Houdini. Once we have this, we could start storing light rigs in SceneCache files.

Improve precision of V3f repr

As noted in GafferHQ/gaffer#765

Using the repr for V3f etc specifies values in less precision than the repr for the python built in double type. We should re-implement repr for Vec and Color types in the IECore bindings to have improved precision - a bit of reading around seems to imply that boost::lexical_cast does a bunch of shenanigans to ensure reasonable round tripping between float and decimal representation, and might not be as horrifically slow as it has been in the past…

Remove ModelCache entirely

SceneInterface replaces the need for ModelCache, so lets get rid of it before we lock down compatibility.

LinkedScenes etc: working out what file you're actually reading

Hello,

I've got a local version of cortex where you can query a couple of invisible attributes called "sceneInterface:file:name" and "sceneInterface:file:scenePath" from SceneCaches, which return the scene cache file name and location path respectively. This is so you can work out what file you're actually reading in a LinkedScene, or my IERendering::ParticleScene, so you can build proper hashes in gaffer scene readers where there's instancing. I realise that this probably won't make sense if we start playing with gaffer scene interfaces etc, but we need some way of working these things out... sceneInterface:objectHash, sceneInterface:attributeHash etc? What do we reckon?

IECore.warning doesn't handle evaluated code

IECore.warning (and similar commands) fail when the warning is issued from an evaluated python script with the following error message:

File "/software/apps/cortex/8.0.0-a20/cent6.x86_64/maya/2014/python/IECore/Log.py", line 81, in __getCallContext
callStr = f.f_globals["__name__"]
KeyError: '__name__'

Evaluated python scripts are, for example, ones that are defined in config files.

Lazy computation of prim vars in IECoreGL

I think that drawing could be greatly improved by doing lazy computation on the conversion of IECore Primitives to IECoreGL primitives or to gl buffers, not to mention reduce memory consumption.

Ideally it should be driven by the primVars that the GL shaders see.

Locators in Houdini

Houdini doesn't have it's own concept of Locators (other than the nonsense 3 poly lines that are unconnected and unidentifiable once created). We will likely have CoordinateSystems coming from SceneInterfaces in Maya, so we need to be able to load them in Houdini, manipulate them, and export them back to SceneCaches.

This may require making GEO, GU, GR, and GUI implementations specifically for CoordinateSystems, or we may be able to re-use general purpose CortexObject implementations, depending on the outcome of #36.

Either way, we will need new To/From converters for CoordinateSystems.

Default ParticleReader::realType() to Float

We added the ParticleReader::convertPrimVarNamesParameter() and defaulted it to true in the hope that it would make default-loaded caches renderable directly in IECoreGL. But the realTypeParameter() still defaults to Native, so when reading PDC files we end up with V3dVectorData for "P", and rendering still fails. Default the realType() to Float and all will be well.

LRUCache with constant access time

As we rely more on the LRUCache, I believe would be beneficial to use associative maps with constant access time for find operations. Should also pay attention to memory consumption. Consider passing the map to be used as a template parameter as well.

Improve ObjectPool memory tracking

The current mechanism for tracking memory usage in an ObjectPool is rather simplistic, simply adding Object::memoryUsage() to the total when adding an object and subtracting it when removing an object.

In reality, many objects share the same child objects, so we are overcounting our memory usage, and therefore removing objects from the pool in unnecessary attempt to keep below memory limits. We should fix this.

Note that when counting the memory for an individual object with Object::memoryUsage, we already have an awareness of when the same child object is referenced twice, and don't overcount there, using the Object::MemoryAccumulator class - I suspect we could use a persistent version of something like this class inside the ObjectPool.

Consider memory deduplication in Object::load method (Cortex 9)

Currently we have in our StreamIndexedIO all the information would be required for high level Object deduplication at load time.

The Objects when saved, flush their directories into a sub-index in the StreamIndexedIO, which is deduplicated. So identical Objects are currently saved in identical Sub-index data blocks.

I believe we could add a hash() method to IndexedIO that would uniquely identify the current location and in case of a sub-index, it would use it's offset in the file. Then we could use a ComputationCache in the Object::load method to reuse loaded objects. The main drawback I can see is that for objects that are not repetitive, we would have an additional copy() call once we get them from the cache...

Just an idea to consider. If we have that, then the cache mechanisms in SceneCache reader will be unnecessary and we would save memory when loading models with repetitive structures.

Package cleanup and contrib

This is an offline discussion that aims on simplifying Cortex packages by:

A) Reassessing whether we should break IECore into sub-packages ( IECoreMath, IECoreRendering, IECoreData, IECoreAlgo, etc)

B) Moving classes to Contrib and making them optional: old stuff, optional stuff, not so well thought out stuff. Maybe we could be more flexible in terms of binary compatibility for things moved to Contrib?

C) Use pyilmbase for Imath python bindings. What do we do with Imath extensions we have?

We can discuss here about these three big changes that may be addressed separately, once we have a plan.

Precompiled headers

What I've noticed from building Cortex over and over is that it takes way too long! What I propose is having a Precompiled.h (or stdafx.h) and place includes that are commonly used through the library to speed up compile times.
MSVC:
http://msdn.microsoft.com/en-us/library/h552b3ca.aspx
GCC:
https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html

Thoughts? Bringing in the Export.h took awhile and I'm somewhat reluctant to add another include into every file again, but the compile times at least on MSVC on my laptop are quite long.

ieProcedural not allowing attribute overrides on ginstances in Arnold

As it stands the ieProcedural for Arnold is not taking the user attribute values from an instance.

ass example:

options
{
 name options
 AA_samples 3
 AA_seed 1
 AA_sample_clamp_affects_aovs off
 abort_on_error on
 abort_on_license_fail off
 skip_license_check off
 error_color_bad_texture 1 0 0
 error_color_bad_pixel 0 0 1
 outputs 
  "RGBA RGBA defaultArnoldFilter@gaussian_filter defaultArnoldDriver@ieDisplay"
 xres 960
 yres 540
 region_min_x -1
 region_min_y -1
 region_max_x -1
 region_max_y -1
 aspect_ratio 1.00000012
 bucket_size 64
 bucket_scanning "spiral"
 ignore_textures off
 ignore_shaders off
 ignore_atmosphere off
 ignore_lights off
 ignore_shadows off
 ignore_subdivision off
 ignore_displacement off
 ignore_bump off
 ignore_motion_blur off
 ignore_dof off
 ignore_smoothing off
 ignore_sss off
 auto_transparency_depth 10
 auto_transparency_threshold 0.99000001
 texture_max_open_files 512
 texture_max_memory_MB 1024
 texture_per_file_stats on
 texture_searchpath "/shows/jupiter/shots/093_kmc/093_kmc_0280/user/ashley-r/maya/sourceimages"
 texture_automip on
 texture_autotile 64
 texture_accept_untiled on
 texture_accept_unmipped on
 texture_conservative_lookups on
 texture_glossy_blur 0
 texture_diffuse_blur 0.03125
 texture_max_sharpen 1.5
 camera "perspShape"
 background NULL
 atmosphere NULL
 low_light_threshold 0.00100000005
 shadow_terminator_fix on
 sss_bssrdf_samples 3
 volume_indirect_samples 0
 reference_time 0
 shader_nan_checks off
 max_subdivisions 999
 procedural_searchpath "/shows/jupiter/shots/093_kmc/093_kmc_0280/user/ashley-r/maya/"
 shader_searchpath ""
 preserve_scene_data off
 texture_gamma 2.20000005
 light_gamma 2.20000005
 shader_gamma 2.20000005
 GI_diffuse_depth 1
 GI_glossy_depth 1
 GI_reflection_depth 2
 GI_refraction_depth 2
 GI_total_depth 10
 GI_diffuse_samples 2
 GI_glossy_samples 2
 GI_refraction_samples 2
 enable_aov_composition on
 declare frame constant FLOAT
 frame 1
 declare render_layer constant STRING
 render_layer "defaultRenderLayer"
 declare fps constant FLOAT
 fps 24
}

persp_camera
{
 name perspShape
 fov 54.4322243
 focus_distance 1
 aperture_size 0
 aperture_blades 0
 aperture_rotation 0
 aperture_blade_curvature 0
 uv_remap 0 0 0 0
 matrix
 0.99999392 -5.42101086e-20 0.00349065149 0
 0.000745897589 0.976902783 -0.213683054 0
 -0.0034100269 0.21368435 0.976896822 0
 2.77325702 2.4019146 12.9891367 1
 near_clip 0.100000001
 far_clip 10000
 shutter_start 0
 shutter_end 1
 rolling_shutter "off"
 screen_window_min -1 -1
 screen_window_max 1 1
 exposure 0
}

ortho_camera
{
 name topShape
 matrix
 1 0 -0 0
 -0 2.22044605e-16 -1 0
 0 1 2.22044605e-16 0
 0 100.099998 0 1
 near_clip 0.100000001
 far_clip 10000
 shutter_start 0
 shutter_end 1
 rolling_shutter "off"
 screen_window_min -15 -15
 screen_window_max 15 15
 exposure 0
}

ortho_camera
{
 name frontShape
 matrix
 1 0 0 0
 0 1 0 0
 0 0 1 0
 0 0 100.099998 1
 near_clip 0.100000001
 far_clip 10000
 shutter_start 0
 shutter_end 1
 rolling_shutter "off"
 screen_window_min -15 -15
 screen_window_max 15 15
 exposure 0
}

ortho_camera
{
 name sideShape
 matrix
 2.22044605e-16 0 -1 0
 0 1 0 0
 1 0 2.22044605e-16 0
 100.099998 0 0 1
 near_clip 0.100000001
 far_clip 10000
 shutter_start 0
 shutter_end 1
 rolling_shutter "off"
 screen_window_min -15 -15
 screen_window_max 15 15
 exposure 0
}

procedural
{
 name sphereProc|sphereProcShape
 dso "/software/cortex/linux.centos6.x86_64/8.0.0b3/arnoldProcedurals/ieProcedural.so"
 min -1.5 -1.5 -1.5
 max 1.5 1.5 1.5
 visibility 243
 receive_shadows on
 self_shadows on
 matrix
 1 0 0 0
 0 1 0 0
 0 0 1 0
 0 0 0 1
 shader "aiUtility1SG"
 opaque on
 declare className constant STRING
 className "sphereProc"
 declare classVersion constant INT
 classVersion 1
 declare parameterValues constant ARRAY STRING
 parameterValues 2 1 STRING

  "-radius" 
  "1.5"
 declare position constant FLOAT
 position 0
}

ginstance
{
 name sphereProc1|sphereProcShape
 node "sphereProc|sphereProcShape"
 inherit_xform off
 visibility 243
 matrix
 1 0 0 0
 0 1 0 0
 0 0 1 0
 5.10058546 0 0 1
 shader "aiUtility1SG"
 declare position constant FLOAT
 position 1
}

gaussian_filter
{
 name defaultArnoldFilter@gaussian_filter
 width 2
}

ieDisplay
{
 name defaultArnoldDriver@ieDisplay
 driverType "MPlayDisplayDriver"
 declare imdisplayExtraArguments constant STRING
 imdisplayExtraArguments "-Y session1"
 declare displayHost constant STRING
 displayHost "pinot.blue-bolt.local"
 declare displayPort constant STRING
 displayPort "1559"
 declare remoteDisplayType constant STRING
 remoteDisplayType "MPlayDisplayDriver"
}

MayaShadingEngine
{
 name aiUtility1SG
 beauty aiUtility1
}

utility
{
 name aiUtility1
 color_mode "color"
 shade_mode "flat"
 overlay_mode "none"
 color ramp1
 opacity 1
}

MayaRamp
{
 name ramp1
 type "v"
 interpolation "linear"
 uWave 0
 vWave 0
 uvCoord 0 0
 uvCoord.y aiUserDataFloat1
 noise 0
 noiseFreq 0.5
 position 3 1 FLOAT
0 0.5 1
 color 3 1 RGB
1 0 0 0 1 0 0 0 1
 hueNoise 0
 satNoise 0
 valNoise 0
 hueNoiseFreq 0.5
 satNoiseFreq 0.5
 valNoiseFreq 0.5
 defaultColor 0.5 0.5 0.5
 colorGain 1 1 1
 colorOffset 0 0 0
 alphaGain 1
 alphaOffset 0
 alphaIsLuminance on
 invert off
}

userDataFloat
{
 name aiUserDataFloat1
 floatAttrName "position"
 defaultValue 0.5
}

This should render a red sphere and a blue one, but instead they are both red.

I think this is because the original attributes are being copied to the sub-objects in the procedural on the first call, and thus not being overridden by the instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.