Replacing textures rather than materials

Home Forums Puzzles Replacing textures rather than materials

This topic contains 76 replies, has 10 voices, and was last updated by Yuri Kovelenov Yuri Kovelenov 5 months, 4 weeks ago.

Viewing 15 posts - 61 through 75 (of 77 total)
  • Author
    Posts
  • #8781
    Avatar
    littleeiffel
    Licensee

    Thanks Yuri, this looks interesting. I will try it out and get you an update.

    #8782
    Avatar
    littleeiffel
    Licensee

    Hi Yuri, it does seem to work clumsily! It appears that I managed to get something of a 2D canvas to place a piece of graphic onto the mesh, although the external call crashes in Puzzle with an error. See attached.

    In parent document, I have a canvas element containing Fabric.js for processing graphics. Currently, when the app is running on local server, the initial loading of the image appears on V3D canvas. But further interaction with the image such as scale, rotate, transform do not get update on V3D but is fully functional on Fabric canvas. According to my research, the console error could be associated with incomplete canvas loading when my external function is called within V3D.

    I have tried a few basic things. First of all, I doubled check the order of execution of scripts in the parent html document. Secondly, I tried running similar codes in the RunCode function, but that seemed to not work at all.

    Attachments:
    You must be logged in to view attached files.
    #8789
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    Can you attach the zipped project folder? We’d take a look.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #8799
    Avatar
    littleeiffel
    Licensee

    Cool. Please see attached.

    Attachments:
    You must be logged in to view attached files.
    #8814
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Well I launched the app and it’s working for me. I suggest that you trigger your dynaTexture function upon user click and not upon loading – this way you’ll be able to test your 2d editor right away.

    Cool idea by the way, we too were thinking about adding a similar feature in Verge3D core.

    Attachments:
    You must be logged in to view attached files.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #8885
    Avatar
    littleeiffel
    Licensee

    thanks for testing Yuri. I took your advice and edited the codes, and was pleasantly surprised to see it working.

    your software is fantastic and fairly painless to use. i will make a purchase after a few more experimentation. Please let me know if you are planning on a upcoming Black Friday sales.

    Cheers,

    #8900
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Yep we are planning to issue a Black Friday discount. Stay tuned ;-)

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #11280
    Avatar
    HoboCat
    Newbie

    Hello again, it is very nice that verge3d is so well supported and we can get help any time! I just found out an easy way of transfering an image from user input to verge3d enviroment. I made it so that the image from user input is stored in javascript variable as a base64 string, and so it can be transfered as a link to verge3d. But the project that I am building will take user image file and text inputs, these inputs will change an svg content(text, pictures) and finally when the svg is modified by the inputs it should be transfered to the verge3d. It works fine, but I noticed that when there is text with special letters(ru, pl, ltu) in svg, the script does not manage to convert this svg to base64. Maybe there is a way to pass the svg image to verge3d without converting it to base64?

    • This reply was modified 6 months, 1 week ago by Avatar HoboCat.
    #11296
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    when there is text with special letters(ru, pl, ltu) in svg

    looks like encoding issue https://stackoverflow.com/questions/19134995/how-to-display-unicode-in-svg

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #11596
    Avatar
    HoboCat
    Newbie

    Thanks for advice. I also found out that svg’s from inkscape must be exported in plain svg format, then you can simply pass its html code to verge3d without any conversion to base64. My problem was that svg’s that i used was ‘Inkscape svg’ format.

    • This reply was modified 6 months ago by Avatar HoboCat.
    #11602
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    glad you figured it out :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #11650
    Avatar
    HoboCat
    Newbie

    Hmmm as soon as I acomplished to make fully functional mechanism I started to try if it would work in my project that I am building(product customizator). After publishing to Verge3d network it somehow stopped to work the way I had made it. If I pass an image link, verge3d replace_texture puzzle does not make changes in image. But if I pass the image that is in app dir (./svgexample.svg) then it works. Also works with base64 input, but does not work with svg anymore. Could it be that when publishing to v3d network it modifies something in my v3d app?
    Here is my app:
    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:f91957cd7f/applications/my_product/index.html

    edit:
    I found that the <image> part in svg is the part that started to block it to be passed to verge, if I take it out it works. Thats why image change from app dir works(it is without img).

    • This reply was modified 6 months ago by Avatar HoboCat.
    • This reply was modified 6 months ago by Avatar HoboCat.
    #11665
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    your app seems to load images from a different domain which is forbidden by the same origin policy. Images must be loaded from the same domain (website). Alternatively, the backend must allow cross-domain requests – basically the server must respond with Access-Control-Allow-Origin: * headers enabled.

    BTW, have you tried the new puzzles for selecting images that we added in 2.11pre1?

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #11679
    Avatar
    HoboCat
    Newbie

    Hey thanks! those puzzles seems to be usefull in my project! I noticed that there is a puzzle element ‘opened file’, but it says that it retrieves image from ‘upload image’ puzzle, but I dont see such puzzle. Is it the “Open file>do” puzzle?

    Also I managed to make my last link to work. But it does not work on chrome:
    puzzles
    the part that takes svg from input in text form of “data:image/svg+xml;utf8,<svg>…” and uses that svg as a texture doesn’t seem to work in chrome. Is there something I could do wih this?

    My project is related with laser engraving and cnc cutting production, and in these areas we use svg files for production. The svg file that is shown in v3d would be also sent directly to production.

    By the way if I put 3d iframe from v3d network directly to my web page the buttons dont interact with v3d iframe. Is this problem also related to ‘same origin policy’ issue?
    It would be very handy to use v3d network as 3d content storage for my automated web store.

    • This reply was modified 5 months, 4 weeks ago by Avatar HoboCat.
    • This reply was modified 5 months, 4 weeks ago by Avatar HoboCat.
    • This reply was modified 5 months, 4 weeks ago by Avatar HoboCat.
    • This reply was modified 5 months, 4 weeks ago by Avatar HoboCat.
    #11703
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    ‘opened file’, but it says that it retrieves image from ‘upload image’

    There is an error in the description. The puzzles open file and opened file are supposed to work together.

    Is there something I could do wih this?

    Can you attach a sample project for us to look into?

    Is this problem also related to ‘same origin policy’ issue?

    Yep. The Verge3D app and the page in which the app is embedded must be served from the same domain.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 15 posts - 61 through 75 (of 77 total)

You must be logged in to reply to this topic.