Displacement

Announcements, requests and support regarding the Blender Indigo export script
Post Reply
15 posts • Page 1 of 1
Vanessa07
Posts: 312
Joined: Mon Sep 24, 2007 11:17 pm
Location: Suisse

Displacement

Post by Vanessa07 » Tue Dec 18, 2007 9:46 pm

Hi!!

How to export a displacement map with blendigo? I don't understand how to use it. I've seen a great job of bBb, in"works in progress".
Thx

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Tue Dec 18, 2007 10:59 pm

Salut Vanessa,
Indigo doesn't do displacement (yet). So you have to displace your object in Blender. It's quite a tedious process and the steps are as follows. I'll take a flat example like a rug or a wall to make things simple:
1) Create a rectangular plane with UVs (for a flat rug I use "unwrap", "project from view") and load your displacement map in the UV window. Tweak the position of the map, tiling and so on until you're satisfied.
2) Create a Blender material for your mesh, go to the texture tab and create an image texture (your displacement map).
3) Go back to the material tab. On the right of the screen you have three bookmarks that say "texture", "map input", and "map to". In map input select UV instead of Orco.
4) Now go back to your plane in edit mode. For nice displacement, your polys need to be as square as possible. So if you have created a 1x2 plane, add an edge loop in the middle so it is made of two rougly square polys.
5) Return to object mode and "set smooth" your object. In the edit panel, selected modifier -> subsurf and choose "simple subdiv." instead of "catmull-clark". Subdivide a couple of time. Now add another subsurf modifier, this time with "catmull-clark", and subdivide again a few times.
6) Now add a "displace" modifier. Where it says "Texture:" enter the name of the texture you applied to your material (generally it's Tex.001). Where it says "local" select "UV" instead. That's very important if you want your displacement map and diffuse map to match.
7) Now you should have spikes all over the place. You need to lower the Strength value for nice displacement (generally something like 0.01 or less).
8 ) If the result is too rough, play with the strength value some more and add more subdivision in your "subsurf" modifier. You can even add a third subsurf modifier, but make sure it's always above the "displace" modifier" in the stack (you can move your modifiers around by clicking on the little arrow buttons).
9) Check the polycount of your object. "Nice" displacement, depending on the map, requires something between 65,000 and 300,000 polys. As a rule, the smaller the details of the map, the more polys you will need. If you're displacing pretty rough objects like stone cladding, choose a lower subdivision level and add small details with a bump map. It works fine.
10) Now your object is so high-poly that you would probably won't be able to export it as it is. What you need to do is cut this mesh into several objects so the meshes are smaller and Blendigo doesn't choke on exporting a huge mesh. If you look at the rug in my interior image, it was actually eight different objects. In order to do that nicely, use the top view (assuming your plane is flat) and go into edit mode with the "face select" option. Then highlight about half the faces of your plane. Back into object mode, duplicate your object, then go back into edit mode and delete the faces you've highlighted (very important: do not delete the vertices or it will make a hole between your two objects). Go back to object mode, select the second copy of your object, go into edit mode, in the "select" menu pick "inverse", then delete those faces. Now you've got two objects that appear as one. You should do this a couple of times so you end up with six to eight different objects.
Another way to lighten the geomtry if you're doing a huge brick wall for instance is to displace one small plane corresponding to one tile of your texture, then create instances of this plane (using Alt+D in object mode) and position them exactly next to each other so that the transition between them is seamless. Using instances means Blendigo will export all the objects into Indigo but only one mesh, which saves a lot of memory. That's how I did my brick wall in the interior image and the pebbles in the bathroom.
So, that pretty much sums it up. Let me know if anything's not clear.

Vanessa07
Posts: 312
Joined: Mon Sep 24, 2007 11:17 pm
Location: Suisse

Post by Vanessa07 » Wed Dec 19, 2007 12:13 am

Thank you so much for you reply, nice web site :wink:

I try it

see you in finished artworks... :D :o

I didn't see the post "trying to displace from blender" :oops: :oops:

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed Dec 19, 2007 7:01 am

:shock: Large blocky list xD
If you'd hit Enter a bit more often, it would be far more readable :)
1) Create a rectangular plane with UVs (for a flat rug I use "unwrap", "project from view") and load your displacement map in the UV window. Tweak the position of the map, tiling and so on until you're satisfied.

2) Create a Blender material for your mesh, go to the texture tab and create an image texture (your displacement map).

3) Go back to the material tab. On the right of the screen you have three bookmarks that say "texture", "map input", and "map to". In map input select UV instead of Orco.

