PDA

View Full Version : Sphere-a-ficate?



objuan
01-27-2016, 10:50 PM
I want to lay out a fairly extensive flat landscape, with buildings and light poles, and stuff - then I want to distort it around a globe so the horizon has curvature. I'd like to be able to play with the size of the globe easily, and possibly animate it.

What is the best way to go about this?

I toyed a little bit in Modeler with Spherize and Wrap Sphere, and while I don't really understand what either of them do (?) I'm pretty sure it is not what I want. Spherize is actually pretty close, but I want to retain the verticality of my original flat world creation, just now it would be radial instead of vertical.

I don't really need to see the poles of my spherification to much, so pinching at them won't be an issue for me. I do however want my geometry to ring all the way around the equator, to create a seemless loop.

-

It's plausible, in my actual scenario, that somehow instancing my buildings and such to faces of a globe might work better, but I don't actually know much of anything about how to do that either?

Any tips on either approach would be appreciated.

Thanks.

ernpchan
01-27-2016, 10:54 PM
So it'd be as if you modeled a straight city block, and now want to curve that around a globe?

objuan
01-27-2016, 10:58 PM
Yeah exactly. Expect maybe more like a row of 20 blocks. And trippier than that.

ernpchan
01-27-2016, 11:00 PM
This is a puzzle.....

objuan
01-28-2016, 12:36 AM
This is a puzzle.....

Oh ****. If my man Pchan aint instantly like, "Yeah you hit the button right in front of you Doofus." I could be in trouble...


Oh damn, I forgot this gentle system will shelter your ears from even my rather polite four letter words...

objuan
01-28-2016, 12:41 AM
I guess I want to do exactly what a spherical texture map does, except I want that texture map to be geometry that retains is depth... ?

jeric_synergy
01-28-2016, 01:20 AM
Theoretically, you could do it with the Layout Deformer:BEND, but I have no doubts it could become a total hairball. OTOH, I suggest you model a quick dummy to play with, you might get lucky. IIRC there's some cheezy way to just Bevel a grid and get a very weak "city scape", but I disremember right now.

Remember you can stack deformers. I think you might be able to get something if you split your city down the middle and did two bends, one latitude the other longitude, for each, using BEND twice on each.

IIRC to use WRAP SPHERE you have to place a flattish piece of geometry at some -Z offset. Probably -1.

Jmation
01-28-2016, 02:06 AM
Here is a simple solution. Most of the work can be done by simply changing the camera lens and then a little displacement on the geo to help it along.
132070

ernpchan
01-28-2016, 03:02 AM
Found this. https://www.lightwave3d.com/assets/plugins/entry/shm-plane-to-sphere/

Not sure if this YT video uses the above lscript.
https://youtu.be/qDTsMTDx-nM

Getting your geo to stick to your polygons would be the tedious part. I suppose instancing or some DPKit setup would work.

probiner
01-28-2016, 07:14 AM
I admit I tried a more fancier nodal solution first... but... just use FX_Metalink...

Parent: Flatten Cube with animated sphere morph from 0 to 1 and Soft FX calculated.
Child: City fitting the flatten cube with FX_Metalink

http://screencast.com/t/VRnDyu5a2

01-28-2016, 11:05 AM
"The Lightwave 6.5/7.0 Project Handbook" by Patrik Beck has what you want.
Unwrapping a sphere is the section that speaks to this task:
Take a box; make a morph for the Globe. Using bend, bend horizontally then bend vertically. it would be done in quarters, as it were.
Done.
The box is still intact for you to do your object placement. No reason i can think of that it wouldn't keep those items in the same place once the morph is called.

Sounds like a fun project.
Robert

jeric_synergy
01-28-2016, 08:22 PM
New points won't comform to the box/globe morph map, they wouldn't move at all, unless you were doing some kind of instancing.

lertola2
01-29-2016, 08:20 PM
This is easy with 4 bend deformers. Two for east-west and two for north-south. When the control nulls move 1 meter the object bends 90 degrees in the direction of the line connecting the bend handle to the bend base. So in the case of the attached example the north and south handles move 1 meter and the east and west move 2 meters to bend the map into a complete sphere.

http://forums.newtek.com/attachment.php?attachmentid=132110&d=1454122972

132110

132112

shrox
01-29-2016, 08:48 PM
This is easy with 4 bend deformers. Two for east-west and two for north-south. When the control nulls move 1 meter the object bends 90 degrees in the direction of the line connecting the bend handle to the bend base. So in the case of the attached example the north and south handles move 1 meter and the east and west move 2 meters to bend the map into a complete sphere.

http://forums.newtek.com/attachment.php?attachmentid=132110&d=1454122972

132110

132112

A better solution than I was going to offer, I've have built similar by making the flat model into two hemispheres.

