.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Material Object (render) with c#

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
436 Views, 2 Replies

Material Object (render) with c#

Hi guys..
I'm going to build with code a material..in c#.

I have a serious problem with the diffuse assignment...
MaterialMap constructor assigned with "New" don't run correctly...IMHO.

please take a look at the material3.jpg !
Here the constructor MaterialMap with the parameters "source = 1" (file) perform the constructor...and the result is source = "scene" (0)

So i'm not able to use a texture for the Diffuse material's component 😞 😞

What can I do ?

is there a my wrong ? where is it ? I ' can't see it!
what
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

please take a look here! this is my debug window
Message 3 of 3
Anonymous
in reply to: Anonymous

This is kindof late, however, somebody searching for the answer in the future could make use of this:

Don't use MaterialTexture, use:

GraphicsInterface.ImageFileTexture

if the diffuse source is from an image file. You would use the MarbleTexture class for marble, and WoodTexture class for wood.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost