BBC BASIC
« Wavefront OBJ to FVF converter »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 11:13pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Wavefront OBJ to FVF converter  (Read 487 times)
michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 157
xx Re: Wavefront OBJ to FVF converter
« Reply #7 on: Sep 16th, 2017, 1:57pm »

Quote:
but you seem to think that is yet another mistake


Its not a mistake. (you shouldn't have had to change the extension) It was a coincidence.

Everything is ok.

I wish I could be at your skill level. And BBC4W is a fine product.

« Last Edit: Sep 16th, 2017, 2:22pm by michael » User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Wavefront OBJ to FVF converter
« Reply #8 on: Sep 16th, 2017, 4:29pm »

on Sep 16th, 2017, 1:57pm, michael wrote:
It was a coincidence.

I can't claim that excuse. Before adopting the B3D extension I should have looked it up on a site like filext.com (quite different then from what it is now) when I would have discovered its existing use(s).

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Wavefront OBJ to FVF converter
« Reply #9 on: Sep 17th, 2017, 09:06am »

Has anybody else tried the Nottingham University 3D Face Reconstruction tool? It's very easy to use:
  1. Find a full-face straight-on selfie (preferably without glasses), with good contrast between your face and the background, and upload it here.

  2. When it has finished processing, download the generated .OBJ file and convert it to a .FVF using the code I listed previously in this thread.

  3. Plug the FVF file into the program below if you want to use the same animation as I did for Donald Trump, or adapt it to your preference.

  4. Upload a video capture to YouTube (etc.), so we can see the result, if you dare!
Richard.

Code:
      REM. Turning Face by Richard Russell, 16-Sep-2017      HIMEM = PAGE + 5000000      IF INKEY$(-256)="W" INSTALL @lib$+"D3DLIBA" ELSE INSTALL @lib$+"ogllib"      ON CLOSE PROCcleanup : QUIT      ON ERROR PROCcleanup : IF ERR=17 CHAIN @lib$+"../examples/tools/touchide" ELSE MODE 3 : PRINT REPORT$ : END      ON MOVE IF @msg% <> 5 RETURN ELSE PROCcleanup : CLEAR      VDU 20,26,12      DIM pVB%(0), nv%(0), vf%(0), vl%(0), l%(0), m%(0), t%(0), y(0), p(0), r(0)      DIM X(0), Y(0), Z(0), eye(2), at(2)      REM. Initialise OpenGL:      IF INKEY$(-256)="W" pDev% = FN_initd3d(@hwnd%, 1, 0) ELSE pDev% = FN_initgl(@hwnd%, 1, 0)      IF pDev% = 0 ERROR 100, "Couldn't initialise 3D subsystem"      REM. Load 3D object:      pVB%(0) = FN_load3d(pDev%, @dir$ + "trump.fvf", nv%(0), vf%(0), vl%(0))      IF pVB%(0) = 0 ERROR 101, "Couldn't load FVF file"      REM. Render the turning face:      at() = 100, 100, 40      REPEAT        turn = SIN(TIME/100)        eye() = at(0)+400*SIN(turn), 0, at(2)+400*COS(turn)        PROC_render(pDev%, &7F7F90, 0, l%(), 1, m%(), t%(), pVB%(), nv%(), vf%(), vl%(), \        \ y(), p(), r(), X(), Y(), Z(), eye(), at(), PI/6, @vdu%!208/@vdu%!212, 1, 1000, PI)      UNTIL INKEY(1)=0      END      DEF PROCcleanup      pVB%(0) += 0  : IF pVB%(0)  PROC_release(pVB%(0))      *REFRESH ON      ENDPROC 

« Last Edit: Sep 17th, 2017, 6:05pm by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls