How to assign Octane3dsmax Maps via Maxscript

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
akira
Licensed Customer
Posts: 94
Joined: Sun May 30, 2010 4:33 pm

Hi Mr.Karba, i'm trying to make my own material converter but was stuck at texture assignment:

Code: Select all

$.material = diffuse_material()
Diffuse_Material:Diffuse_Material
$.material.diffuse_tex = alpha_image ()
** system exception **
$.material.diffuse_tex = copy alpha_image ()
-- Unable to convert: Alpha_Image to type: TextureMap

can you tell me if it's possible to do that?

Regards,

akira.
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

this is where I got stuck and couldn't find any way of working it out - if you assign any texture node to the shader node via maxscript gives out a system exception error.. this did work on the previous versions like octane 1.2
- also Karba mentioned somewhere that he doesn't do maxscript..
akira
Licensed Customer
Posts: 94
Joined: Sun May 30, 2010 4:33 pm

So sad to hear that, the built in converter usually assign a rgb image to the opacity slot instead of an alpha image or greyscale image,
Without maxscript automation, I have to manually correct them one by one, sigh.
HHbomb
Licensed Customer
Posts: 1378
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

+1 more access and docs for maxscript.
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
Jari
Licensed Customer
Posts: 3
Joined: Tue Nov 11, 2014 8:38 am

I got same issue! I can only switch texture map if I first manually add texture map from material editor. Before that that .diffuse_tex is undefined and I have no idea how to change that with maxscript.
User avatar
Karba
OctaneRender Team
Posts: 2300
Joined: Sat Jun 11, 2011 9:05 am

akira wrote:Hi Mr.Karba, i'm trying to make my own material converter but was stuck at texture assignment:

Code: Select all

$.material = diffuse_material()
Diffuse_Material:Diffuse_Material
$.material.diffuse_tex = alpha_image ()
** system exception **
$.material.diffuse_tex = copy alpha_image ()
-- Unable to convert: Alpha_Image to type: TextureMap

can you tell me if it's possible to do that?

Regards,

akira.
Did you try to change diffuse_input_type first?
0 - float value
1 - color
2 - texture
Jari
Licensed Customer
Posts: 3
Joined: Tue Nov 11, 2014 8:38 am

Yes I did. Could you tell me how your material LiveDB makes the trick when you press "place to active slot of material editor"?
User avatar
Karba
OctaneRender Team
Posts: 2300
Joined: Sat Jun 11, 2011 9:05 am

Jari wrote:Yes I did. Could you tell me how your material LiveDB makes the trick when you press "place to active slot of material editor"?
it is c++ code, no script
akira
Licensed Customer
Posts: 94
Joined: Sun May 30, 2010 4:33 pm

Karba wrote:
akira wrote:Hi Mr.Karba, i'm trying to make my own material converter but was stuck at texture assignment:

Code: Select all

$.material = diffuse_material()
Diffuse_Material:Diffuse_Material
$.material.diffuse_tex = alpha_image ()
** system exception **
$.material.diffuse_tex = copy alpha_image ()
-- Unable to convert: Alpha_Image to type: TextureMap

can you tell me if it's possible to do that?

Regards,

akira.
Did you try to change diffuse_input_type first?
0 - float value
1 - color
2 - texture
yes, i did, and still got the same error.
as you can see the error message said that the Alpha_Image(or RGB_Image) is not the same type as TextureMap.
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

I was looking far all options for hours and tried all workarounds I could think of, frustration set in so I gave up

.. something changed from octane version 1.0 or something and after 1.5 it gave out errors, I have a feeling something in the plugin is maybe differently named, or placed under a different class or something, and only gives out this error on maxscript when trying to some assign texturemap

- maybe rgbimage noise etc aren't of the class texturemap, maybe it's named texturemap2 or something like that and it works out fine in the plugin but not here
Post Reply

Return to “Autodesk 3Ds Max”