PDA

View Full Version : Text extrusion on SPHERE


Rick Flowers
05-19-2006, 08:09 PM
I saw this post here...
ANY pointers would be super ..

http://www.3dbuzz.com/vbforum/showpost.php?p=1015788&postcount=3



http://www.3dbuzz.com/vbforum/attachment.php?attachmentid=46811
I can do that with polygons, but I am having some severe trouble trying to do a similar effect on a sphere!

I've been trying different techniques for days... from displacement (huge failure) to booleans.. and I can't seem to get an evgraved text on a sphere without blowing it.

Attached is what I managed to do with nurbs. but it sucks

Ribcage
05-20-2006, 12:08 AM
yes spheres can be difficult, but if your using nurbs then there is a simple enough solution,

just create a vector of the text in illustrator or something, import them as curves and project onto the shpere,

from there you can loft the surface or extrude something along the curve or use bevel plus (if you can get the dam thing working)

Rick Flowers
05-20-2006, 03:05 AM
Thanks for the reply.

I did just that in the example above. (that ugly shape)

Problem is, the tesselation makes it look like crap. I can't get the shape to look right. Can you?
I mean... say I project, trim, bevel, use another sphere to cut/boolean the backside(cap)... I did all that.. but there's tesselation issues. I can't get it to look perfect. There's little gaps and slots like in the shot above.
I need to know how to do it with polygons.

Any pointers?

rasamaya
05-21-2006, 05:50 AM
Try displacement map

Emil3d
05-21-2006, 06:29 AM
Model the text on a flat plane and then deform it to make a sphere. For example if you create a plane 10 x 10 facing z (rotated along X 90 from default position), apply 2 bend deformers – one rotated Y 90 and the other Y and Z 90, then type 1.573 for the Curvature in both, you will have a half sphere. The number may not be exact - I just got it by interactively dragging the slider in the channel box, until the plane became a half sphere. I’m not that good with math but if you are, you might be able to calculate it precisely.

EDIT: In order to deform a plane into a sphere with 2 bend deformers, before applying them you have to change the default settings in the bend options to “Before” for the Deformation Order in the Advanced tab of the options.


Although you will have no problem making any planer shape into a sphere, you need to model with a topology that can survive the intended deformation. If you just create a text with Booleans on a plane with whatever topology comes from the intersection, it may look great but if you deform it you will get severe shading and shape alteration that most likely will not be what you expect.


The easiest way is to use a displacement map, it gives decent results and if you can afford the longer rendering times you may get away with just that. I don’t know what kind of quality you are looking for but I made the sample bellow rendered with a Mental ray displacement at one of its highest quality. I made the texture in Photoshop, slightly blurred the edges and saved it as 512 x 512 tiff file. Of course the result is not perfectly crisp or sharp like a real geometry. It also takes longer to render and may not be suitable for animation if it is a hero object – om my slow system it took more than 6 -8 minutes with just the sphere and 2 lights with low quality raytraced shadows, but it might be just what someone may want.

http://f5.putfile.com/5/1400007459.jpg




And this is a zoom in the letter a. The grain is from the poor raytraced shadows


http://f5.putfile.com/5/14000085148.jpg




I also tried to make a sample with real geometry and a suitable topology that can survive deformations but it took so long to model that I ran out of patience after modeling just one letter for about 30 minutes. As I mention initially I modeled it on a flat plane starting with simplified Bevel Plus text and using a lot of the Split Edge Ring tool and Merge vertex. The topology is far form perfect but you can get the idea. If you decide to go with modeling, and in general for deformable objects - keep the geometry that defines the shape all quads and keep all poles and ngons on the flat areas away from the edges that form sudden changes of the shape. The result is definitely better than a texture displacement, renders in seconds, even as subdivisions and can also be deformed in any way.


http://f5.putfile.com/5/14000102487.jpg


And this is the wireframe, still not perfect but gives very good results


http://f5.putfile.com/5/14000111496.jpg





Hope this helps

Rick Flowers
05-21-2006, 02:56 PM
Thanks Emil3d for the very helpful and one of the most beautiful posts i've seen in a long time. My faith in displacements is renewed. I just need to figure out how you got such a quality displacement... considering I could not. Maybe I just need to tweak the settings further. (What settings, I'm sure I can figure out)

