Home › Forums › General Questions › Random textures
- This topic has 14 replies, 3 voices, and was last updated 5 years, 5 months ago by Mikhail Luzyanin.
-
AuthorPosts
-
2019-02-17 at 5:14 pm #11492feraudParticipant
Hi
Is there a way to apply random textures using Verge3D anytime you start the application?
Say we have a cube and 6 textures in the scene. Anytime you start the app the textures are applied different one for cube side. Is it possible?
Thanks
2019-02-18 at 7:09 am #11497Mikhail LuzyaninStaffSay we have a cube and 6 textures in the scene. Anytime you start the app the textures are applied different one for cube side. Is it possible?
Yes. At first you need to create a material with empty texture slot where you will put randomly pcicke texture. THen you need to add all textures (path to textures) in List and then just pick randomly with puzzle Random Integer and Get fro List random texture and load it to the material’s texture slot that you prepeared with Replace Texture puzzle. And all this you need to do on the applciation startup.
Co-founder and lead graphics specialist at Soft8Soft.
2019-02-19 at 5:28 am #11524feraudParticipantNice. Easier than I thought. Thanks, Mikhail
2019-06-03 at 8:21 am #15244AnonymousInactivehowto make empty a texture slot in blender? how do you mean empty texture slot. is it material without image texture node? or you mean texture node without a image name?
2019-06-03 at 8:40 am #15247AnonymousInactiveI try to do exact that logics for random textures on click. I have trouble to find the textures path if they are not added into the blender materials. They are not visible in pluzzles. So how do I generate a list of images for “empty texture slot”?.
2019-06-03 at 8:49 am #15248Mikhail LuzyaninStaffSo how do I generate a list of images for “empty texture slot”?.
You need to create a texture slot with dummy texture, it can be a one pixel texture for example and you can chage that texture to any other using puzzles, but at first you need to put it something inside your material so the engine will know where to change a texture.
Co-founder and lead graphics specialist at Soft8Soft.
2019-06-03 at 8:55 am #15249AnonymousInactivehmm….I am using “custom_image” demo for my test and I see that there is kind of dummy image slot. let I say I want to put instead of your dummy image my set of images (list).But they do not appearing in puzzles, so I can’t create any list. Do I forget something?
2019-06-03 at 9:01 am #15250AnonymousInactiveor maybe I should create special directory for random images ? and give the path with some logics(which?)…I am confused. Or maybe it is better to create a hundred of materials and change them on click? What is better, how can it looks like in puzzles?
2019-06-03 at 10:16 am #15263Mikhail LuzyaninStafflet I say I want to put instead of your dummy image my set of images (list).
You can’t just put a list of images into an image slot. You need to create a dummy image slot inside the material, then in Puzzle editor create a list of the images you want to replace and then just create a random number (for example on click) from 0 to amount-of-images and use this number in In-List-Get puzzle to get random image from this list and use this with Load Texture puzzle to load the image into material. Puzzle setup will be the same for randomizing image inside one material or choosing one material from multiple amount of already made materials, but the first will be easier and optimized.
Co-founder and lead graphics specialist at Soft8Soft.
2019-06-03 at 10:51 am #15273AnonymousInactivei understood. This is what I did, I created dummy texture. But creating list of my set of images in puzzles is not possible, because they are not recognized and not read from the directory. so I can’t choose them all and add to the list. So I stuck at that point.
2019-06-03 at 12:05 pm #15283Mikhail LuzyaninStaffBut creating list of my set of images in puzzles is not possible, because they are not recognized and not read from the directory.
You mean you get a error when you load them or you just can’t know the exact name of each texture?
Co-founder and lead graphics specialist at Soft8Soft.
2019-06-03 at 12:21 pm #15284AnonymousInactivei know names of my 100 textures: DS0049xxx.png. I put them to project folder But they not appear in puzzles. Only textures apears which are added to materials in Blender.
2019-06-03 at 12:26 pm #15285Mikhail LuzyaninStaffOnly textures apears which are added to materials in Blender.
They will not appear anywhere in the puzzles you will need to type them by hand with a path in text puzzle.
Co-founder and lead graphics specialist at Soft8Soft.
2019-06-03 at 1:01 pm #15287AnonymousInactiveoh…that bad news
2019-06-03 at 2:26 pm #15295Mikhail LuzyaninStaffYou can generate list of images and save it in txt file then read it to a kist with special read from file puzzle.
Co-founder and lead graphics specialist at Soft8Soft.
-
AuthorPosts
- You must be logged in to reply to this topic.