Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Not getting model output from a textured surface...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121589] Not getting model output from a textured surface...
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Wed, 21 Sep 2011 05:33:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Try the Mossy Bunny: ( I used the Mathematica vertex data example
against my texture... so far all the models exports have failed)

Clear[x1, y1, z1, g1, g, ga, gb, t, p, d, a, surface]

(*creating the data array*)

g = ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"];
Length[g]
d = 0.001;
a[0] = {d, d, d};
a[1] = {d, -d, -d};
a[2] = {-d, d, -d};
a[3] = {-d, -d, d};

(*adding polygon data to the array*)

g1 = Table[
   Polygon[Table[g[[n]] + a[Mod[i + n, 4]], {i, 0, 4}]], {n, 1,
    Length[g]}];
ga = Graphics3D[{Green, EdgeForm[], g1}, Boxed -> False]
(* jazzed up Mathematica texture example with fur*)
gb = ListSurfacePlot3D[g, MaxPlotPoints -> 50, Boxed -> False,
  Lighting -> "Neutral", MaxPlotPoints -> 50, Mesh -> None,
  PlotStyle -> {Specularity[White, 20],
    Texture[ExampleData[{"ColorTexture", "CatFur"}]]},
  TextureCoordinateFunction -> (Normalize[{#1, #2, #3}] &),
  Axes -> False]
gw = Show[{ga, gb}, PlotRange -> All]

Export["mossybunny.3ds", gw]
Export["mossybunny.obj", gw]
Export["mossybunny.stl", gw]

These exports are the trouble!
I shipped this to a friend with Mathematica version 8 and he got the
same
error messages for the 3ds and the obj /mtl
which are the two that carry color information out.
The stl appears to export.




  • Prev by Date: Calculus and InterpolatingFunction
  • Next by Date: Getting list of cities of Puerto Rico using Wolfram Alpha
  • Previous by thread: Re: Calculus and InterpolatingFunction
  • Next by thread: Getting list of cities of Puerto Rico using Wolfram Alpha