03 June 2014, 21:34 | #1 |
Tassel / LaBaN
Join Date: Feb 2014
Location: Kristiansand / Norway
Posts: 42
|
3D import - Tools & Example source of 3D data
Hi,
A technical question. Today I work with 3D (mostly 3DS Max) and I remember it was an example of importing lightwave objects back in the days. Is there someone who has made example source of importing 3ds data or a routine that reads plain text files with coordinates? I'm thinking of making a maxscript to write text files with coordinate data so i can use it for intros/demos etc. What tools are available on the amiga/pc to do such things today? Last edited by tassel; 03 June 2014 at 22:14. |
04 June 2014, 10:35 | #2 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
try posting this sort of question on pouet.net.. much better chances of getting answers to demo- and 3d-related questions there..
|
04 June 2014, 23:48 | #3 |
Registered User
Join Date: Jul 2011
Location: UK
Posts: 341
|
Max can output ASE files which are text readable. Other than that 3DS files are fairly simple to decode and can be in/exported.
Don't try looking into MAX files they are about as use able as Lightwave LWS files. Old format LWO files are also simple, just not the modern v5 onwards versions. |
05 June 2014, 01:55 | #4 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
What about FBX ascii files? Max can export those.
|
05 June 2014, 09:34 | #5 |
Posts: n/a
|
Have you had a look at http://assimp.sourceforge.net/? I've used it lot's and it's been really usefull
|
05 June 2014, 11:04 | #6 |
Registered User
Join Date: Jul 2011
Location: UK
Posts: 341
|
Clarky - Nice link It even supports bones I may have to give this one a go again as it would be simpler than a MAX plugin or the FBX SDK for getting skinned mesh animations.
|
05 June 2014, 16:28 | #7 |
Tassel / LaBaN
Join Date: Feb 2014
Location: Kristiansand / Norway
Posts: 42
|
If we only want the coordinates from the object, we can use a maxscript (found in the maxscript documentation):
The snippet: Code:
tmesh = snapshotAsMesh selection[1] out_file = createfile ((GetDir #export)+"/testmesh.dat") format "%,%\n" tmesh.numverts tmesh.numfaces to:out_file for v = 1 to tmesh.numverts do format "%," (getVert tmesh v)to:out_file format "\n" to:out_file for f = 1 to tmesh.numfaces do format "%," (getFace tmesh f) to:out_file close out_file If we have a 3D Box in 3DS Max this is what i get: Code:
8,12 [-2.5,-2.5,-2.5],[2.5,-2.5,-2.5],[-2.5,2.5,-2.5],[2.5,2.5,-2.5],[-2.5,-2.5,2.5],[2.5,-2.5,2.5],[-2.5,2.5,2.5],[2.5,2.5,2.5], [1,3,4],[4,2,1],[5,6,8],[8,7,5],[1,2,6],[6,5,1],[2,4,8],[8,6,2],[4,3,7],[7,8,4],[3,1,5],[5,7,3], (This is going to be a challenge for me, because it's a long time since i have done anything in amiga asm, so i will probably need some time (1 year ) to get into this as I never moved to this area last time I tried programming asm.) |
05 June 2014, 16:55 | #8 |
Registered User
Join Date: Jul 2011
Location: UK
Posts: 341
|
Good luck
|
06 June 2014, 01:17 | #9 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
Just export lightwave. You'll get poly and uv coords, and ccw polys. Calc normals and optionally scale to big ints. Adapt to your working vector routine. |
|
06 June 2014, 19:09 | #10 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
|
06 June 2014, 23:15 | #11 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Well, there's that, but I guess I meant that EAB is also a source for coding tips.
Anyway the lightwave text format is well-made and pretty simple, bunch of vertices Code:
v [x] [y] [z] v [x] [y] [z] ... Code:
f [vertex1] [vertex2] [vertex3]... f [vertex1] [vertex2] [vertex3]... ... |
07 June 2014, 12:30 | #12 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
i've found a lightwave object converter by The Black Lotus. it's a ms-dos tool, source code included.
maybe someone can make an amiga executable or make it work on win7 / 8.1 ? zoned: TBL-LWC.lha e4dit: you need the dos-extender dos4gw.exe or dos32a - use these instruction to replace dos4gw with dos32a. in dosbox-0.74.conf set: memsize=64 and it does work ( dos32a tested ). edit2: it's already on aminet, also a ppc version with source and smakefile Last edited by emufan; 07 June 2014 at 13:23. |
09 June 2014, 22:00 | #13 |
Tassel / LaBaN
Join Date: Feb 2014
Location: Kristiansand / Norway
Posts: 42
|
Hi,
Thanks for the input guys I'll do some more research around this and come back when I get time (going a little slow now that it's summer) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LTTF: Amiga CD32 Games ~ HFT: Old School & Import Games | mobiusclimber | Swapshop | 3 | 08 December 2015 00:35 |
Xcopy pro & Tools with Cyclone Dongle | teamhack22 | request.Apps | 5 | 14 September 2010 20:52 |
Xcopy pro & Tools 1993 amiga disk | teamhack22 | request.Apps | 5 | 12 July 2010 23:20 |
Devious Tools & Amiga Emulation Nation | Demiurgo | request.Apps | 10 | 01 May 2008 13:19 |
x-copy & tools (1993)(-) | Ian | request.Apps | 6 | 23 April 2002 21:49 |
|
|