PDA

View Full Version : Instancing Deformation - pleeeeease help



mbtgraf
09-12-2012, 03:14 AM
Hello, folks

I am trying to create an instanced array that deforms via world-coordinate deformation (either nodal or with texture map).

Applying a world-coordinate deformation to the original object , does not help, each object's deformation seems to be in local coordinates, no matter what the node/surface is set to.

I even tried to apply the deformation to the array's NULL parent ;D (dumb I know, but ...) ofcorse to no avail, as expected.

I also tried to use the InstanceInfo node's position as an input to the texture position (both inverted and straight), but the deformation was still in local coordinates.

Changing the coordinates system of the instanced item to World (which is the default) also does not help.

Using SpotInfo in deformation setup also does not seem to have an effect (and I understand why, spots are not point positions).

I AM DESPERATE 8/
Can anyone help with the way/technique/tool/setup?
Thanks Ahead

RebelHill
09-12-2012, 03:23 AM
ahhh... Have you tried using the tricks for mixing surfaces onto different instances, putting the displacement in through there and using enable bump? Maybe, maybe not, that's just an off the top of the head thought.

mbtgraf
09-12-2012, 03:31 AM
Yes, when I do that, it acts as if the displacement has been disabled :(
The end product should be waving blades of grass clumps and flowers , but at the moment I am instancing a simple plane where each plane is divided 5x5

RebelHill
09-12-2012, 06:48 AM
sure u got it hooked up right? inout to displace on surface node (not bump), turn on bump displacement, set distance... correct subdiv/disp order, etc.

mbtgraf
09-13-2012, 05:04 AM
Yep, all seems to be correct (logically :( ) however it does not seem to work :( it either displaces each item the same way or not at all :(
Is there a way to access Instance Info inside an LScript? I haven't written scripts for a while ...

mbtgraf
09-13-2012, 05:56 AM
WOW, it seems world-coordinate displacement does not work as a rule... The "world" coordinates in the displacement seem to be based on the Reference Object input, but in instancing it is not much help ...

I wonder, is it because of a way the displacements are calculated? HMMMMMMMMMM ...

mbtgraf
09-19-2012, 02:07 AM
Any ideas , folks? :(

lertola2
09-19-2012, 01:49 PM
I am not sure I understand what you are trying to do so forgive me if I am sticking my foot in my mouth. You can rotate instances with a texture using the node editor. You need to set the mode to uniform for this to work I think. The attached images show an example of this. You could use that to get a waving effect. There are also inputs in the instance node editor for time scale and time offset. I would think you could use those with a texture to add variation to the animation of your base object. I have not tried that though. If you want to deform each instance as if it was true geometry I am guessing that is not possible.

107930

107929

sukardi
09-19-2012, 07:30 PM
Yes, I cannot get the world coordinate displacement to work in instances as well. The same with clip map. I would be most interested to hear if anyone knows of a work around...

lertola2
09-19-2012, 09:34 PM
When you say displacement on instances do you mean you have a displacement map which is deforming the base object and you want the displacement map to be in world coordinates so it will deform each instance differently? If that is the case I think you are out of luck. It would be amazing if you could do that.

You can use a texture in world coordinates or not to rotate and scale your instances so perhaps you could build your waving grass and flowers instances so that it can be achieved that way.

Thomas Leitner
09-20-2012, 12:55 AM
When you say displacement on instances do you mean you have a displacement map which is deforming the base object and you want the displacement map to be in world coordinates so it will deform each instance differently? If that is the case I think you are out of luck.

Thatīs right.
You only can animate transform, rotate and scale individual for separate instances.
Itīs not possible for deformation like bones, displacement, mdds, morphs and so on.

I got this answer from NewTek support that this is a limitation of geometry pipeline:
"Each instance would need to be unique meshes, which is out of scope for current geometry pipeline implementation.
They would need to be unique meshes instead of instances. The same limitation affects bones as well."

ciao
Thomas

erikals
09-20-2012, 03:45 AM
When you say displacement on instances do you mean you have a displacement map which is deforming the base object and you want the displacement map to be in world coordinates so it will deform each instance differently? If that is the case I think you are out of luck. It would be amazing if you could do that.

that's what i though too, but this webpage post made me wonder... > 8~
http://www.3dworldmag.com/2012/09/19/review-lightwave-11-newteks-updated-modelling-and-animation-suite/

talked to Graham Fyffe (HD instance) once back, and recall he said that it is indeed possible. (from what i remember)

in a way, you can do it now, as you can set an animation offset to a instance with MDD.

lertola2
09-20-2012, 11:23 AM
that's what i though too, but this webpage post made me wonder... > 8~
http://www.3dworldmag.com/2012/09/19/review-lightwave-11-newteks-updated-modelling-and-animation-suite/

talked to Graham Fyffe (HD instance) once back, and recall he said that it is indeed possible. (from what i remember)

in a way, you can do it now, as you can set an animation offset to a instance with MDD.

That rock is probably made of instances that are rotated, scaled and moved so that you see each instance from a different angle. As discussed in this thread they can't have different shapes. Offsetting instances with MDD is news to me. I would like to see an example of that but I doubt that it can be done. I think I have looked at every control in the instance panel and I did not see anything that would allow that.

Thomas Leitner
09-20-2012, 11:58 AM
talked to Graham Fyffe (HD instance) once back, and recall he said that it is indeed possible. (from what i remember)

in a way, you can do it now, as you can set an animation offset to a instance with MDD.

I wrote about the native instancing from NewTek in LW 11, however with HD instance it is possible to offset MDD animations (no idea if you can displace instances individual).
I think DP Instance (donīt confuse it with DP Instancer) works also with different MDD offsets too (I never used it).
Both (DP Instance and HDI) work with an different approach (volumetric rendering) than the native instancing.

ciao
Thomas

erikals
09-20-2012, 11:58 AM
Offsetting instances with MDD is news to me.

oh, thought LW could do it. HD instance can do it.

erikals
09-20-2012, 12:37 PM
something for NT to consider > http://www.youtube.com/watch?v=mTv2k9IGjQw

erikals
09-20-2012, 03:11 PM
DP instance can do it too > http://www.youtube.com/watch?v=m4K3uMa2wXM

not sure if DPi can displace though...

lertola2
09-20-2012, 03:15 PM
oh, thought LW could do it. HD instance can do it.

Yes HD instance can offset MDD animation but there is no nodal control for HD instance. You can only randomly scale and offset the playback of the animation. So it would not be good for simulating a breeze blowing across a field of grass.

erikals
09-20-2012, 03:20 PM
but DPi does.

still, the HDi method is much better than nothing.

mbtgraf
09-23-2012, 01:13 PM
Well, it seems the problem is a bit deeper then just plain world-based deformation of instancing objects , but other sides of it have their workarounds. Whenever you use a texture as deformation for an object and check the world coordinates, the deformation stops working. For the single object the workaround would be to use a reference null. In the case of instanced object the null would not help since referenced deformation works on the base object and then gets copied over all of the instances.

But I think I have found a way to a solution in my case, although did not try it yet.
First of all, in the scene I do not instance a single blade of grass, I instance a round patch of grass with a diameter of about 1 meter (many blades, all sub-d and the base is set to use the PixelsPerPolygon subdivision).
:bangwall::lightwave
When I was adding stones to the scene, I created 4 endomorphs for the basic stone and used the morph map outputs multiplied by gradient outputs , driven by the instance position. It worked.
So for a single blade of grass, creating a morph for each of the wind directions and mixing the morphs scaled by animated gradients would probably work.
However, the ground scene that the camera passes is about 3 square kilometers or so, so no matter how much power my PC has I would not dream of instancing a 3 sq. km. of grass blades.
FiberFX does not work for the same reason. Patches however do cover it.

Also what I am ACTUALLY trying to do is just move the grass, not have it wave in the wind. I am doing it so the grass would not be static in the scene. But since the displacement is copied over and over the eye catches up and I do not see any way to randomise it :) When I finally get the time to work on the project again, I will try the endomorphs and we will see how it goes.

:stumped: What I do not get is the exact reason for the world deformation not being available. Can someone enlighten me? Or vote on the poll 8~ ?

Taro Yoshimoto
04-11-2014, 09:34 AM
Any update on this? I got the same problem now. Cannot apply world displacement on my instances. It's very limited now.