4) Now go back to your plane in edit mode. For nice displacement, your polys need to be as square as possible. So if you have created a 1x2 plane, add an edge loop in the middle so it is made of two roughly square polys.

5) Return to object mode and "set smooth" your object. In the edit panel, selected modifier -> subsurf and choose "simple subdiv." instead of "catmull-clark".
Subdivide a couple of time.
Now add another subsurf modifier, this time with "catmull-clark", and subdivide again a few times.

6) Now add a "displace" modifier.
Where it says "Texture:" enter the name of the texture you applied to your material (generally it's Tex.001).
Where it says "local" select "UV" instead. That's very important if you want your displacement map and diffuse map to match.

7) Now you should have spikes all over the place. You need to lower the Strength value for nice displacement (generally something like 0.01 or less).

8 ) If the result is too rough, play with the strength value some more and add more subdivision in your "subsurf" modifier. You can even add a third subsurf modifier, but make sure it's always above the "displace" modifier" in the stack (you can move your modifiers around by clicking on the little arrow buttons).

9) Check the polycount of your object. "Nice" displacement, depending on the map, requires something between 65,000 and 300,000 polys.
As a rule, the smaller the details of the map, the more polys you will need. If you're displacing pretty rough objects like stone cladding, choose a lower subdivision level and add small details with a bump map. It works fine.

10) Now your object is so high-poly that you would probably won't be able to export it as it is. What you need to do is cut this mesh into several objects so the meshes are smaller and Blendigo doesn't choke on exporting a huge mesh.
If you look at the rug in my interior image, it was actually eight different objects.
In order to do that nicely, use the top view (assuming your plane is flat) and go into edit mode with the "face select" option. Then highlight about half the faces of your plane.
Back into object mode, duplicate your object, then go back into edit mode and delete the faces you've highlighted (very important: do not delete the vertices or it will make a hole between your two objects).
Go back to object mode, select the second copy of your object, go into edit mode, in the "select" menu pick "inverse", then delete those faces.
Now you've got two objects that appear as one. You should do this a couple of times so you end up with six to eight different objects.
Another way to lighten the geometry if you're doing a huge brick wall for instance is to displace one small plane corresponding to one tile of your texture, then create instances of this plane (using Alt+D in object mode) and position them exactly next to each other so that the transition between them is seamless.
Using instances means Blendigo will export all the objects into Indigo but only one mesh, which saves a lot of memory.
That's how I did my brick wall in the interior image and the pebbles in the bathroom.
-> add links to the examples and you have your finished tutorial :mrgreen:

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Wed Dec 19, 2007 10:51 am

Yes Kram. That did look a bit intimidating. Would you add the links for me too? :lol:

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed Dec 19, 2007 10:55 am

:lol: lazy :P
Sorry, I'm too busy with being lazy myself :twisted:

pxl666
Posts: 308
Joined: Wed Oct 10, 2007 10:10 pm

Post by pxl666 » Mon Dec 24, 2007 11:21 pm

BbB - many thxx for this tut - it gives wonderful results !!!

BTW - to lighten the meshes i recommend use of DECIMATE mod but u need to remap UVs then

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Wed Dec 26, 2007 10:11 pm

pxl666
Hi there. No problem. How do you use the decimate mod and what does it do? Sounds interesting.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu Dec 27, 2007 1:06 am

He uses the decimate modifier, by adding it in the modifier stack and it reduces poly count ;)

pxl666
Posts: 308
Joined: Wed Oct 10, 2007 10:10 pm

Post by pxl666 » Thu Dec 27, 2007 6:57 am

yapp - decimator cuts polys down - the big problem after then is need for remapping UV - as the topology changes completely

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu Dec 27, 2007 10:13 am

...and it might lead to strange situations...
But I saw some interesting vids, when it first was developed... The modifiers can be animated by Empties. This can look very interesting, in some cases :)

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Thu Dec 27, 2007 5:49 pm

Might be a problem if it screws up the UVs, as they're pretty crucial to the displacement....

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri Dec 28, 2007 10:14 am

Well... you should try it. It could be, that this isn't that a big problem, as the modifiers work layered...
The original displacement and subdivision modifiers see a(n after subdivision) very highpoly plane. The displacement already is done. THEN, it gets decimated...

Could be completely wrong, in this case, though.. dunno...
And it wont work that nice with meshes, which aren't originally planes...

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Fri Dec 28, 2007 12:29 pm

I'll give it a go then.

Viking
Posts: 1
Joined: Thu Jun 16, 2016 9:13 pm

Re: Displacement

Post by Viking » Thu Jun 16, 2016 9:20 pm

new from Australia, must say good example by BbB!

Post Reply
15 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 22 guests