I would love to model it, but there are problems:
-I cannot simply deform a plane into a sphere or half sphere, because the actual model I intend to use this "embedded text effect" on is a ring. (like the outside of a torus) And at that, a ring with a dialectric shader. (Like a glass ring)
Not that the shader matters as much as the geometry....
But the geometry could get very complicated and innaccurate if I try to "merge" a half sphere/whatever with my ring shape.

I think it's funny how difficult such a simple task really is. I mean, it seems like we see this kind of thing in every movie, commercial, product design, etc... yet it's like a pain in the ass to model a quality font into a geometry that isn't a plain flat, well, plane.

I will give displacement another shot and post back what happens. In the meantime, if you have any pointers regarding getting quality displacement with mental ray like you did, it would be super.

grimmud
05-21-2006, 03:01 PM
my god Emiil3d, that is an excellent post, almost a tutorial in itself, i know i have learned alot from it vbmenu_register("postmenu_3564413", true);

Emil3d
05-21-2006, 11:40 PM
Thanks for the appreciation guys, I’m glad I was helpful....I cannot simply deform a plane into a sphere or half sphere, because the actual model I intend to use this "embedded text effect" on is a ring. (like the outside of a torus) ...Rick, actually I missed something important from my initial instructions and I edited my previous message to include it. In order to deform a plane into a sphere with the bend deformers, you have to change the default settings in the bend options to “Before” for the Deformation Order in the Advanced tab of the options. Otherwise if you had tried my suggestions with the “Default” deformation order you would had created something like a torus ring, which is actually what you want. The default deformation order applies the deformers one after another in order of creation so that the plane will first become a cylinder and then bend to become a ring, while with the Before option it will compound the total effect of the 2 deformers at the same time making the plane into a sphere. The following screen shots illustrate that difference between the same deformers when applied with different order options. RING:
Default option – apply 2 bend deformers. In this orientation, the first deformer is rotated Y 90 and the second Y and Z 90.


http://f5.putfile.com/5/14018555931.jpg



Drag the middle manipulator of the first deformer until the top and bottom ends meet.


http://f5.putfile.com/5/14018580911.jpg



Drag the middle manipulator of the second deformer until the sides meet to get a complete ring.


http://f5.putfile.com/5/14019040070.jpg



HALF SPHERE
Apply 2 bend deformers the same way as the previous example but this time with the “Before” option. Drag the middle manipulator of one of the deformers until it makes half a cylinder. Enter the same value for the Curvature in the other deformer.


http://f5.putfile.com/5/14019200145.jpg



I recommend when it comes to objects like this, and in general with objects like industrial design that are uniformly shaped, that you always first model any complexity of the surface on a flat plane and then deform the plane to conform to the desired shape. Maya has plenty of deformers including the lattice and the Wrap which not only give high degree of control but also make applying the deformation feels more like regular modeling. It will become very difficult and time consuming if you try to model details like letters positioned in all orientations of the 3D space.

Whether to use real geometry or displacement will depend on the storyboard of your animation. If this is a main hero object that will be in view all the time and especially if it is going to deform you would most likely take the time and build it with real geometry. For props or something still at certain distance, displacement map should suffice.

You should be able to achieve the same displacement as my samples easily if you use the Mental Ray Approximation Editor to override Maya’s settings. Just select the surface and click the Create button then simply edit the node and try the High quality presets. I think I rendered the samples with the Angle Feature High Quality preset, but the Fine View High Quality preset is considered as one of the best. It is much easier to create a proper displacement with Mental Ray because it has presets, while Maya’s native displacement always requires a lot of tweaking from several different places. Also as far as I know the MR quality and memory management of the displacement is superior.

Also have in mind that the lighting of you scene and the material attributes may greatly alter your displacement appearance. Start testing it first with simpler settings and things like reflectivity turned off and then make test renders by changing one thing at a time to keep track how each parameter contributes to the appearance.



Take care.

Rick Flowers
05-22-2006, 05:07 AM
Wow, this is amazing. You're helpfulness is beyond belief. I would pay for such advice at times!

I have resorted to displacement for the time being, simply because the shape is too funky for me to deform with my newly aquired deformation skills. (thank you again) Though a ring is like a torus, it isn't exactly. (in fact I recently just rebuilt it with a new rotated curve, and I'm going to try and displace with NURBS)

