thanks Fabrice that makes sense now Steve
On Aug 7, 9:57 pm, Fabrice3D <[email protected]> wrote: > see it a sort of a mask, a triangle one. > if 2 points of the triangle share the same coordinates, the triangle > is no long valid > it becomes a line with no thickness. > > Fabrice > > On Aug 7, 2009, at 6:51 PM, steanson wrote: > > > > > I was assuming it would use 0,0 as a starting point and map across the > > face, pixel by pixel, and that the value of 0,0 just determines that > > start point into the texture. > > > thanks Steve > > > On Aug 7, 1:33 pm, richardolsson <[email protected]> wrote: > >> The UV coordinates are a way to map coordinates on a texture/material > >> bitmap, to vertices in the model. If all vertices have UV = (0,0) > >> that > >> means that no pixels from the texture will be used (they are all in > >> the bottom left corner of the bitmap, so they does not include any > >> pixels at all.) > > >> I suggest you have a look at the regular primitive classes that are > >> in > >> the away3d.primitives package. Have a look at Cube, Plane, Sphere et > >> c. They all extend AbstractPrimitive, which has some methods in the > >> arcane namespace that you can use if you want to create your own > >> custom primitive. > > >> I have been planning on writing a tutorial about this. But who has > >> the > >> time...? :) > > >> Cheers > >> /R > > >> On Aug 7, 11:21 am, steanson <[email protected]> wrote: > > >>> thanks for the pointers in the right direction! > >>> Just one more question: > >>> In the example above if i set the u and v properties both to 0 the > >>> material appears totally black. why would that happen? > >>> thanks once again > >>> Steve > > >>> On Aug 6, 11:30 am, Fabrice3D <[email protected]> wrote: > > >>>> u & v == x & y on a map, represented in 0 to 1 values. > >>>> u:0, v:1 being topleft of the map, u:1, v:0 being downright. > > >>>> Fabrice > > >>>> On Aug 6, 2009, at 10:59 AM, steanson wrote: > > >>>>> Perfect, that really helps it make sense. > >>>>> I'm not quite sure what a UV represents, I was thinking normals > >>>>> but > >>>>> there are 3 per face. > > >>>>> cheers Steve > > >>>>> On Jul 28, 8:27 pm, "David Zirbel" <[email protected]> > >>>>> wrote: > >>>>>> Hi Steve, > > >>>>>> Here is a snippet of some code I wrote to try to figure out the > >>>>>> vertex/uv/face/mesh relationships. It generates the simplest > >>>>>> solid > >>>>>> I could > >>>>>> think of: four vertices and four faces: > > >>>>>> // Create vertices: > >>>>>> v0 = new Vertex( 0, 0, 0); > >>>>>> v1 = new Vertex(100, 0, 0); > >>>>>> v2 = new Vertex( 50, 50,100); > >>>>>> v3 = new Vertex( 50,-50,100); > >>>>>> // Create UVs: > >>>>>> uv0 = new UV(0.0,1.00); > >>>>>> uv1 = new UV(0.0,0.0); > >>>>>> uv2 = new UV(1,1); > >>>>>> uv3 = new UV(0.5,0.25); > >>>>>> uv4 = new UV(1.0,0.50); > >>>>>> uv5 = new UV(1.0,0.00); > >>>>>> // Create faces: > >>>>>> f0 = new Face(v1,v3,v2); > >>>>>> f0.uv0 = uv2; > >>>>>> f0.uv1 = uv3; > >>>>>> f0.uv2 = uv4; > >>>>>> f1 = new Face(v0,v2,v3); > >>>>>> f1.uv0 = uv5; > >>>>>> f1.uv1 = uv4; > >>>>>> f1.uv2 = uv3; > >>>>>> f2 = new Face(v0,v3,v1); > >>>>>> f2.uv0 = uv1; > >>>>>> f2.uv1 = uv3; > >>>>>> f2.uv2 = uv2; > >>>>>> f3 = new Face(v0,v1,v2); > >>>>>> f3.uv0 = uv1; > >>>>>> f3.uv1 = uv2; > >>>>>> f3.uv2 = uv0; > >>>>>> // Create mesh: > >>>>>> m0 = new Mesh(); > >>>>>> m0.addFace(f0); > >>>>>> m0.addFace(f1); > >>>>>> m0.addFace(f2); > >>>>>> m0.addFace(f3); > >>>>>> m0.material = phongColorMat; > > >>>>>> HTH! > > >>>>>> David Z > > >>>>>> -----Original Message----- > >>>>>> From: [email protected] [mailto:away3d- > >>>>>> [email protected]] On > > >>>>>> Behalf Of steanson > >>>>>> Sent: Tuesday, July 28, 2009 11:02 AM > >>>>>> To: away3d.dev > >>>>>> Subject: [away3d] Re: generate object from 3d coords > > >>>>>> thanks for the replies! > > >>>>>> I was hoping that I could define some points/triangles and go > >>>>>> from > >>>>>> there, is that not possible? > >>>>>> I don't really understand the way that triangles, faces, mesh and > >>>>>> materials are related. Are there some notes, as the docs don't > >>>>>> make > >>>>>> the relationships explicit. > > >>>>>> cheers Steve > > >>>>>> On Jul 28, 2:47 pm, Peter Kapelyan <[email protected]> wrote: > >>>>>>> Use can use a Lathe extrusion to create your object. Once it is > >>>>>>> created > >>>>>> you > >>>>>>> can try to find the faces manually, and overwrite those sides > >>>>>>> with > >>>>>>> new > >>>>>>> materials. Let me know if it makes sense. > > >>>>>>> -Pete > > >>>>>>> On Tue, Jul 28, 2009 at 9:07 AM, steanson > >>>>>> <[email protected]>wrote: > > >>>>>>>> For example is there a way to specify local coordinates for > >>>>>>>> say a > >>>>>>>> pyramid, assign materials to each face? > > >>>>>>>> On Jul 28, 9:16 am, steanson <[email protected]> > >>>>>>>> wrote: > >>>>>>>>> If I know / can work out my coordinates in 3d space for an > >>>>>>>>> object, > >>>>>>>>> quite a simple one, what is the best way to create this in > >>>>>>>>> away3d. I'm > >>>>>>>>> trying to avoid learning a package like Blender. > > >>>>>>>>> thanks Steve > > >>>>>>> -- > >>>>>>> ___________________ > > >>>>>>> Actionscript 3.0 Flash 3D Graphics Engine > > >>>>>>> HTTP://AWAY3D.COM