jeric_synergy
01-30-2016, 12:32 AM
This is easy with 4 bend deformers. Two for east-west and two for north-south. When the control nulls move 1 meter the object bends 90 degrees in the direction of the line connecting the bend handle to the bend base. So in the case of the attached example the north and south handles move 1 meter and the east and west move 2 meters to bend the map into a complete sphere.
http://forums.newtek.com/attachment.php?attachmentid=132110&d=1454122972
132110
132112
:thumbsup: Nice one, Lertola! And a sample scene too! You rockin' it man! :bowdown:

I'm thinking that the Layout deformers need a better press agent (i.e, more attention/mention from LWG)-- the hivemind should have coughed this up first thing.

PS: all the parts are there, but the layout of that ZIP file was weird. Didn't automatically expand subdirs. JFYI.

Spinland
01-30-2016, 05:39 AM
Wow, that is so cool! I was primed to suggest trying the 3rd Powers heat shrink tool but that method works so amazingly well and for no extra $$. :beerchug:

MonroePoteet
01-30-2016, 07:11 AM
First the Spring, now the World!! Lertola2, yer the BendMaster! :)

Very nice!

mTp

jeric_synergy
01-30-2016, 09:31 AM
If someone wants Brownie Points (band name!), a nice clear tutorial of the potential of all the Layout deformers would benefit us all. What are they, Twist, Bend, and Shear? (mentioning for the noobs.)

What's kind of crazy making is how the deformers have remained static over the years-- there they were, ripe for feature additions, but noooooooooooooooo.......

It's educational to disable the deformers in the stack, one by one.

MonroePoteet
01-30-2016, 12:24 PM
After Lertola2 so elegantly solved the spiral spring problem using Bend, here's a little test scene I set up to experiment with the deformers. The various Nulls are labeled and connected to their counterpart for each deformer. The labels give the motion channels that effect the deformer. The "handle" or "corner" Nulls are moved between frame 0 and frame 60, the "base" or "center" Nulls are moved between 60 and 90, and the "handle" or "corner" Nulls are moved back to first positions at 120.

As Jeric says, it's interesting to disable all but one of the deformers on the Box to see its individual effect. Note that only the Y-axis version of the axis-specific deformers are included.

I think they'd be very powerful once I understand them better. The wierd thing is I use Bend, Taper, Twist, Vortex, Pole and Shear very regularly in Modeler, using right-drag to set up the region and direction of influence. I guess it's remembering which specific motion channels affect each deformer that's tripped me up in Layout. Maybe this will help!

Thanks, Lertola, for re-introducing them! Great job on both problems!

mTp

lertola2
01-30-2016, 07:16 PM
After Lertola2 so elegantly solved the spiral spring problem using Bend, here's a little test scene I set up to experiment with the deformers. The various Nulls are labeled and connected to their counterpart for each deformer. The labels give the motion channels that effect the deformer. The "handle" or "corner" Nulls are moved between frame 0 and frame 60, the "base" or "center" Nulls are moved between 60 and 90, and the "handle" or "corner" Nulls are moved back to first positions at 120.

As Jeric says, it's interesting to disable all but one of the deformers on the Box to see its individual effect. Note that only the Y-axis version of the axis-specific deformers are included.

I think they'd be very powerful once I understand them better. The wierd thing is I use Bend, Taper, Twist, Vortex, Pole and Shear very regularly in Modeler, using right-drag to set up the region and direction of influence. I guess it's remembering which specific motion channels affect each deformer that's tripped me up in Layout. Maybe this will help!

Thanks, Lertola, for re-introducing them! Great job on both problems!

mTp

Thanks. That is interesting to play with all the deformers. Its nice to have a scene that demonstrates them all. I am a bit surprised at what the pole deformer is doing.

I have never used any other deformers except for the bend which I have found very handy. I have several times used them to make a curved map. The above example was from one of those projects. Here I was playing around with three bends to make a paper clip:


https://www.youtube.com/watch?v=Hj1AgE3jxug

MonroePoteet
01-30-2016, 10:39 PM
That paper clip is excellent! Nice combination with really nice results. Are the red lines actual representations of the deformer base / handle movements? Now, I'll have to try to reproduce it...

RE: Pole, the scene I posted previously doesn't really give a good example. A better example is attached, with only the Pole tool active. I changed the Item Shape of the Pole Center Null to a sphere to show the X,Y,Z scaling, changed the effect shape to "Bell" in the deformer's panel, moved the effect center up in Y and scaled up the X,Y,Z on the center. Especially scaling up the Z on the center shows a better shape to the effect.

As far as I can tell, it works almost exactly the same as the Pole tool in Modeler, and may use the same code. You can take the tall box from the scene into Modeler, select the Pole Tool (Modify=>Transform=>More...=>Pole Tool), then right-drag an effect region (showing a blue elipse), then left-drag the effect. Numeric ("n") gives the options on the shape of the effect. There's also a Pole Evenly Tool which effects both dimensions in an orthogonal window the same.