So... I'm having difficulty making a quality displacement as you have. (Very well in fact)
I see you have "Maya" wrapped around a polygonal sphere, and I'm sure it's highly tesselated...
I have tied both Angle Feature High Quality and Fine View High Quality in the Approx Editor... (Fine is better, but it's sloooower, so I'll save that for production renders) and I still render some pretty poor jagged areas around the corners and curves. I attached an example.

So I guess I need some advice regarding this. Is it my geometry? Not enough spans? Needs more tesselation? Is there some global setting I need to tweak?
Messing with the presets on the AE didn't do much good.
If you're busy and want to send me just the .mb sometime in the future I can probably find what is different. =/

Thanks again so much

Emil3d
05-22-2006, 04:48 PM
You will get rid of the artifact if you increase the max subdivisions. However for Fine View it will be overkill and render forever if you keep the Length at the low of 0.25. So try Max Subdivision at 8 and Length at 0.5 this will most likely fix it. But first try if you can get away with Angle feature– it should render faster. Start from Angle Feature High Quality and increase the Max subdivisions until the artifact disappears, just render the small region with it to fine tune it faster.

Rick Flowers
05-22-2006, 10:26 PM
I originally thought that, and have gone through another hour or two of tweaking.. and still nothing decent.

I can pump the Max Subdivisions all the way to 8 or 9, and no deal. Fine View, or not.

Questions:

1. Do I have to map the displacement with a perfect ratio to the geometry? Or can I planar/spherical map (polys) and/or interactively place it? (nurbs)

2. Do I use the "custom shaders" mental ray Displacement shader on the Shading Group node? or the regular Displacement Mat. field. =/


Trying to rule out something I may be doing totally wrong.

Also, it may be too much to ask, but since I've been striving to get such a quality displacement as you have with no luck, could you email me your "Maya" test .mb to rick at 1crash.com? Maybe I can just study your settings.

Thanks again emil3d!

cgtriguy
05-23-2006, 01:14 AM
Rick - It may be that your UV's are not laid out well. Be sure they are uniformly spaced using a checker texture in the color channel then try again. I just did a quick test with a sphere with spherical mapping and got pretty good results.

Rick Flowers
05-23-2006, 01:19 AM
I guess I'll try polygons again then. ^_^
(Trying with NURBS above)


I'll keep at it.

Note: This should be a really cool effect with the l_glass shader ;)

Emil3d
05-23-2006, 01:42 AM
Rick, here is the file. You can turn off the raytraced shadows of the lights to get slightly faster rendering. I'll follow up and write another message trying to answer you questions and give you some additional guidelines about textures.

EDIt: In the Color Balance section of the texture node, reduce the Alpha Gain to 0.1 to make the depth of the displacement the same as on the screenshot, otherwise it will simply render very deep (if that matters at all). This setting got lost because I copied and relinked the texture before uploading the file.

Emil3d
05-23-2006, 02:21 AM
Rick if you still have artifacts beyond the settings that you tried this means that the problem is coming from your texture. In addition to what Gregory suggested the texture should be always blurred to the point and created with a resolution that doesn’t produce jaggies.

Try the following to optimize the texture for your object. First in the approximation node, lower the quality so that it renders reasonably faster on a small render region for testing. Don’t worry if it has jaggies, you will create and test different version of the texture and whichever is the best will also render best at the higher settings. Then start with 512x512 textures and try different degrees of blurring until you get the best possible result. Then render at higher quality and if still not fully satisfied, increase the texture resolution to 1024x1024. Have in mind that beyond a certain point more blurring or resolution will not do any good but only increase the rendering time, so its well worth to take the time for optimizing your texture... 1. Do I have to map the displacement with a perfect ratio to the geometry? Or can I planar/spherical map (polys) and/or interactively place it? (nurbs),,,I recommend to always create your textures as perfect squares with the binary multiples like 256x256 512x512 1024x1024. This optimizes the quality of the filters and the performance. When you create your textures you can start with a size that is proportional to the size of your object with the longer side equal to let’s say 1024 pixels, but before you save it, add canvas space as strips to the shorter sides to make it a square. In Maya when you apply the texture to a object with non square surface coverage it will appear squashed on it with the added strips as redundant but you will use them as guides when you use the placement nodes for NURBS and in addition to that UVs for polys to adjust the coverage so that the added strips stay outside of texture coverage on the object and then your texture will appear as intended.…2. Do I use the "custom shaders" mental ray Displacement shader on the Shading Group node? or the regular Displacement Mat. field… I use the displacement shader that gets created by default when I drop the texture in the Displacement Material attribute of the Shading group... I see you have "Maya" wrapped around a polygonal sphere, and I'm sure it's highly tessellated… For the screen shots illustrating the deformers, I used a poly plane with the text imbedded by booleans to only demonstrate how the deformers work. You should disregard the topology from those screen shots since the tessellation was needed for a proper boolean operation and was an old file that was not intended for displacement or even deformation I just used it to demonstrate how things deform.… Is it my geometry? Not enough spans? Needs more tesselation? ..You have to use tessellation that gives you good result regardless with or without displacement.

