Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 27-06-2013 , 07:44 PM
Registered User
Join Date: May 2013
Posts: 11

$include error

New to script writing, I tried using a script from a book and it gave me this error.

What does that mean? seems "$include" is fairly common. So not sure exactly is wrong.

Attached Thumbnails
# 2 27-06-2013 , 08:36 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
It means the variable `$include` was not defined prior to use. Post the whole script if you can.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 3 27-06-2013 , 09:29 PM
Registered User
Join Date: May 2013
Posts: 11
verbose on
link "base.so"
$include <base.mi>

options "opt"
samples -1 1
contrast .1 .1 .1 .1
trace depth 2 2
end options

camera "cam1"
frame 1
output "rgb" "x.rgb"
focal 100
aperture 144.724029
aspect 1.179245
resolution 500 424
end camera

instance "caminst1" "cam1" end instance

light "light1"
"mib_light_point" (
"color" 1 1 1,
"shadow" on,
"factor" 1
)
origin 141.375732 83.116005 35.619434
end light

instance "lightinst1" "light1" end instance

material "mtl" opaque
"mib_illum_phong" (
"ambience" .3 .3 .3,
"ambient" .5 .5 .5,
"diffuse" .7 .7 .7,
"specular" 1 1 1,
"exponent" 50,
"lights" [ "lightinst1" ]
)
end material

object "obj1"
visible shadow trace
group "mesh"
-7.068787 -4.155799 -22.885710
-0.179573 -7.973234 -16.724060
-7.068787 4.344949 -17.619093
-0.179573 0.527515 -11.457443
0.179573 -0.527514 -28.742058
7.068787 -4.344948 -22.580408
0.179573 7.973235 -23.475441
7.068787 4.155800 -17.313791

v 0 v 1 v 2 v 3 v 4 v 5 v 6 v 7

c "mtl" 0 1 3 2
c 1 5 7 3
c 5 4 6 7
c 4 0 2 6
c 4 5 1 0
c 2 3 7 6
end group
end object

instance "inst1" "obj1" end instance

instgroup "world"
"caminst1" "lightinst1" "inst1"
end instgroup

render "world" "caminst1" "opt" # render frame 1

incremental camera "cam1"
frame 2
aperture 100
end camera

incremental light "light1"
"mib_light_point" (
"color" 1 0 1,
)
end light

render "world" "caminst1" "opt" # render frame 2

# 4 27-06-2013 , 10:06 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
It'll help to specify the language because unless I'm losing my mind, this is not MEL.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 5 27-06-2013 , 11:57 PM
Registered User
Join Date: May 2013
Posts: 11
haha kk! thanks 4 the help

# 6 27-06-2013 , 11:59 PM
Registered User
Join Date: May 2013
Posts: 11
i guess its c++, what program do i even use to write c++ into maya

# 7 28-06-2013 , 12:28 AM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
If you're new to script writing and want to do stuff in Maya, I'd definitely start with MEL. There's a lot more resources, Maya tells you exactly what commands it needs (echo commands), and more people here are familiar with it.

Edit: I'm not sure you can even script C++ direct in Maya. Doesn't it need to compile?

# 8 28-06-2013 , 12:30 AM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
# 9 28-06-2013 , 02:16 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
I saw "script writing" and the variable in question and assumed MEL. If you're new to programming then learning C++ via Maya is going to be heavy if not a little crazy. MEL is Maya's native language and is quite powerful. By the nature of C++, the tasks will execute faster but C++ is a whole other exponentially more complex beast.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 10 28-06-2013 , 02:17 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522

If you're new to script writing and want to do stuff in Maya, I'd definitely start with MEL. There's a lot more resources, Maya tells you exactly what commands it needs (echo commands), and more people here are familiar with it.

Edit: I'm not sure you can even script C++ direct in Maya. Doesn't it need to compile?

As far as I know yes, a compiler is needed.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 11 28-06-2013 , 04:07 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
That's a mental ray scene file.

And yes, you need to compile your C++ code with the Maya dev kit, linking it to the appropriate libraries and headers.


Imagination is more important than knowledge.

Last edited by NextDesign; 28-06-2013 at 04:56 AM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads