- This topic has 9 replies, 2 voices, and was last updated 5 years, 1 month ago by Yuri Kovelenov.
-
AuthorPosts
-
2019-10-05 at 12:59 pm #19873hoodyParticipant
Hey Guys. How can i store the normal maps generated from “texture from text”-puzzle on my server?
Currently im using sendData puzzle to store the texture + the normal map generated from it on my server.
It works with the texture from text, but not for the nomal maps that are generated for this texture.The uploaded json. data is always only 2bytes small. (its empty).
Here is my code and my puzzle in the attachments:
eventHTMLElem(‘click’, ‘changer’, true, function(event) {
replaceTexture(‘mat_schnalle_links’, ‘NORMALHOODOR.png’, generateNormalMap(textureFromText(getHTMLElemAttribute(‘value’, ‘picker5’, true), 2860, 1445, ‘Clear Sans Medium’, getHTMLElemAttribute(‘value’, ‘picker6’, true), ‘LEFT’, getHTMLElemAttribute(‘value’, ‘picker7’, true)), 10, 10, 0, ‘Sobel’, false, false, true), function() {});
replaceTexture(‘mat_schnalle_rechts’, ‘NORMALHOODOR.png’, generateNormalMap(textureFromText(getHTMLElemAttribute(‘value’, ‘picker5’, true), 2860, 1445, ‘Clear Sans Medium’, getHTMLElemAttribute(‘value’, ‘picker6’, true), ‘LEFT’, getHTMLElemAttribute(‘value’, ‘picker7’, true)), 10, 10, 0, ‘Sobel’, false, false, true), function() {});
sendData(generateNormalMap(textureFromText(getHTMLElemAttribute(‘value’, ‘picker5’, true), 2860, 1445, ‘Clear Sans Medium’, getHTMLElemAttribute(‘value’, ‘picker6’, true), ‘LEFT’, getHTMLElemAttribute(‘value’, ‘picker7’, true)), 10, 10, 0, ‘Sobel’, false, false, true), ‘http://brudastan.de/wp-json/verge3d/v1/upload_file/’, function() {
saved_conf_url = setUrlParam(getUrlData(‘URL’), ‘normal_url’, dictGet(_pGlob.loadedFile, ‘link’));
openWebPage(saved_conf_url, ‘NO_RELOAD’);
});
});I hope you guys can help me once again.
Thanks
2019-10-06 at 8:23 am #19881Yuri KovelenovStaff2019-10-06 at 12:39 pm #19886hoodyParticipantHi yuri. Im not sure where to put the timeout puzzle.
My Problem is not that the replace texture puzzle does not work on custom url.
My problem ist that the texture replacement happens with an empty file for the generated normal map (2bytes).
The texture from text is uploaded to the server without any problems but the files for the normal maps are just empty. So i suppose it has to do sth with the send data puzzle, but i cant figure it out.
2019-10-07 at 7:42 am #19904Yuri KovelenovStaff2019-10-07 at 10:41 am #19911hoodyParticipantHey Yuri. thanks for the answer.
I updated to the latest version and tried your puzzle, but the result is the same – the uploaded data is only 2 bytes small.
2019-10-07 at 1:20 pm #19917hoodyParticipantI noticed that it does not matter if a normal map is uploaded. It seems to work alone with the texture from text. But it bevahes very strange.
Maybe you can take a look at this example:
You have to refresh the Link 5-6 times: at one moment the normal map will display correctly. But when you refresh the page again the normal is gone.sometimes its there and sometimes not (under the same cusom link)
I attached two screenshots, so that you can see the difference
2019-10-07 at 1:43 pm #19930Yuri KovelenovStaff2019-10-07 at 2:14 pm #19935hoodyParticipantHey. I tried that (tried with 0.1 ; 0,5 and 3 s) but it does not seem to make a difference.
2019-10-08 at 6:28 am #19940hoodyParticipantI think i found the problem.
Ill post my solutuion later this day.
:)
2019-10-08 at 6:29 am #19942Yuri KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.