Regarding displacement the tessellation should be the last thing you need to tweak (in my practice I have never changed tessellation) and is less relevant to Mental Ray since it uses it own adaptive tessellation for the displacement.


Let us know what happends next

Rick Flowers
05-23-2006, 03:26 PM
Very helpful. I cannot even begin to describe what all I've learned through this. =)

Getting rid of the artifacts in your file was very enlightening..(Once I zoomed in to a letter) Turns out I learned that Angle Feature is much better than Fine View, I think. (see thumbs)...
Edit: (#1, Angle Feature High, #2, Fine View High, #3 is Angle Feature, Min: 3, Max: 9, Length, .5)

Thanks again and I will definitely be showing my final project render here and giving you credits =)

I hope this helps people out, this thread for example, I would have killed for a week ago. I had to postpone this model because I couldn't get it done right. +_+

Rick Flowers
05-23-2006, 09:50 PM
I think I have reached a new level with experimenting with this new found series of tools.
In the Approx Editor, I have been messing around between the Fine presets, and the Angle Feature... wow.. I have a lot to say and it's probably best if one reads the maya documentation on those inputs and experiment for themselves.. because what you want really depends on how close the camera is to the surface.

Here is a pretty cool one I just rendered in 10 minutes... Added some color too.

Why model what you can texture? ;)

Thanks again Emil3d!

Emil3d
05-24-2006, 01:21 AM
You are welcome Rick, your text looks great. I’m really happy you got the displacement under control.

All the best.

rasamaya
05-25-2006, 05:09 AM
Hey guys, lots to read so I didnt read it all. I have a poly sphere-20x20polys. I deleted history, and placed a 2048x2048.map of the word testing for a displ. I then repeated the UV to have a total of 16 'testing's all over my sphere. Render time = 9 sec on my laptop. Thats with ambient occlusion. I think your displacement settings are wakky. But like I said I didnt read your whole post. I can post my set-up if your interested.

Rick Flowers
05-25-2006, 05:13 AM
please do. I'm definitely interesting if it helps render times. Maybe a higher rez source image helps?

I'm curious if it looks good?

Rick Flowers
05-26-2006, 05:14 AM
Followup: how did you get the .map of the file? I used that .bat file that I heard works well, but when I mapped it, it didn't work.. it was just some blurry rectangle nothing like the text. I had to use a .tif still.

Did you really use a .map for the displacement? And if so, how did you make it. I would be very interested if it speeds the render or quality.

Emil3d
05-26-2006, 07:16 AM
For displacement, I haven’t used any other file formats other than tiff and tga so I can’t say how this may affect the displacement, but other than that usually with images of DEM terrains the displacement renders very quickly with much lower settings and with very good quality and there are couple of reasons for this. First those images are not uniformly shaded and don’t have sharp tonal changes they are all very gradual and subtle gradations which is basically equivalent of a heavily blurried edges, the other reason is that the usual terrain view is from a long distance relative to the elevation which always look perfect looking from like an aerial point of view, however in cases when I try a close up zoom in a particular rock or sharp indentation of the terrain things don’t look as pretty and requires increasing the settings and thus the rendering time in order to get a reasonable quality of the detail.

Let’s hope thought that David has some tricks under his sleeves that can really speed up high quality displacements.

CGTalk Moderation
05-26-2006, 07:16 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.