Jump to content
AutoDesSys Forums
Pobo

[Q] UV coordinates in FormZ, how does it work?

Recommended Posts

Hi,

 

I need to export some models from FormZ to Unity3D with control over how the UV coordinates end up, with an eye to dynamic texturing in Unity.

 

Now I'm a rather clueless of how UV coordinates work in FormZ. Can I make them visible in the FormZ UI? Are there preferred modelling tools if I want control over UV-coordinates? Anything to avoid?

 

Any help greatly appreciated,

 

 

Tom

Share this post


Link to post
Share on other sites

Hi Tom,

 

You can convert any coordinate type to UV coordinates (and that will happen automatically with some export options), but formZ does not have a specific UV editor.  Just use the other mapping types to get what you want, and then you can convert it using the Edit Texture tool, or via the Export dialog.

 

When exporting to Unity, use the All Facetted options, and Triangulate All Faces for best results.

 

Also, there is a new "beta" FBX Translator that you can try as well as the current OBJ if you like:

 

http://forums.formz.com/index.php?/topic/3058-fbx-beta-import-export-translator-now-available/

 

Please let us know if you have any further questions, we would be glad to help!  ;)

Share this post


Link to post
Share on other sites

Hi Tom,

 

There are plenty of low cost options for creating proper UV maps that work well both in FormZ and Unity (whilst FormZ doesn't currently have a UV editor it will read UV's correctly from imported geometry).

 

Your options are:

 

Modo Indie - http://store.steampowered.com/app/401090

 

Maya LT - http://www.autodesk.co.uk/products/maya-lt/overview

 

3d Coat - http://3dcoat.com/home/

 

Both Modo Indie and Maya LT are available as low cost monthly subscriptions ($10-25%). 3d Coat is more expensive but less technical in use (very similar workflow to FormZ).

 

Share this post


Link to post
Share on other sites

ZWeb, Jon,

 

Many thanks for the pointers, very useful!

 

Actually my problem is not that complex: I'm trying to make UV coordinates run with a curved object. I have a dim recollection that I should draw the curve (in my case a straight line + arc), then reconstruct with the Nurbs C-recon tool and then sweep a source shape along the path.

 

I can also recall that there was a trick to evenly distribute the points along the re-hammered curve to get a nice, evenly spaced UV-map but can't possibly remember it anymore.

 

Can you help?

 

// Tom

 

 

post-9347-0-79576300-1454515371_thumb.png

Share this post


Link to post
Share on other sites

Oh dear, I'm still lost :-(

 

My source shape is a square with one rounded end. My path starts off as a composite curve consisting of a straight line and an arc. Of course I can sweep the source along the path with the axial sweep tool but when I then try to use the N-Convert tool on the sweep object I get a warning "this object cannot be converted to NURBS representation".

 

I think in the past I re-hammered the curve first, to then sweep the source along the NURBS path. There was a step where all the points on the composite curve got magically, evenly re-distributed. Does the the composite curve need to be converted to a spline first? Can't remember...

 

In the end I want a solid with nicely evenly spaced texture map. Just like the film strip but then a solid. Is that possible?

 

post-9347-0-96477900-1454539152_thumb.png

post-9347-0-30738100-1454539192_thumb.png

Edited by Pobo

Share this post


Link to post
Share on other sites

OK, I sorted it out partly. I've got the parametric texture working on the double curved surface. But how I fix it for the top 'flowing river-like' surface? So that the textures nicely align?

 

Thank you for your continued support.

 

 

post-9347-0-69803400-1454569060_thumb.png

post-9347-0-12007500-1454569066_thumb.png

Share this post


Link to post
Share on other sites

Hi Tom,

 

If you derive the two edges that define the top face, NURBS Loft, Reconstruct, and Parametric Map that face, does that do what you want? 

Share this post


Link to post
Share on other sites

Zweb,

 

Many thanks, I managed to get round it by  converting the source shape to a NURBS before sweeping.

 

I'm still stuck with two problems:

  1. there seems to be a difference between re-hammering a surface based on a 'born-as-spline' spline and re-hammering a surface based on a NURBS curve born as a composite curve (straight line + arc). When I re-hammer the latter it does not seem to be equidistant (see attachment): the orange lines are closer together in the part that used to be the arc then in the part that used to be the straight line. Is there anything I can do about this? What is the proper toolset and order to go from a composite curve to something that will keep the equidistance?
  2. I can't get the parametric texture mapping to export to Unity3D. I've tried various export settings and OBJ, DAE and FBX but none seem to do the trick.

 

