PDA

View Full Version : Gradient Ref Objects Lost



JBT27
07-15-2006, 04:08 PM
I've seen this several times before, and it's the same in 9.0 apparently.

I have a surface which uses several gradients in several channels, and one of the gradients I use alot is Y Distance To Object, where you can select an object in the scene from a drop-down menu.

Trouble is I have it all set up and working, but when I open the scene again, the object I set has changed to something else - so I set it to be 'Topo Null' for instance, but when I reopen the scene, 'Topo Null' has been replaced by 'East Bldgs', meaning I have to go through and change back all the objects and hope it doesn't do it again the next time.

Very frustrating. Does anyone know what this is, and a workaround or even fix?

Thanks.

Julian.

RedBull
07-15-2006, 04:40 PM
Yeah as far as i'm concerned this is a bug or limitation..
For some reason LW8.x and 9.x do not reference the Null or Reference items after a load scene.
There is not an actual workaround or solution apart from setting them up everytime as far as i'm aware..

You could perhaps try using standard default light, for the item reference
as the default light is in everyscene..... But otherwise i can't see how this couldn't be an easy fix for NT. And i hope it's done in the 9.x series.

JBT27
07-15-2006, 04:54 PM
Thanks.....I was hoping it wouldn't be something like that! So maybe I'll rethink how to do this - I do use this alot sometimes, and in fairness it doesn't get changed all the time, but more often than not.

Even on the release of 9.0 we're still facing ridiculous things like this.

Julian.

Dave Jerrard
07-17-2006, 10:08 AM
Add a layer to the object, create a point in that layer & save the object again. In Layout, change the reference object to that layer. This should fix all your problems.

What's most likely happening is that as the scene loads, your object is loading, and looking for that null object, before the null object is added. Since that null doesn't exist yet, LW's picking something else. By making the reference object part of the object file itself, the reference is always present when the object is loaded (it's loaded at the same time). This also solves the problem of refrences being lost when you load the object without a Load From Scene, or when you load it into Modeler, and do any work on it.

Make the nulls part of the object and you're sure to always have them.


He Who Has Embedded His Nulls For Years Now.

JBT27
07-17-2006, 10:51 AM
Thank you very much! The loading order makes some sense I guess, though like I say it's not a repeatable problem - happens often but not every time.

The point-in-a-layer idea actually makes alot more sense than using nulls as well - thanks again! :thumbsup:

Julian.

JBT27
07-20-2006, 04:13 AM
Having tried this, there's an ironic 'gotcha' with Dave's idea.

The first problem was of course using nulls as reference points for gradients, but that they sometimes fail to get seen by the gradients once the scene is reloaded and so you have to re-add them by hand, which is a pita for a scene with alot of referenced gradients.

On the surface (hoho), Dave's idea is good and seems to solve the problem. What I hadn't bargained for was the re-emergence of the pivot position problem. Adding a layer with a single point is all well and good, but the pivot point is where that object will be referenced from - for instance Y Distance to Object doesn't measure distance to the object, it works to the object's pivot point.

Having tried this, I suddenly realised yesterday that the position of the pivot I set in Modeler wasn't coming across to Layout - in Layout the pivot for that layer was remaining at 0,0,0, despite repeated attempts to reload. In the end I had to create a separate object, with the moved pivot, and that seemed to work.

So now it's down to finding workarounds for workarounds, and then I had this really revolutionary, even radical, possibly confrontational idea......why don't NT just fix it???

Julian.

Dave Jerrard
07-20-2006, 12:11 PM
Actually, adding a point to a an otherwise empty layer makes that layer act just like a null. The pivot, unless you specifially move it, will be at 0,0,0, just like it is when you add a null.

Pivot point changes arent automatically updated in Layout if the object is already loaded. This is probably because it could open up a whole can of worms with objects that have already been animated. If the pivot was automatically update, the motions of objects in the scene can be severely affected. It would be nice to have the option though, but knowing how this works is a big timesaver. If you already have the object loaded, it's going to use the pivot locations that are already assigned, whether they are the defaults, were offset in the model before it was loaded, or assigned in the scene. Any changes to the pivot in the modler while the object is still loaded are ignored.

If the model is modified and then loaded into Layout, the pivot changes will be loaded for that copy, unless it's being loaded through a scene, in which case it will use the pivot locations specified in the scene file again. Once the object is loaded into Layout, it's assumed that the scene settings should take precidence over external modifications that could alter the way the scene is set up. The same thing happens with parenting. You can set this up in the scene and the model, but the scene settings will always be used until the model is loaded fresh.

He Who Has Only Been Annoyed By Multiple Copies Of The Object Loading Themselves.

