We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Replacing textures rather than materials

Home Forums Puzzles Replacing textures rather than materials

Viewing 15 posts - 46 through 60 (of 77 total)
  • Author
    Posts
  • #4593

    I’m not seeing an attachment, but I’ll try it again.

    yeah sorry, the archive was to big to upload it directly on the forum
    here it is: ATI2-3.zip

    Co-founder and lead developer at Soft8Soft.

    #4645
    johngrigni
    Customer

    Okay, got the pbr to work, thank you

    I’ve tried to figure out the preloader to show a ‘loading’ gif, but I’m still too much of a noob here. I see where you got the code from that GitHub discussion, but you mention ‘just showing a gif while it loads’. That’s all I want to do – is that a different thing? Do I need that ImageLoader() fix?

    #4684

    That’s all I want to do – is that a different thing? Do I need that ImageLoader() fix?

    It’s different. That fix allows you to detect how much data is loaded at the moment, which is useful for a progress bar or when displaying percentage. So, for a gif preloader it’s not needed.

    I made some changes to the puzzles and to the js code.

    Basically, you need to create an HTML element for the gif preloader and style it with some CSS rules:
    gif-prepare.png
    After that, it’s just about switching its visibility when you start/finish loading a texture:
    gif-switchvis.png

    Here’s the modified project: ATI2-3-preloader.zip

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

    Co-founder and lead developer at Soft8Soft.

    #4688
    johngrigni
    Customer

    Thanks! Sorry to keep bugging you with what must seem terribly simple questions.

    #6104
    ppblaauw
    Participant

    How to download the attached file ATI2-3-preloader.zip? I get “Failed – Forbidden”. I am logged in.

    #6107

    Sorry, this particular file was linked from a temporary directory on our server which we periodically clean up. We’ll try to use a more persistent storage in the future.

    Chief 3D Verger | LinkedIn | Twitter

    #7309
    jbetbe
    Customer

    I’m trying it and I’d say thanks to the forum for your help.
    Could Ivan reload his file to try it?
    Thanks.

    Kind Regards.

    #7313

    Hi,

    If you’re looking for a way to replace textures, there is now a dedicated puzzle for that https://www.soft8soft.com/docs/#manual/introduction/Puzzles.replace_texture

    Chief 3D Verger | LinkedIn | Twitter

    #7679
    mckachun
    Customer

    Sorry I can’t find the replace texture node. I am using trial version.

    #7680
    Dzynek
    Participant

    In my trial version Verge3D 2.7 is replace texture node, gives a screenshot :)

    #7684
    mckachun
    Customer

    oh..sorry, I was using version 2.5. I found it. Thanks !

    #8691
    littleeiffel
    Customer

    Hi, first time posting on the forum. As a JavaScript noob, I’m appreciating this fantastic app, and thank you for putting it together. I would like to find out if the Replace Texture block is capable of dynamic texture from a HTML Canvas source external to the V3D script. I have successfully get it to replace texture on file, but not from a dynamic canvas element. Please see attached screen-grab of the puzzle. Thanks.

    #8702

    Hi,

    Using an HTML canvas as a texture is possible but requires some coding. See here the example https://cdn.soft8soft.com/demo/examples/index.html?q=canvas#webgl_materials_texture_canvas

    Chief 3D Verger | LinkedIn | Twitter

    #8746
    littleeiffel
    Customer

    Hi Yuri, thanks for getting back. I attempted to write a callback function which gets called in Puzzle. I couldn’t get it to work, but I’m getting there. Based on Console error message, I believe the line –
    var liveCanvas = parent.document.getElementById(‘fabcan’);
    fails to assign the canvas element value, subsequently, the Textureloader receives null value input. At the moment, the html canvas element ‘fabcan’ has only a static image in the 2D context.

    I’m new to coding, so I could be completely way off base. Your input is much appreciated.

    #8750

    Hi,

    is it crucial that you replace a texture in a material and not replace the material itself? If not, there is a good tutorial – it is about video textures but you can easily make it canvas using the source code from the above-mentioned example.

    Chief 3D Verger | LinkedIn | Twitter

Viewing 15 posts - 46 through 60 (of 77 total)
  • You must be logged in to reply to this topic.