Jump to content
Hash, Inc. - Animation:Master

Rendering a spline as a line


Kombowz

Recommended Posts

Hi everyone,

 

I was wondering if it was possible to render a spline as a line.

The image below is where I would like AM to draw the line, but I'm not sure if I can get it to:

post-13046-1304516815_thumb.jpg

 

Can I get AM to draw a line on a spline?

 

Thanx everyone.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Hi everyone,

 

I was wondering if it was possible to render a spline as a line.

The image below is where I would like AM to draw the line, but I'm not sure if I can get it to:

want_line.jpg

 

Can I get AM to draw a line on a spline?

 

Thanx everyone.

 

Hi Kombowz,

 

1.) Make a group only containing the Splines you want to render that way.

2.) Set "Render as linie" in the Properties for it.

 

See you

*Fuchur*

Link to comment
Share on other sites

  • Admin

As you already have a good grasp of Alpha Channels and transparency I'd like to encourage you to investigate Patch Images as a means of rendering your splines. While the setup takes a little time once it's in place you've gained consider flexibility over and above the standard 'Render As Lines' factory setting. It is important to remember that A:M allows us to create our own feature sets.

 

Render As Lines is good if you need a quick fix but it has limits. The major ones being:

- We cannot control the line width

- We cannot layer the effect

- As we increase the thickness of the line it rises above the surface of the mesh

- We don't always get a smooth line

etc.

 

So how to deal with these limitations?

My suggestion: Patch Images

Benefits:

- User controlled line width

- Layered Lines and Effects

- Variable Thickness and Displacement (above and below the surface of the mesh)

- Variable Lines and Brush Effects

- Animated Lines

etc. etc. etc.

 

Note: There are drawbacks to using this solution of course but it offers considerable flexibility.

For instance, when baking materials or decals into a single image (for decaling) I don't think Patch Images are baked.

Another is that while you can create all of these patch image lines in A:M you'll likely want/need an external image editor, if for no other reason that for cropping your images. Yet another is that you'll have to consider the results on topologies such as 5 point patches (when using patch images avoid these areas).

 

Here is an example where Thom is demonstrating the basic difference between standard Render As Lines (default line) and Patch Image Based Spline Rendering (with a stitched line). The detailed view shows how this line is altered on the fly to increase stitches. It also shows how the Render As Lines effect rises above the surface in an uncontrollable way as well as some unintended artifacting of that line (on the right). Not shown but also note: By adding a displacement layer to our Patch Based Lines we are able to control that displacement over the length of the spline.

 

Bottom Line: We can similuate the look of a standard Render As Lines operation in A:M with Patch Images but not vice versa.

PatchImageBasedLineRendering.png

Detail.png

Link to comment
Share on other sites

  • Admin

 

In the realm of innovation there is very little documentation.

Thankfully there are some map makers who have delineated the path and paved a way for us to get to our desired destination.

John Lemke for instance, demonstrated how to cover splines with patch images so audiences can see through Thom as if he were made of grid squares.

 

The easiest way to test almost every feature is to start with a few grid squares. So let's start there?

Note: For those that want to just skip past all this text and get right into exploration you don't have to use a grid (that is simply the best way to remove excess variables). You can just grab a section of any model, Right Click, Add Image and experiment instead.

 

Create a New Model

- Create a line

- Extrude it into a renderable square

- Extrude it once more for the sake of this exploration

You should now have a two patch rectangle from the front perpespective

 

- Select the top and color that Groups Surface Color black (it may help to name it something useful as well)

- Select the bottom and color that Groups Surface Color white (You could name this group "make me invisible later")

- Zoom in close enough that all of the rectangle will be rendered and render this image out as "UseForMyPatchImage.tga"

 

Create a New Model or use the Model you already have ( I recommend creating a new model so you can modify this patch image later)

- Extrude a line so that it makes a four patch grid

- Select all of the model and Right Click

- Select Add Image

- Select the just rendered file "UseForMyPatchImage.tga from the list (or if it isn't available browse to its location on the harddrive and select it

Note that when rendering your grid all four patches will be covered by the Patch Image

 

Troubleshooting

- If you are lucky one of these Patch images will be aligned incorrectly

(Every error is a learning opportunity and for the uninitiated this will help in understanding how patch images orient in 3D space)

- Even if they are aligned properly you can select one or more of the patches, Right Click and select Rotate Image.

- The image will reorient in one of four ways

Note: In some cases you may want to flip the Normal for a Patch. You can find that near to the place you selected the command to Rotate the Image

 

Now go back to your Patch Image Model and make the second (white) Group invisible by turning up its transparency setting to 100%

- Move the middle (horizontal) spline upward until it is a small sliver at the top of the rectangle

- Render the patch image out again with the Alpha Channel setting set to on. (This will ensure the bottom half of the rectangle is transparent in the TGA's Alpha Channel and will allow surfaces below this image on the model to show through)

 

Observe the effect on the model when the image is refreshed.

Note: Some computers/graphics cards have a hard time refreshing updated images. You can usually get the most persistent image to update in the PWS by Right Clicking the Image container and selecting 'Clear Cache'. If that doesn't work, delete the old/unwanted image, reimport and then select the image again under the desired Group's settings.

 

It is in the Named Group you are setting up that you want to familiarize yourself with the available settings.

In your Model under the Group you added the image to, Right Click on the Image container and select Add Image again.

You've just added another layer to the patch where the first image was applied.

This new patch image can be rotated and adjusted independently.

For instance, you might select one out of a series of frames from a sequence or later you might want to animate it.

You can adjust the repetitions of the image horizontally or vertically

Perhaps most importantly the type can be set to drive the image's Color, Displacement, Transparency, Ambiance, Reflectivity etc. etc. etc.

In this way detail can be added layer by layer by layer.

 

To achieve a variable thickness to your line you'll want to maintain the model that you used to create your Patch Image Line with. Consider creating a more complex grid that will allow you to deform the shape of the line. Make it thicker, thinner, wavy, ornate. The project and your imagination will dictate.

 

I know a video would be a lot easier to follow but that'll have to wait for now.

One of the best ways to get at an answer is to ask questions so ask away, especially where my directions aren't clear.

 

Now, if anyone knows a good way to unwrap/bake Patch Images onto a decal... I'm all ears.

(Ideally, the resulting decal should be a human readable image (not the type generally created when baking materials into images)

IMO we lose the real power in patch images after such a conversion.

The most straightforward way may be to reverse the process of flattening a model for decaling in an Action?

 

 

 

 

 

-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...