JBT27
07-20-2006, 05:04 PM
Thanks for the info - the detail about how objects are updated and what takes priority is good to know, as it saves alot of arm-waving and ranting!

But, I agree that if you create a point in its own layer in Modeler at 0,0,0, like a null in Layout, it will act like a null. However, if I position the point in Modeler where I want it to act as the reference, so lets say 2m,2m,2m, the object is there but its pivot point is still at 0,0,0, and it seems that gradient refs like X Distance To Object measure from the objects pivot and not the object itself. I tried this yesterday and only got the result I predicted when I moved the point's pivot to where the point was in Modeler before sending it to Layout.

So actually you do have to move the pivot as well in Modeler if you set the point away from 0,0,0.

But if I take careful notice of positioning points and loading objects and changing all this before the object is open in Layout, it should work fine I guess.

Thanks again.

Julian.

Dave Jerrard
07-20-2006, 06:01 PM
Thanks for the info - the detail about how objects are updated and what takes priority is good to know, as it saves alot of arm-waving and ranting!That's for sure. I didn't like the layered objects when they were first added in LW6, but once I got my head around them, I've never looked back. They're extremely convenient, but they're not happy with sloppy scene layout habits, like arbitrarily changing object orders. If you keep all the layers together in the scene, then it's easy to replace the entire set of object layers by replacing the first layer, but if you mix it up and insert something else in between them, the layer replacement will stop there. I've seen some really messed up scenes over the years, and I can see how some people don't think layers work. But looking at their scenes, I wonder how they get anything to work. :D




But, I agree that if you create a point in its own layer in Modeler at 0,0,0, like a null in Layout, it will act like a null. However, if I position the point in Modeler where I want it to act as the reference, so lets say 2m,2m,2m, the object is there but its pivot point is still at 0,0,0, and it seems that gradient refs like X Distance To Object measure from the objects pivot and not the object itself. I tried this yesterday and only got the result I predicted when I moved the point's pivot to where the point was in Modeler before sending it to Layout.I see where the confusion is now. The point is just there so the layer becomes active and can be loaded into Layout. Since it's a point it won't render, and for all intents & purposes, that layer is a null object to Layout. The pivot point, as you mentioned, is the determining factor in how the layer is read by distance gradients and other references, as well as how it animates - not the actual point itself. You can always move the pivot point as needed, either in Modeler, or in the scene. The point is just geometry, and has no more bearing on distance gradients than a polygon. But a polygon can render, where a point is always invisible, unless you apply HyperVoxels or something else like that to it.


So actually you do have to move the pivot as well in Modeler if you set the point away from 0,0,0.Actually, it doesn't matter where the point is. It's there only as a place holder. It's the pivot point that's important for what you're doing. It's the only thing that has to be moved. I just add a point and have it centered when I make these null-layers. I don't recall ever moving the pivot point of one of these layers since they don't render anyway. Never seemed to be much point in it. Sorry. Couldn't resist such a bad pun. :devil:



But if I take careful notice of positioning points and loading objects and changing all this before the object is open in Layout, it should work fine I guess.Right. I always try to build my multi-layered objects without any scenes set up, but it can get a bit tricky, like when you're texturing along the way. Then I usually have an object viewer scene, and *** I add or arrange layers, I'll send the entire object to Layout, remove the old layers from there, and keep going like that. Every time you add the object again, it's added to the end of the item list. What I usually do is make the first layer a null, and parent everything else to that first layer. Then I can use that to position the entire assembly. If I have a newer duplicate, I can either delete the first null of that name to get rid of the old object from the scene, or, in the case that I have some motions applied, and I need to add a new layer, I'll just parent the new layers to the old assembly and get rid of the duplicates.

Before I finalize everything after doing that, I'll clone all the layers, so they all appear at the end of the object list in a contiguous chunk, and reparent them there. This keeps any motions that I have applied, and then I can delete the original object. As long as the layers are together like this, they'll play nice, and the scene is neat. Then I save this as an assembly that I can load from scene whenever I need it. I'll also load this object into Modeler, and make the entire thing a single black surface and save it as a black version for masking purposes. Then I can replace the first object layer and have the entire assembly replaced with the black version & vise versa, in one step. I've done this with objects consisting of over 50 layers without a hiccup. The important thing is the first layer needs to be ahead of all the others in the scene list. The replace function only works down from that first layer. Anything before that will be missed and not replaced.


He Who Remembers Writing Some Tips About This Somewhere Before.

JBT27
07-21-2006, 07:23 AM
Thanks very much Dave - this is much appreciated :thumbsup:

Got to get my head around this now, but it is very heartening to know that it's more to do with clean workflow than it ever was about dodgy code.

Thanks again.

Julian.