I’ve a requirement where I should create curves, folds and crumples for an image (images are basically papers) where the amount of curves, folds and crumples to be applied on the image should be controlled.
I’m thinking of using PerlinNoise. I’m not sure whether I should be using it or there are more relevant things. And also not sure about how to use PerlinNoise.
@inteja Thanks for your references. But i’m actually looking the same which can be written in code. I want to perform the same operation on a large set of images, so that can be done with coding.
@sebavan Can you please suggest me how else I can achieve it.
My requirement is - For a set of images (these images are papers), I want either folds or crumples or curvatures to be done on them and take a screenshot of the result and save it.
@jayanthi it’s unclear to me exactly what you’re trying to achieve. When you say “images are papers” do you mean they’re images of pieces of paper? What’s a “curvature” in this context?
Either way, I think you could still do this in code with normal maps. Load in your set of images, apply as diffuse textures to planes, apply a series of fold or crumple normal maps to the planes, randomise them a bit (scale, rotation, uv offset etc), position lights to emphasize the folds and crumples, then save as screenshot.
@inteja yes the images are pieces of papers.
I’ve the same kind of flow in my mind as you said. But I’m really unsure how can I achieve it.
I’m very new to Babylon actually.
Can you please suggest me how can I do that. Here’s my piece of code which I’ve started with. https://playground.babylonjs.com/#CPAT89
@jayanthi the playground is setup in a way to make it easy to get started straight away and see instant results, but if you want to integrate the code into your own local project you’ll need to add extra boilerplate stuff like an html page with a canvas element, then import babylon.js, instantiate the engine & scene and start the render loop.
Try going through the Getting Started documentation here:
@inteja I’ve all the setup done in my local machine.
I do coding from my local machine only always. But what I meant in the above comment is, the code is not showing up anything in my browser if I run it from my VS code.
I believe none of us in this forum did really understand the scope or the purpose.
Can you provide some example and details. Of what you have and want to achieve.
Is this a dynamic effect you want to apply or do you need to tweak or randomize it for each image? How do you select the amount of ‘effect’ (folding, crumple, etc…) on the picture? How many pictures? If you end-up with a PNG, why do you need a 3D real time approach?
For each set, I’ve to define the amount of effect (that’s the reason why I prefer this effect via coding, so that I can define the effect for each set).