Any thoughts much appreciated.

 

 

Tom

post-9347-0-35054900-1454601110_thumb.png

post-9347-0-01235200-1454601111_thumb.png

post-9347-0-87229800-1454601112_thumb.png

Share this post


Link to post
Share on other sites

Hi Tom,

 

If the Reconstruct is not giving an even distribution of control points on your surface, please copy that object into a new project, save it and send it to support@formz.com so we can take a look.

 

Regarding Exporting to Unity, are you getting all the geometry properly?  (Typically you want to choose All Facetted -- and Triangulate All Faces for that.)  And just Exporting with Textures should give the mapping.  If the mapping is not working for you, if you Import the file back into formZ, do you get the mapping there?

Share this post


Link to post
Share on other sites

Hi Zweb,

 

I've sent the file - including the exported OBJ - to support@formz.com.

 

I can't recreate the mapping on importing the OBJ back into FormZ.

 

Thank you for your help.

 

I also attach the file here.

Edited by Pobo

Share this post


Link to post
Share on other sites
Hi Tom, 

 

Thanks for sending your file. Using the file you sent, follow the steps provided to have your texture mapped parametrically:

1. Derive Segments on the Source object (“D” shape), unghost the original object, and then Derive Segment on the long J-Shape path. We also added a plain white material just to remove the striped texture map (see attached).

 

post-5-0-80160700-1454707220_thumb.jpg

 

2. Use the Polyganize tool on the long J-shaped path. In the Tool Options, make sure “Equal Length Segments” is selected.

3. Use the C-Create tool on the long J-shaped path. In the Tool Options, make sure NURBS Curve is selected and set the Max Degree to 2.

4. Axial Sweep the source (“D” shape) along the path. In the Tool Options, set the Model Type to Smooth, and the Alignment As Positioned. Also, uncheck “Caps” (see attached image).

 

post-5-0-16699400-1454707215_thumb.jpg

 

5. Select the NURBS Convert tool in the N-Surfaces palette and click on the swept object.

6. Apply your striped texture. 

7. Note, the texture is rotated so select eh Edit Texture Map tool and click on the object. In the Tool Options, click Flip.

 

Does that help?

Share this post


Link to post
Share on other sites

Hi Zweb,

 

Many thanks once again. I got it working. Two more questions:

 

  1. I don't quite the purpose of step 1. Why can't I start straight away with step 2 (polygonizing the path)? Why do I need to do a Derive Segments on both source shape and path? I drew both source and path from scratch as 2D composite curves so I would think there would be no need to derive segments out of the 3D model.
  2. Can I preserve this texture mapping on export to OBJ for Unity? If I try to re-import into FormZ the parametric mapping is broken? Does this have to do with the parametric vs. triangulation setting?

 

By the way, there seems to be a small distortion in the texture map towards the end of the J-shape in Shaded Work / Shaded Full which is not there in Renderzone (see picture).

 

Regards,

 

 

Tom

 

 

post-9347-0-21995400-1454718543_thumb.png

ParametricStriping.zip

Share this post


Link to post
Share on other sites
Hi Tom,

 

1.  If the paths are part of another object, then you need to derive them so you can Polygonize them.  If they are already separate objects, you can skip this step.

 

2.  If you use the Convert tool to convert this to Facetted first -- and then Export to OBJ, does that do what you want?

 

Not sure what is causing the slight distortion at the end, we will look into that...

Share this post


Link to post
Share on other sites

Zweb,

 

Thank you again! This is again a step towards my goal. Using the Convert tool first helps to preserve the parametric texture mapping (or the illusion thereof, since the model is now facetted). It would of course be very nice if this would work with the triangulation setting on export without having to convert every model to facetted first, since I have to go through numerous iterative design loops between FormZ and Unity.

 

However, it now becomes apparent that the distortion in the texture mapping in Shaded mode is not a rendering hick-up but something structural in the UV coordinates because it is also visible when I import the model in Unity (see screenshot).

 

Using Cheetah3D  I get a completely clean model in Unity (see screenshot).

 

With FormZ I use OBJ, the new FBX export looks very messy in Unity, at least with this particular model.

 

// Tom

post-9347-0-06867100-1455023646_thumb.png

post-9347-0-80985800-1455023649_thumb.png

Share this post


Link to post
Share on other sites

It may look mild to you, Neurascenic, but if you make a living out of designing striped candy canes then it's a real show stopper :D

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×