Is there any sourcecode about planar UV mapping for Blitz3D? Thanks.
Planar Mapping ?
Blitz3D Forums/Blitz3D Programming/Planar Mapping ? Blitz 3d Samples\Birdie\UV mapping perhaps.
Use a pivot as your world space object (the pivots X+ and Y+ axis' then represent U and V), then just transform each vert into world space, and use the tformedx() and tformedy() as U & V for that vert.
Use cursors & mouse to move/rotate the pivot/cone, SPACE sets the UVs based on the the cones position & rotation.
Use cursors & mouse to move/rotate the pivot/cone, SPACE sets the UVs based on the the cones position & rotation.
Graphics3D 800,600,32,2 cam=CreateCamera() PositionEntity cam,1,1,-4 light=CreateLight() piv=CreateCone() RotateMesh piv,90,0,0 ScaleMesh piv,.2,.2,.5 PositionEntity piv,0,0,-2 sphere=CreateSphere() tex=LoadTexture("C:\Program Files\blitz3d\DX7DLL\brick.png") EntityTexture sphere,tex surf=GetSurface(sphere,1) PointEntity cam,sphere sc#=.5 While Not KeyHit(1) If KeyDown(200) MoveEntity piv,0,0,.01 If KeyDown(208) MoveEntity piv,0,0,-.01 If KeyDown(203) MoveEntity piv,-.01,0,0 If KeyDown(205) MoveEntity piv,.01,0,0 RotateEntity piv,(400+MouseY())*.5, -(MouseX()-400)*.5,0 If KeyHit(57) For i = 0 To CountVertices(surf)-1 TFormPoint VertexX(surf,i),VertexY(surf,i),VertexZ(surf,i),sphere,piv VertexTexCoords surf,i,TFormedX()*sc,TFormedY()*sc,0 Next End If TurnEntity sphere,0,1,0 RenderWorld Flip Wend
Thanks for your help! I had an idea for something like Radiosity, so I needed planar mapping as it is used by a lightmapper. That said, it seems I am too stupid to extract the planar mapping and packing parts from the YAL open source :o)
Currently I am trying to implement a method described at flipcode, that I realize I missed to save a bookmark for - <:o) ^2
Edit: this one:
http://www.flipcode.org/cgi-bin/fcarticles.cgi?show=64423
Currently I am trying to implement a method described at flipcode, that I realize I missed to save a bookmark for - <:o) ^2
Edit: this one:
http://www.flipcode.org/cgi-bin/fcarticles.cgi?show=64423