#Mapping Scaling Objects
19 messages in this thread
I need some quick assistance on a minor mapping question.
I am trying to edge map a 3D map of the USA with a gradiant going from green to
red, so that as the individual states scale outward at different rates to
represent their respective levels, the color at the upper surface of the state
changes color. Is there an easy way to do this that I am missing?
I've tried edge mapping the states as a unit – the only way I can get it do
change color is to return to the Editor and reapply the mapping coordinates
once I have scaled the states. While this works for a single frame at any given
point in the animation, the upper surface of the state does not change
automatically as it scales over time.
Any quick solutions? TIA for any quick help that can be provided.
Bob Weil
Bob,
If I understand you correctly, you are scaling separate objects, each of which
is a plot with a fixed color scale. There is no way I know of to morph mapping
coordinates, which would do this easily.
Do you want just the upper surface to change color, or do you want the gradient
displayed on the sides of the objects as well?
If you want the latter, this trick once worked for me: I loaded my gradient
into a rectangular projector spotlight (no shadows) and shown it onto the
scaling object from the side. This way the gradient remains constant and the
object simply scaled upwards through it. I made the object 100% diffuse white.
The biggest problem is the top, if flat, doesn't illuminate as well as the
sides. I had to shine the light slightly down in order to color the top. It
wasn't perfect, and probably would have been harder if I had to move the camera
while scaling, but it did the trick. With a number of scaling objects, I would
probably use a number of spotlights.
(For a cool effect, try making the objects about 80% 2-sided transparant)
What you really need is an IPAS routine that would control the gradient. I
wonder if the new HSC gradient designer for 3DS would do this. I think it is
able to do time-controlable gradients. Gus? There is a demo in the LIB
(GDFX10.EXE).
JKJ
John –
Thanks for the suggestion. I was also going to try to do it with morph targets
for individual states, and morph materials as they grew. I would morph instead
of using scale in the Keyframer.
Both approaches have their merits.
Thanks again for a great tip!
Bob
>>with morph targets…
Let me know if you figure out how to do this with morph targets – I couldn't
get that to work out right. True, if you make the source and target objects
different materials and morph, and the beginning and end will look great. What
I couldn't get right were all those frames in the middle – as the object
scales/morphs I wanted a uniform and linear application of the gradient – as if
an absolute height of the object corresponded to a specific color. What
actually happened was something different.
Perhaps using solid colors for intermediate states with the final object a
solid color, not a gradient? (Yikes, this would require a lot of morphs and
materials for 52 states!) I'm very interested to hear about what you come up
with.
JKJ
>> Let me know if you figure out how to do this with morph targets – I couldn't
>> What I couldn't get right were all those frames in the middle – as the object
>> scales/morphs I wanted a uniform and linear application of the gradient – as
>> if an absolute height of the object corresponded to a specific color. What
>> actually happened was something different.
John,
Did you catch my message to Bob? Morph targets/materials work just as you
describe here. Original and 1 morph target, two different materials.
What happened that was different on your test?
Ralph
>>what happened…
Hi Ralph!
I did see the message. When I tried this the materials do morph properly
(gradually) as you'd expect. However, as the gradient appears, it stretches
_with_ the object as it scales. The effect needed for this type of animated
graph is considerably different – you want the gradient to remain stationary
and have the object reveal more of the gradient as it rises. For example, if
the gradient had 10 colors, the object at 50% height should have just the
bottom 5 colors – at 70% the lower 7 colors would be shown.
The gradient itself needs to be fixed in the 3D coordinate space and can't move
even a little or the effect is destroyed. Also, the gradient color needs to be
identical for all elements or points at the same height within the plot. This
is a common type of 3D plot based on a color contour map.
I think what is needed is either morphable mapping coordinates or a gradient
SXP based on the world coordinate space instead of the object coordinate space.
I've heard some people report a problem with SXPs not being "anchored" to
objects created at render time with AXPs – where the SXP in effect "moved" thru
the object. If this is indeed the case, an animated plot may be able to take
advantage of the "feature"!
JKJ
PS: Hey, I just tried it and it works like a charm! I lofted an object, AXP
SKINned it, and applied a gradient SXP. When KeyFramed, the object scaled
beautifully through the gradient space while the gradient acted as if it was
locked to the world coordinate system. The only problem is the gradient SXP I
used is part of a set of beta IPAS routines that I don't remember ever being
released. Ack! Is there a gradient SXP for sale out there?
>> I did see the message. When I tried this the materials do morph properly
>> (gradually) as you'd expect. However, as the gradient appears, it stretches
>> _with_ the object as it scales. The effect needed for this type of animated
John,
This is not how it worked in my test. My gradient _did not_ stretch. It
revealed more of itself as the graph grew. I'm not at my workstation now
so I'll check it out later at get back to you. Maybe I did something
unconventional… AGAIN… and didn't realize it. <G>
Ralph
Great – I'd like to know how you did it. Always suspected you were a little
unconventional!
>> Always suspected you were a little unconventional!
🙂
I was shooting for a grad that changed color from green to red as it grew
which my test did. HOWEVER, as the grad is revealing itself it is indeed
also stretching at the same time. Although it may be useful in another way,
(and to confirm your suspicion) this technique would NOT work for multiple
states at different levels.
So…
To get the effect EXACTLY as needed, linear, with 50% growth equal to half
the grad map, I would use an animated opacity map. After talking with Bob he
mentioned there may be some 10 different levels using 4 major color groups.
I went into Ani Pro and created 10 different animated cels consisting of
growing white bars. One bar grew from 0 to 100 units, the next to 90 units,
80 units, and so on. Each cel MUST be clipped at the highth of the 100
unit cel. These were saved as 100.cel, 90.cel, etc.
Then in the 3DS I created materials with the grads as texture maps and the
animated cels as opacity maps. Then all the states are created at
the highest level (100% scale) and the opacity map does the scaling. The
object will reveal itself and the grad in a totally linear way.
I believe with a combination of opacity and texture maps the project
would be managable in this way. Heck, if you did enough of these types of
graphs you could have a library of opacity maps at all percentages. With the
list of states, grad color group, and percent growth in front of you it will
go rather quickly… with no keyframming!
What do you think? Maybe a script could be created to handle this, a sort
of Corel Chart for 3DS?
Ralph
>>green to red…
You made me think some more. (Yikes, stop that! <g>) A simple solid color
change may be a good alternative to a gradient for many types of animated
information charts, especially where there are a number of data elements and
the population can be fit into discrete colored bins, such as yellow=60-70%,
orange=70-80%, etc. For plots like Bob's animated US map, this might even be
more effective since it may reduce the visual clutter. (And a LOT easier to
produce!)
>>opacity maps revealing gradient…
I considered animated maps, but one problem I've had whenever I tried opacity
maps that revealed a 3D object is the end of the object doesn't look good
(i.e., doesn't look clean and flat). Except from a side view, it just looks
like a slightly fuzzy end of an open tube. The fuzziness decreased with
increasing map resolution, but the object always looked hollow. Am I doing
something wrong? In the case of revealing a long tubular object I once
resorted to creating a solid plug animated to match the end – a bit of a pain
in the neck! In the case of Bob's scaling states, do you know of a good way to
show the flat surface of each state that changes color to match the top of a
gradient revealed by an an opacity map? A separate, flat, state object
animated (translated) for each state?
I thought about creating a animated gradient to be applied as a texture map and
sync'd with the scaling, but that would be a REAL chore with 50 of these things
going at once!
Unfortuately, none of this helps the generic case of coloring an arbitrary
animated object (such as a mathematical surface or a terrain) with a gradient
or other map that remains fixed to the world coordinate system. A special
problem is where parts (local peaks) of the same object scale at different
rates. The need for variations of this kind of plot come up all the time. I
had one plot of the light intensity from a dual-concentric fiber optic where I
wanted to show how the light output changed over time. This was sort of a two
color (green-red) gradient where the peak of the plot changed to red as it
rose. This worked OK with morphing, but the plot was pretty simple.
I'll try to run down the status of the beta gradient SXP since it works very
well with an AXP'd object (that is, until the powers fix the AXP mapping
coordinate "feature"!) So far, however, I think the grid projected from a
spotlight may be one of the least undesirable methods. <g>
Didn't someone recently write a procedural colorer with TSE or IPAS? Is anyone
up to writing a (data-driven?!) procedural colorizer that will produce fixed,
user-specified blended AND discrete gradients and does not rely on object
mapping coordinates?
JKJ
PS: thanks for all your input on this subject, Ralph. I always thought of you
as a creative, artistic genius, on a plain far above this low-life
science/engineering stuff. <G>
>> increasing map resolution, but the object always looked hollow. Am I doing
>> something wrong?
Nature of the beast with Op Maps… I was thinking of minimizing the
hollowness with a level or lower camera angle and maybe 2 sided and a bit of
self illum. You could always raise the camera angle back up after they
scaled (for effect of course<g>), with a non-moving solid plug cap. Wouldn't
be much fun animating the plug to sinc with the graphs scale and color.
>> …this low-life science/engineering stuff. <G>
Nah… science/engineering stuff seems a logical candidate for
explanation thru 3D, and I could think of a few cool things I'd like to do.
My background is on the mechanical side …HVAC Chillers-Boilers-Building
Automation.
Thanks… I've enjoyed our brainstorming… I just love it when the Neurons
fire like that <BG>
Ralph
One thing that might also work is to use a projector light (with your gradiant)
and exclude all other objects. As the object scales, it will catch more of the
projected image.
Dave
>>projector light…
Yes! That was actually the technique I recommended to Bob Weil when he asked
for ideas. I had used that on a similar problem once. It sounds like there
may be some other ways that might work too.
As 3DS is used more and more for scientific work, I'd vote for some basic
graphing and plotting capablities built in. Many of the inexpensive plotting
packages will produce beautiful 3D surface plots, contour plots, volume plots,
etc, but they don't give you much control. The power of 3DS combined with some
plotting function would be fantastic!
JKJ
>>I'd vote for some basic graphing and plotting capablities built in.
Then GlennM could do some mondo-cool IK-ed pie chart characters! <G>
Dave
I've never seen ANYTHING that Mr Glenn did that wasn't amazing!
John –
Thanks for the additional input – I had the same dilemma you speak of – where
the map stretches, rather than having the object scale THRU the texture. In
lieu of your beta ipas, maybe Ralph has some additional experience that would
help.
Ralph! Back at your workstation yet? 🙂
Bob
>> I've tried edge mapping the states as a unit – the only way I can get it do
>> change color is to return to the Editor and reapply the mapping coordinates
>> once I have scaled the states. While this works for a single frame at any
Bob,
Why don't you create a copy of the individual states. The first copy would
have a green material and be small representing the state in the lower end
of your scale. The other copy of states would have the graduated green red
map material (planer mapped to the side) and be larger to represent the
states in their scaled up position.
In the KeyFramer hide the larger states and do an object morph with 'morph
materials' on between the original and the larger copy. This will
accomplish both the scaling of your states and the change in color in one
step!
Ralph
PS. Good to see you at the 3D Art forum!
Ralph –
Good idea! My next step was to try morph materials – but I didn't think of the
angle of having the first material simply be green – this simplifies matters. I
could have several morph destinations for each of the major gradient color
groups – blue, yellow, orange and red.
Thanks for the reply!
It was great meeting you at the Forum. Hope we'll get to work together soon.
Bob
>> Good idea! My next step was to try morph materials – but I didn't think of the
>> angle of having the first material simply be green – this simplifies matters.
>> Thanks for the reply!
Glad I could be of help, Bob.
Good Luck,
Ralph