Announcement

Collapse
No announcement yet.

TraceList limitations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TraceList limitations

    Hi,

    Hey Vlado, or anyone in charge!

    I don't understand why if you exclude A from reflection of B, you can't exclude B from the reflection of A.
    It is forbidden because dependency loop.

    I am working on a script/UI for setting massively TraceLists and keep bumping into this, although in practical scene setup I never really had this specific need it is making the script a lot more complex to write and I can't figure out how this is necessary as one can want to have A and B not "seeing each other"...

    If totally impossible, I would LOVE to understand why. If it is too hard to explain without years of programming then I will take your word for it and find a workaround.
    By comparing arrays and removing objects from lists I can probably get rid of the dependency loops but it would probably make the script a lot slower and I keep thinking that the feature can be useful sometimes.

    Regards.

  • #2
    Hello,

    This is actually a 3ds Max requirement - the scene nodes form a directed acyclic graph meaning that no two scene nodes can depend on each other.

    When something changes with some node it must notify all it's dependents so that they can react to the changes - for example nested nodes - if you move the parent node, all the child ones should move too. When the child nodes receive that notification - they also notify their dependents and so on till all connected nodes receive the notification.
    If two nodes could reference each other - we would get and endless loop with the two nodes notifying each other for changes. Handling that kind of dependency loops would require special care at every place that sends and receives notifications which is my guess why 3ds Max developers decided not to allow it.

    Hope that helps.

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #3
      I understand the limitation of circular dependency for most things. In that particular scenario it is a limitation, the nodes shouldn't be referencing each other. If you change one it shouldn't affect the other.
      vlado, in a previous thread, was talking about making the reference "weak" as a possibility to avoid this behaviour.
      I am not convinced it can't be avoided as it really makes it completely impossible to have two objects not seeing each other.
      If I want two teapots to reflect everything but each other what would be your recommendation? It could help me finding a workaround.

      Comment


      • #4
        To make myself clearer I feel like it is making setup pretty difficult:
        If I want A and B to not see each other but see the rest of the scene I have to include everything but B in A TraceSets and everything but A in B TraceSets.
        Would be a lot more friendly if I could just exclude B from A and A from B.
        If I add more objects in the scene, with the first scenario I would have to edit the list each time...

        Comment


        • #5
          Wouldn't it be possible for the content of tracelist to be regular arrays of nodes, without dependencies?

          Comment


          • #6
            I feel very lonely on this thread...
            I asked for help to understand why VRay is using references to nodes instead of array of nodes, and the reply was that Max is preventing circular references... which I already know.
            To refine my question:
            The light include\exclude list are simple arrays of nodes, why are traceSets different?
            Why for example we can't put an object into its own traceSet exclude list?

            It seems to me like writing google in google, very scary (LOL) but in fact nothing happens...
            I wish someone would take the time to explain...
            Last edited by gregvfx; 11-10-2016, 11:09 PM.

            Comment


            • #7
              Hello,

              First of all - sorry for the delayed reply.

              Excluding two objects from each others traceSet is indeed a limitation. We've added an issue in our system to research for some solution to this limitation. I can't say when we'll be able to do it though.

              As for the references and arrays etc - I'll try to explain.

              There is no difference between the way light include/exclude lists are stored and the trace sets - they are both the same type of arrays of nodes. (TYPE_INODE_TAB to be precise). Those arrays are not simple arrays like arrays in programing languages - they are 3ds Max arrays of reference target objects and 3ds Max handles most of the stuff happening with them - like storing them in files when you save, loading from files, taking care of xrefs and many other things. One important thing that must be handled is deleting nodes - if somehow node A had a simple array of nodes with node B in it and at some point the user deletes node B - node A would still think that node B is valid and bad things might happen..

              The difference is that the light include/exclude list is part of the light object and not the light node. This has one positive effect - the light node itself doesn't reference other nodes so there is no dependency loop if you exclude light A from light B and light B from light A. Of course there is a negative effect too - if you make two instances of the same light - they will have the same exclude list.
              The trace sets on the other hand are attached to the nodes and not the geometry objects. That means that for example if you have two instances of a Box - you can have different trace lists for each instance.

              Hope that explanation helps.

              Best regards,
              Yavor
              Yavor Rubenov
              V-Ray for 3ds Max developer

              Comment


              • #8
                Thank you for replying!
                Very nice.
                I learned something!
                although when manipulating arrays through max script, the light exclude/include list behave differently than the traceSet list, you can't use it straight as an array, you have to collect/append.
                Maybe I am wrong and the lights are behaving the same way, I didn't check before writing this but it is my memory...

                Comment

                Working...
                X