Displacement Map test scene.

Tutorials/guides/tips on how to use Indigo and the Indigo exporters
Post Reply
3 posts • Page 1 of 1
dmn
3rd Place Winner
Posts: 243
Joined: Thu Dec 21, 2006 6:42 pm

Displacement Map test scene.

Post by dmn » Fri Feb 14, 2014 8:33 am

Displacement mappings, whether they come from textures or shaders, are a useful way of adding geometric detail to a model, without having to deal with an extremely high poly count in your modelling software. That said, actually using them can be a bit more complicated than a bump map or a normal map. Even so Indigo is constantly progressing towards a better future, and what I write here may not be true in the future. And I'm no expert, although I've been attempting to become adept at this program since 0.7tsomething, so take what I say with a grain of salt. :mrgreen: Partially also, I'm putting this here so if I ever forget this stuff I can find it easily again. And if I'm doing it wrong please let me know.
First hurdle. The preview scenes are difficult to use IMO for setting up displacement materials. I'm never quite certain what scale they are at, the number of subdivisions on the preview mesh seems kind of low, and its small complex geometry is geared towards testing other characteristics of the material.
Having a test scene in your modeling package gives you control over mesh subdivision surfaces. You can also control other things like lighting and scale easily. I think it's a good idea to create your own test scene with much simpler geometry. I've attached a simple test scene in .pigs and .blend format that can be used to create a displacement material in the indigo gui or blender.
ImageImageImage

Second hurdle. subdivision of a mesh is essential in order for displacement to work. A non-subdivided mesh with a displacement material will simply look like you extruded the face. Subdivision breaks the mesh faces down into much smaller faces. Indigo has its own mesh subdivision. You may not need your modelling package's subdivision capability.
In blender, in the properties panel > object data > indigo object settings: here you can set the number of subdivisions and some other preferences.
In sketchup, right click on your object/mesh > Skindigo > edit active mesh: brings up the mesh settings panel.
In indigo gui : currently not possible to modify subd? must go into text editor and manually insert subdivision code?

Tip: The stone texture has smoothing turned on the displacement map texture dialog, the brick and grass have smoothing turned off.

I wonder: 1) is it possible to use isl to disturb a displaced mesh. e.g. the grass, with a noise shader push the grass around to make it lean, or even make crop circles. 2)Is it possible to use isl to place mesh instances on a surface? 3) is it possible to get light transmission in the higher elevated polys of the displacement map, to differentiate between stones and mud or grass and ground? perhaps using a blend map? My guess on this is no, use separate grass and stone objects at that point, but I ask anyway. 4) can displacement without texture or subd be used to auto-bevel objects?

I have to go shovel the side walk now...16" of snow, yay.
Attachments
cube_test.Scene.00001.pigs
packed indigo scene
(253.5 KiB) Downloaded 254 times
cube_test.rar
blender file
(97.88 KiB) Downloaded 246 times

User avatar
bubs
2nd Place Winner
Posts: 614
Joined: Fri Jul 22, 2011 8:46 pm
Location: UK

Re: Displacement Map test scene.

Post by bubs » Fri Feb 14, 2014 10:29 pm

Nice one! Displacement on the test scene has been a (minor) gripe for a long time.
dmn wrote:In indigo gui : currently not possible to modify subd? must go into text editor and manually insert subdivision code?
Out of interest, do any of you coding gurus know how to do this? Might help for the standard test scene...

User avatar
yonosoy
Posts: 512
Joined: Sat Dec 01, 2012 9:45 pm
Location: Spain

Re: Displacement Map test scene.

Post by yonosoy » Sat Feb 15, 2014 1:28 am

Code: Select all

 
(a complete example)
       <mesh>
        <uid>20</uid>
        <name>Mesh 98</name>
        <max_num_subdivisions>0</max_num_subdivisions>
        <subdivide_pixel_threshold>4</subdivide_pixel_threshold>
        <subdivide_curvature_threshold>0</subdivide_curvature_threshold>
        <displacement_error_threshold>0</displacement_error_threshold>
        <view_dependent_subdivision>true</view_dependent_subdivision>
        <subdivision_smoothing>true</subdivision_smoothing>
        <normal_smoothing>false</normal_smoothing>
        <merge_vertices_with_same_pos_and_normal>false<merge_vertices_with_same_pos_and_normal>
        <wrap_u>false</wrap_u>
        <wrap_v>false</wrap_v>
        <view_dependent_subdivision>true</view_dependent_subdivision>
        <scale>1</scale>
        <external>
            <path>mesh_269704800_724.igmesh</path>
        </external>
    </mesh>

(preview_sphere material  scene)
	<mesh>
		<name>preview_sphere</name>
		->fill with the lines precissed
		 <normal_smoothing>true</normal_smoothing>
		<external>
			<path>preview_sphere_5.igmesh</path>
		</external>
	</mesh>
Must be so easy like this ... code is code for indigo... every scene has the same consideration (hope).

Edit: the mesh is this:

<mesh>
<name>preview_sphere</name>
<max_num_subdivisions>3</max_num_subdivisions>
<normal_smoothing>true</normal_smoothing>
<external>
<path>preview_sphere_5.igmesh</path>
</external>
</mesh>

Raise the value of max subdivisions.... (precipitation posting...). Sorry.
"... the hamster don't see the wheel, and this wasn't said before." (yoS eidaN "el Olvidao")
"... nor 0.2 galaxys, nor 0.8 little chikens ..."


https://www.instagram.com/yonosoy_nada/

Post Reply
3 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests