June 4, 200223 yr A lot of industrial buildings and airport hangars need a front and back polygon that is 5 sided because the roof has a peak. . * * * * *In order to apply a rectangular bitmap texture to this building front, do you need to make the top left and top right part of the texture any 100% transparent color, so that the visible color part of the texture takes the 5 sided shape of the bulding?How does one produce a texture with some parts of it partially, and some parts of it,fully transparent?
June 4, 200223 yr Applying a specifically shaped portion of a texture is done in scasm and with scasm based design tools by invoking the texpoly. The following is directly copied from the scadocs: commandTexPoly( vattr [vx vz vy len] pnum1 bx1 by1 ..pnumn bxn byn )TexPoly( m vx vz vy len pnum1 bx1 by1 ..pnumn bxn byn )TexPoly( a pnum1 bx1 by1 ..pnumn bxn byn )TexPoly( at pnum1 ..pnumn ) - Draws a polygon covered with a texture bitmap. The points has to be defined with the Point() command. The polygon is always drawn with the same brightness, regardless to the location of the sun. The brightness can be changed using TexPolyShading() if the bitmap is prepared for that (see -> TexPolyShading() ). The bitmap-point bx1-by1 is tied to ptnum1 and so on. Image smoothing does not work with this command. Color shading can be done with TexPolyShading() and a special prepared bitmap. -> Bitmap(), -> Points(), -> TexPolyShading() - pnum# number (index) of a point from the point list bx# bitmap x coordinate (0...255) by# bitmap y coordinate (0...255) t,b,r -> see vattr, texture automatic -> see also annex 9 for more informationWhile the syntax is different, gmax must be doing something quite similar. Because the pmun# is unlimited, you can define a 5 point section of the texture or any other number of points, and have those points be defined as any portion of the texture you want. Bob Bernstein
June 4, 200223 yr Commercial Member Or to make a summary of this:Just make a polygon that has 5 sides and apply the texture on that. If you assign the right coordinates of the texture to the corner points of the polygon there is no need to make it transparant or something like that.ArnoMember NL2000 Teamhttp://home.wanadoo.nl/arno.gerretsen Arno If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done. FSDeveloper.com | Former Microsoft FS MVP | Blog
June 4, 200223 yr Many thanks to you both...I wrote some scasm code from scratch to create some great buildings for FS98 then abandoned everything for FS2000, and now plan to move on to gmax, since it appears it will be more extendable for 3D objects, and I read somewhere in AVSIM it has less of a framerate impact.
June 4, 200223 yr pretty much the same for most of us in this forum...In GMAX just assign a uvmap modifyer, and then drag a texture onto ur object, then assign a uvunwrap modifyer and select edit. Now select all vertices, and click on "break vertices". Then click on the Use selected fact button at the bottom.now go back and select a face and hit edit again...you will see only the vertices of the face in question, and its really easy to position the vertices where you want on the texture.Bob Bernstein
Create an account or sign in to comment