Importing .obj files into Simple Demo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing .obj files into Simple Demo

RichWhite
I have several objects I have created and exported out of Blender in .obj
format ... As I attempt to import them using Simple Demo I get an error
message.  Am I missing a step (or should the size ratio be adjusted?)

Thanks for your assistance !
Rich

==========
Reply | Threaded
Open this post in threaded view
|

Re: Importing .obj files into Simple Demo

Enno Schwass
Hi

> I have several objects I have created and exported out of Blender  
> in .obj
> format ... As I attempt to import them using Simple Demo I get an  
> error
> message.  Am I missing a step (or should the size ratio be adjusted?)

What error message did you get? Dont forget a color in your obj-File.
Without at least one color spezified, you get an error.

HTH
Enno
Reply | Threaded
Open this post in threaded view
|

Re: Importing .obj files into Simple Demo

RichWhite

What error message did you get? Dont forget a color in your obj-File.
Without at least one color spezified, you get an error.

HTH
Enno

I tried a simple sketchup .obj exported file and get the same error as well.
Here is the error log:

Error: At least one digit expected here
15 December 2007 1:36:42 pm

VM: Mac OS - a SmalltalkImage
Image: Croquet1.0beta [latest update: #2]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /Users/take2podcast/Desktop/Edusim_OLD_BASE/src
Trusted Dir /Users/take2podcast/Desktop/Edusim_OLD_BASE/src
Untrusted Dir foobar/tooBar/forSqueak/bogus

Integer class(Object)>>error:
    Receiver: Integer
    Arguments and temporary variables:
        aString:     'At least one digit expected here'
    Receiver's instance variables:
        superclass:     Number
        methodDict:     a MethodDictionary(size 116)
        format:     2
        instanceVariables:     nil
        organization:     ('testing' even isInteger isPowerOfTwo)
('arithmetic' * + - / // ...etc...
        subclasses:     #(SmallInteger LargePositiveInteger)
        name:     #Integer
        classPool:     a Dictionary()
        sharedPools:     nil
        environment:     nil
        category:     #'Kernel-Numbers'

Integer class>>readFrom:base:
    Receiver: Integer
    Arguments and temporary variables:
        aStream:     a ReadWriteStream '

usemtl jean_blue
v 24.9535 35.6876 -15.5715
vt 7....etc...
        base:     10
        digit:     -35
        value:     0
        neg:     false
        startPos:     0
    Receiver's instance variables:
        superclass:     Number
        methodDict:     a MethodDictionary(size 116)
        format:     2
        instanceVariables:     nil
        organization:     ('testing' even isInteger isPowerOfTwo)
('arithmetic' * + - / // ...etc...
        subclasses:     #(SmallInteger LargePositiveInteger)
        name:     #Integer
        classPool:     a Dictionary()
        sharedPools:     nil
        environment:     nil
        category:     #'Kernel-Numbers'

OBJImporter>>parseStream:scale:
    Receiver: an OBJImporter
    Arguments and temporary variables:
        fileStream:     MultiByteFileStream: '/Users/take2podcast/Desktop/box.obj'
        scale:     1
        materialName:     ''
        collectingVertices:     false
        vertexIndices:     an OrderedCollection()
        collectingFaces:     false
        faceCount:     0
        faceMatDictionary:     a Dictionary()
        char:     $f
        groupName:     'Mesh1'
        groupIndex:     1
        line:     ' 0.879192 4.45195'
        words:     an OrderedCollection('0.879192' '4.45195')
        face:     a TFace(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)
        faceMatCollection:     nil
        idx:     8
        currentMaterial:     nil
        newFaceList:     nil
        faceArray:     nil
        count:     nil
        doLoop:     true
        v:     a ReadWriteStream '

usemtl jean_blue
v 24.9535 35.6876 -15.5715
vt 7.02429 ...etc...
        doLoop1:     false
        endChar:     $/
        vt:     16
        doLoop2:     false
        vn:     1
        doLoop3:     false
        vertices:     an OrderedCollection(a Vector3(20.38649940490723 4.17210006713867 -20...etc...
        normals:     an OrderedCollection(a Vector3(0.0 -0.740777015686035 -9.3812598060113...etc...
        texCoords:     an OrderedCollection(a Vector2(0.2256370037794113 -3.08464002609253)...etc...
        texCoords2:     nil
        additionTextureCoords:     nil
        oldVal:     nil
        newVal:     nil
        coord:     nil
        index:     2
        indexLimiT:     1
        key:     nil
        aFace:     nil
        i:     nil
        iLimiT:     nil
        vertex:     nil
    Receiver's instance variables:
        mesh:     nil
        vertexArray:     nil
        normalArray:     nil
        textureCoordinates:     nil
        faceGroupsDictionary:     a Dictionary(1->'Mesh1' )
        materialsDictionary:     a Dictionary('FrontColor'->a TMaterial:'aTMaterial' 'jean_...etc...
        faceMatDictTriVertInd:     a Dictionary()
        vertexIndicesGroupNames:     an OrderedCollection(1)
        vertexIndicesGroupNames2:     an OrderedCollection(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)...etc...
        doCollection1:     false

OBJImporter>>parseFile:scale:
    Receiver: an OBJImporter
    Arguments and temporary variables:
        fileName:     '/Users/take2podcast/Desktop/box.obj'
        scale:     1
        fileStream:     MultiByteFileStream: '/Users/take2podcast/Desktop/box.obj'
    Receiver's instance variables:
        mesh:     nil
        vertexArray:     nil
        normalArray:     nil
        textureCoordinates:     nil
        faceGroupsDictionary:     a Dictionary(1->'Mesh1' )
        materialsDictionary:     a Dictionary('FrontColor'->a TMaterial:'aTMaterial' 'jean_...etc...
        faceMatDictTriVertInd:     a Dictionary()
        vertexIndicesGroupNames:     an OrderedCollection(1)
        vertexIndicesGroupNames2:     an OrderedCollection(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)...etc...
        doCollection1:     false


--- The full stack ---
Integer class(Object)>>error:
Integer class>>readFrom:base:
OBJImporter>>parseStream:scale:
OBJImporter>>parseFile:scale:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OBJImporter class>>parseFile:scale:
CroquetMenuProject>>actionImport
AsyncScriptMessageSend(ScriptMessageSend)>>synchronousValueWithArguments:event:
...etc...

Thanks for you help !
Rich
=============

Reply | Threaded
Open this post in threaded view
|

Re: Importing .obj files into Simple Demo

Andreas Vox-2

Am 15.12.2007 um 20:45 schrieb Rich White:

        digit:     -35
 ??

If digit was calcuated as in 

char c = stream.getc(); 
int digit = c - '0'; 

then that would correspond to the CR character (ASCII 13). Maybe a CR+LF / LF problem?
(sorry, don't know Squeak well enough, hence I use C syntax) 

/Andreas
Reply | Threaded
Open this post in threaded view
|

Re: Importing .obj files into Simple Demo

David Faught
In reply to this post by RichWhite
There is a newer version of the OBJ importer on the Jabberwocky
repository that has a lot of fixes.  If you can figure out the
instructions and get by the warnings at
http://croquetconsortium.org/index.php/Keeping_Image_Current then you
can use this newer version.  I notice that they didn't replace the
menu item with it though - you'll have to call it or update the menu
item on your own.

If you have questions or problems, you can email this list or me.

I had hoped that there would be a newer image with these updates
available by now, but it hasn't happened.  I think that the main
developers don't feel that enough progress has been made on the goals
for the next release to warrant the effort it takes to put one out.
Maybe an updated image should be a separate thing from a full release.

Dave


On 12/15/07, [hidden email] <[hidden email]> wrote:
> I have several objects I have created and exported out of Blender in .obj
> format ... As I attempt to import them using Simple Demo I get an error
> message.  Am I missing a step (or should the size ratio be adjusted?)
>
> Thanks for your assistance !
> Rich
>
> ==========
>