mTp

objuan
01-30-2016, 11:56 PM
Thanks for all the interesting ideas and help guys! now I just need to get out from this other project to put the bend to work...

djwaterman
01-31-2016, 06:45 AM
With lertola2's bend set up, could you set up a whole scene of a character driving a car down the street, with people walking on the sidewalk and stuff, and apply that bend deformer set up on the whole scene to get that effect of globe curvature?

ernpchan
01-31-2016, 09:48 AM
With lertola2's bend set up, could you set up a whole scene of a character driving a car down the street, with people walking on the sidewalk and stuff, and apply that bend deformer set up on the whole scene to get that effect of globe curvature?

Deformers only work on geometry. You'd have to find a way to constrain your motion to the geo that's getting deformed.

jeric_synergy
01-31-2016, 02:43 PM
If the motion were already constrained by geometry, deformation might percolate thru, depending on the evaluation order.

This is why a new geometry engine (?) with user-orderable evaluation order is a Big Thing.

It seems the original coders went with a very simplistic approach to entities, which has hamstrung us ever since. For instance, certain operations are exclusive to certain entities (objects, cameras, lights, bones, joints) when in reality they could very easily be applied to any 'item'. If such a more general approach had been present at the genesis of LW, our life would be very different. For instance, if motions were regarded as meshes (i.e., splines) instead of something else (ie whatever they currently are), Deformations COULD have been applied to them.

jeric_synergy
02-01-2016, 01:53 AM
Just doodling around, I haven't even looked at the "All In One" sampler yet. I should look at the dox to find out the MATH or logic behind the deformers. Anyway, I whipped this up, it's useful to play around with. Sub-noob level.

132151

LIKE, I cloned the deforming object and moved it to the right to try a different deformer, and it continued to deform exactly as its parent did, although it was translated +X. Now I'm getting confused.....

lertola2
02-01-2016, 06:50 AM
LIKE, I cloned the deforming object and moved it to the right to try a different deformer, and it continued to deform exactly as its parent did, although it was translated +X. Now I'm getting confused.....

Moving the object won't change the way it is affected by the control nulls. You could parent the control nulls to the object so they would move around with the object which might make it easier to understand the relationship between the controls and the object. It would be great if there was some universal version of these deformers that would affect not just individual objects but a whole animated scene.

MonroePoteet
02-01-2016, 08:07 AM
Yes, the inputs to the various deformer functions are just plain numbers which happen to be the position / rotation / scale of the control nulls. If they're parented to the object (or anything else), they'll happen to be Local coordinates and if not, they'll happen to be World coordinates. The implementers could have used a numeric input panel to accomplish the same inputs, or sliders. I'm just as happy they used Pos / Rot / Scale numeric inputs now that I'm getting familiar with which does what.

Something I'll probably try to do is experiment with the deformers in Modeler, take the exact values from the Numeric panel there, and see if Pos / Rot / Scale of the control Nulls has the same effect with the same numbers. I'm guessing it's common code.

mTp

jeric_synergy
02-01-2016, 09:02 AM
I'm very guilty of not reading up on it, assuming the info is in the dox, mea culpa. I think I thought they'd be like bones, and their world position would matter, like a deformation matrix. My bad, and thanks for the corrections. :thumbsup:

As to 'affecting an entire scene' (although I think just a large CHUNK of a scene would be more usefull, like a multi-part subassembly), I think we'll have to wait for a different architecture.

raw-m
03-08-2016, 03:53 AM
Late to this party, very nice demos, thanks! Been using them a lot recently after a while of avoiding (not sure why!). Would really like to seem some dev work on them. Some UI gizmos would help a lot and would LOVE to see them work in world space. Currently, you have to use the old morph trick to move an object through a displacement. It would be far more useful if you could just move an object around in Layout and have it deform accordingly!

Ztreem
03-08-2016, 07:59 AM
Late to this party, very nice demos, thanks! Been using them a lot recently after a while of avoiding (not sure why!). Would really like to seem some dev work on them. Some UI gizmos would help a lot and would LOVE to see them work in world space. Currently, you have to use the old morph trick to move an object through a displacement. It would be far more useful if you could just move an object around in Layout and have it deform accordingly!

What I usually do, is to add a bone to the object and move the bone around. It is much easier to work with then morphs and faster to setup.
132803

raw-m
03-08-2016, 08:19 AM
What I usually do, is to add a bone to the object and move the bone around. It is much easier to work with then morphs and faster to setup.
132803

Ztream, FANTASTIC! Just tried it, you've made my week :D

Ztreem
03-08-2016, 08:23 AM
Ztream, FANTASTIC! Just tried it, you've made my week :D

Glad I could help.