07/29/2012

sample for texture of NwCreate

It is a very small sample that should create a basic texture map. This is built with Navisworks 2012. To work with the sample,

1) copy the project to <Navisworks Manage 2012>\api\nwcreate\examples, thus the project setting does not need to modify

2) switch the configuration to Win32 or X64 per your machine OS

3) The EXE will be exported to

Win32: <Navisworks Manage 2012>\api\nwcreate\release

X64: <Navisworks Manage 2012>\api\nwcreate\release\X64

4) on X64, make a copy of <Navisworks Manage 2012>\api\nwcreate\release\nwcreate_data to <Navisworks Manage 2012>\api\nwcreate\release\X64. These are required files, but installation missed to make a copy in release\X64.

5) build and run, you should get a file called "test.nwc" in the same directory as the source code,

6) load the nwc ro Navisworks you should see a material in Presenter.

7) switch into full render by ViewPoint tab >> Render Style to see the geometry with the texture.

The sample code creates a basic Presenter material with a texture map that is repeated ("wrapped image"), and it just specifies a basic "phong" reflectance shader. You should be able to attach the Presenter material to a node using LiNwcNodeAddAttribute

Additional information:

- A Presenter material has 5 classes of shader. You normally have to specify at least the "color" shader, the other shaders are optional.

- Best way to understand is probably to switch your Presenter into "Advanced" mode (Global Options -> Tools -> Presenter -> Profile -> Advanced). Then load a file that contains some Presenter materials (I think the Ice Stadium example file does). Then double-click on a material, and you should see a tab for each type of shader (e.g. color, reflectance...).

- Each shader type (or class) can have one of several shaders, and each shader has different arguments. The complete list is described in the "shaders.chm" file that ships with the product (you should be able to find it, think it's in the COM/documentation) directory. Should be pretty straightforward to understand.

Comments

It is a very small sample that should create a basic texture map. This is built with Navisworks 2012. To work with the sample,

1) copy the project to <Navisworks Manage 2012>\api\nwcreate\examples, thus the project setting does not need to modify

2) switch the configuration to Win32 or X64 per your machine OS

3) The EXE will be exported to

Win32: <Navisworks Manage 2012>\api\nwcreate\release

X64: <Navisworks Manage 2012>\api\nwcreate\release\X64

4) on X64, make a copy of <Navisworks Manage 2012>\api\nwcreate\release\nwcreate_data to <Navisworks Manage 2012>\api\nwcreate\release\X64. These are required files, but installation missed to make a copy in release\X64.

5) build and run, you should get a file called "test.nwc" in the same directory as the source code,

6) load the nwc ro Navisworks you should see a material in Presenter.

7) switch into full render by ViewPoint tab >> Render Style to see the geometry with the texture.

The sample code creates a basic Presenter material with a texture map that is repeated ("wrapped image"), and it just specifies a basic "phong" reflectance shader. You should be able to attach the Presenter material to a node using LiNwcNodeAddAttribute

Additional information:

- A Presenter material has 5 classes of shader. You normally have to specify at least the "color" shader, the other shaders are optional.

- Best way to understand is probably to switch your Presenter into "Advanced" mode (Global Options -> Tools -> Presenter -> Profile -> Advanced). Then load a file that contains some Presenter materials (I think the Ice Stadium example file does). Then double-click on a material, and you should see a tab for each type of shader (e.g. color, reflectance...).

- Each shader type (or class) can have one of several shaders, and each shader has different arguments. The complete list is described in the "shaders.chm" file that ships with the product (you should be able to find it, think it's in the COM/documentation) directory. Should be pretty straightforward to understand.