Log in or register to post comments

The picture for model is not change, when swap the data path

January 15, 2013 - 9:51pm #1

 

Now I use FrameMarkers and have two 3D resources in different path.
For Example:
Path1 Documents/Author1/
Path2 Documents/Author2/ 

Now I can swap the 3D model between path1 and path2 by touching the screen and choosing path to rendering. My Problem is the picture for using in these model to rendering is not correct. It always show the Author1's picture. For Example

When I start the apps, the default for rendering is Author1. When the FrameMarker is tracked, it shows the Dog model with right Dog picture. After I touch the screen and choose Author2, the path will set to part2. When the FramMarker is detected, it shows the Banana with Dog picture. <<<<< It 's my problem

I think the picture file to rendering these model will be stored in some buffer or in somewhere, So that Why the picture isn't be changed.

Anyone know the way to solve this problem ?

  It's not clear to me what

January 17, 2013 - 8:21am #4

 

It's not clear to me what the problem is, so could you try again please?

Are you saying that one of the augmentations with one of the FrameMarkers is incorrect?

N

The picture for model is not change, when swap the data path

January 16, 2013 - 7:17pm #3

 

 

The Banana come from another path which is Documents/Author2/JPG/. After I choose path2, the redeem will set to 2. My problem is the texture plane isn't change to another texture plane in  Documents/Author2/JPG/. It's still using the texture plane which is called at the begining of application.

- (id)initWithFrame:(CGRect)frame

{

    NSString *docsDirectoryJPG;

    NSString *docsDirectoryJPG1;

    docsDirectoryJPG = [docsDirectory stringByAppendingPathComponent:@"/Author1/JPG/"];

    docsDirectoryJPG1 = [docsDirectory stringByAppendingPathComponent:@"/Author2/JPG/"];

    NSArray *filesJPG = [fileManager contentsOfDirectoryAtPath:docsDirectoryJPG error:nil];

    NSArray *filesJPG1 = [fileManager contentsOfDirectoryAtPath:docsDirectoryJPG1 error:nil];

    NSMutableArray *ArrayOfFilesJPG = [[NSMutableArray alloc] init];

    NSMutableArray *ArrayOfFilesJPG1 = [[NSMutableArray alloc] init];

 

 

    

    self = [super initWithFrame:frame];

    

if (self)

    {

        // create list of textures we want loading - ARViewController will do this for us

        if(redeem ==1)

        {

            [ArrayOfFilesJPG removeAllObjects];

            [textureList removeAllObjects];

            for (int count = 0; count < filesJPG.count; count++) {

                [ArrayOfFilesJPG addObject:[filesJPG objectAtIndex:count]];

            }

            for (int i = 0; i < [ArrayOfFilesJPG count]; ++i)

            {

                [textureList addObject: ArrayOfFilesJPG[i]];

                NSLog(@"%@",textureList[i]);

            }

        }

        else

        {     

            [ArrayOfFilesJPG1 removeAllObjects];

            [textureList removeAllObjects];

            for (int count = 0; count < filesJPG1.count; count++) {

                [ArrayOfFilesJPG1 addObject:[filesJPG1 objectAtIndex:count]];

            }

            for (int i = 0; i < [ArrayOfFilesJPG1 count]; ++i)

            {

                [textureList addObject: ArrayOfFilesJPG1[i]];

                NSLog(@"aa%@",textureList[i]);

            }

        }

    }

    return self;

}

My first thought after

January 16, 2013 - 6:28am #2

My first thought after reading this twice was

"where did the Banana come from?"

It's not clear to me what the problem is, so could you try again please?

Are you saying that one of the augmentations with one of the FrameMarkers is incorrect?

N

Log in or register to post comments