[ISSUE] - ISL is not working as expected [SOLVED]

Feature requests, bug reports and related discussion
Post Reply
12 posts • Page 1 of 1
User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

[ISSUE] - ISL is not working as expected [SOLVED]

Post by psor » Tue Sep 22, 2009 12:27 am

:: If you're lazy then jump to the solution straight ahead. ;)


I was trying to play with the Indigo Shader Language and ran into a show stopper.
If I put a shader into another channel then albedo it will not work. This makes me a
bit sad cause I was trying to use a shader in the bump and specular channel.

So probably it's not a bug and you just haven't implemented it completely, but it
isn't mentioned anywhere and this is a bit sad. I would love to use it. To be honest
I'd rather like to use it for bump/displacement mapping then in the albedo channel.


Error message -> <bump>

Code: Select all

Error: SceneLoaderExcep: Couldn't find function eval()

Error message -> <exponent>

Code: Select all

Error: Indigo will close: Shader runtime error: No UV set with index 72609008 defined for geometry

Error message -> <displacement>

Code: Select all

Error: SceneLoaderExcep: Couldn't find function eval()

Note: I was playing with the official Material Scene and Indigo 2.2.1.

And because I'm already here ... haha. I'd like to know why those cool shaders
do not work anymore. Is the blending still working?

Did you get rid of the fbm stuff? :( :twisted: :roll: :wink:


If I use this shader ...

Code: Select all

                  def eval(vec3 pos) real :
                     mul(
                        fbm(
                           mul(getTexCoords(0), 100.0),
                           10
                        ),
                        0.001
                     )

I am getting this error ...

Code: Select all

Error: SceneLoaderExcep: eval(vec3) must return vec3.
:( :( :(





take care
psor
Last edited by psor on Wed Sep 23, 2009 2:27 am, edited 1 time in total.
"The sleeper must awaken"

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [BUG] - ISL is not working as expected

Post by fused » Tue Sep 22, 2009 1:20 am

hey psor,

the channels need different function parameters and return types.

displacement/bump:

Code: Select all

def eval() real :
albedo/emission.

Code: Select all

def eval(vec3 pos) vec3 :
sigma/exponent:

Code: Select all

def eval(vec3 pos) real :
did i forget any?

to make the shader work in bump:

Code: Select all

                  def eval() real :
                     mul(
                        fbm(
                           mul(getTexCoords(0), 100.0),
                           10
                        ),
                        0.001
                     )

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [BUG] - ISL is not working as expected

Post by psor » Tue Sep 22, 2009 2:43 am

Thank you fused, this looks good. Small issue tho. When I'm trying this on the material scene
I am still running into this error ...

Code: Select all

Error: Indigo will close: Shader runtime error: No UV set with index 72609008 defined for geometry

And because we are talking. I'm trying Ono's marble shader ...

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<scenedata>
   <material>
      <name>previewmaterial</name>

      <phong>
         <texture>
            <path>marble_src.jpg</path>
            <exponent>2.2</exponent>
            <uv_set>uv</uv_set>
         </texture>
         <diffuse_albedo>
            <shader>
               <shader>
                  <![CDATA[
                     def col(real x) vec3 :
                        sample2DTextureVec3(0, vec2(x, 0.5))
                           
                     def eval(vec3 pos) vec3 : 
                        col(
                           add(
                              dot(pos, vec3(10.0, 10.0, 10.0)),
                              mul(
                                 fbm(
                                    mul(
                                       pos,
                                       100.0
                                    ),
                                    10
                                 ),
                                 0.05
                              )
                           )
                        )
                  ]]>
               </shader>
            </shader>
         </diffuse_albedo>

         <ior>1.4</ior>

         <exponent>
            <constant>1000.0</constant>
         </exponent>
      </phong>
   </material>
</scenedata>

... and get this:

Code: Select all

Error: Indigo will close: Shader runtime error: No texture with index 72674544

Any hint? Your help is much appreciated! :D :wink:





take care
psor
"The sleeper must awaken"

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [BUG] - ISL is not working as expected

Post by fused » Tue Sep 22, 2009 6:06 am

it seems indigo fails to parse the tex coord correctly? weird issue. i'll try it myself...

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [BUG] - ISL is not working as expected

Post by fused » Tue Sep 22, 2009 7:14 am

works perfectly fine here. maybe it a text enocoding thing? which editor do you use? have you tried editing the igs with notepad.exe?

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [BUG] - ISL is not working as expected

Post by psor » Tue Sep 22, 2009 8:39 am

Hmm, kinda confusing. :mrgreen: :wink:

I created an igm with notepad++ and included the file in blender as an external material.
I'm wondering cause if it is a problem caused by the text encoding, why is indigo giving
an error on the uv map index? Please do me a favor and attach the material you've
been using as an igm so I can give it a try and see if this will solve my problem. ;)



take care
psor
"The sleeper must awaken"

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [BUG] - ISL is not working as expected

Post by fused » Tue Sep 22, 2009 8:57 am

sure. you#ll have to replace the texture...
Attachments
preview.igm
(1.65 KiB) Downloaded 177 times

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [BUG] - ISL is not working as expected

Post by psor » Wed Sep 23, 2009 2:25 am

Dude, ... fused you confused me! :twisted: :mrgreen: :lol: :lol: :wink:

To make a long story short I've to tell you, yours didn't work either. To make yours and our
life easier I have to announce the bad, bad, very bad guy is ...

"The Official Material Preview Scene"

It just sucks monkeyballs. :mrgreen: :mrgreen: :mrgreen:

I wanna meet the person that can render the scene with an external IGM and then I'll
ask how he/she did it and will jump from the next bridge. When I do render the scene
with your material included it will give me again errors over errors like I did point out
in my very first post in this thread.

After I tried your material, yes I changed the texture ;) ... and it failed again, I was
hit by a flash, so queue the music and please listen properly. As I used the included
IMPmatdb.igs from the official material preview scene and change the include to
your/my/or what ever material/shader --- IT WORKS! Again, if I do not export from
blender but rather change the include to point to my .igm file it is working.

So, what the heck is going on with the blender scene that is being provided in the zip?

I'm no blenderhead yet, but I'm on it. So I was a bit helpless in that case. Because
I'm very eager to solve these kinda problems I started my workhorse 3dsmax and
was tossing in an exported VRML file of the blender scene and prepared it to look like
the original.

What can I say, it is working now and I'm a very happy fellow. So very soon I'll provide
the 3dsmax 2010 scene and hope suvakas and all other 3dsmax guys will be as happy
as I am ... hehe. 8) ;)

So again, this is not a bug, it is an issue with blender, or the blender exporter. I dunno,
this is just my experience and I'm the messenger to tell. I'm wondering why nobody else
had this problem yet. :roll:

FYI

Code: Select all

OS: Windows XP
Indigo 2.2.1
Blender 2.49 with blendigo 2.2.1 :: FAILED
3dsmax 2010 with maxigo 2.0 beta 2 :: OK
I wish that somebody takes care of this issue. This is causing a lot of headaches.


edit: To give you a small preview of how it looks like when I'm exporting from
3dsmax with a .igm file as external material. Thank you suvakas! I'll have some
suggestions soon. ;)

Image





take care
psor
Last edited by psor on Wed Sep 23, 2009 3:02 am, edited 1 time in total.
"The sleeper must awaken"

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: [ISSUE] - ISL is not working as expected [SOLVED]

Post by CTZn » Wed Sep 23, 2009 2:38 am

No pun intended nor anything personal psor, but damn, on my behalf bugs should be submitted to exporters writers first for analysis.

It's very common to think the bug is caused by Indigo coz it just pops the error.

In fact, if there is an handled error, then is is likely to be a scene/exporter mistake !!!
obsolete asset

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [ISSUE] - ISL is not working as expected [SOLVED]

Post by psor » Wed Sep 23, 2009 2:45 am

@CTZn

Probably you're right mate. I was just very confused cause there was the official
scene, there was blendigo and a lot of people seem to care to upload stuff to the
material database. So it looks like nobody had experienced this issue. :roll: :wink:


As far as I'm concerned I'll try to do my very best in the future to keep the stuff
separated. Hey, ... I said I'll try! :mrgreen: :mrgreen: :wink:


edit: And of course it was also me who was pasting a wrong shader into
an element that does not allow vec3, real and vice versa. This was caused by
not paying attention to the Technical Manual. :oops: :lol: :wink:





take care
psor
"The sleeper must awaken"

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: [ISSUE] - ISL is not working as expected [SOLVED]

Post by suvakas » Wed Sep 23, 2009 3:09 am

@psor
Am I understanding it right, that you re-created the MDB scene in Max ?
If so, then why? Did you encounter similar problems with MDB preview that comes with Maxigo ?

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [ISSUE] - ISL is not working as expected [SOLVED]

Post by psor » Wed Sep 23, 2009 3:32 am

I wasn't very happy with the preview cause it lags subdivision, especially when
I do use an external shader ...

Image

As you can see, it's the same shader as above. And on the other hand I wanted
to use the scene for myself, so I can tune it and fill my matDB with it. With tuning
I mean that for different shaders it's good to have slightly different objects. For
example if I wanna test a new shader for tissue/fabrics and so on. Anyway
I did it already, ... hahahaha. :mrgreen: :wink:

edit: Ahh, almost forgot, that in the original scene the base has crippled
normals caused by scaling. So I was reseting the scaling and transformation
in max. I had to redo the UVW's anyway. ;o)






take care
psor
"The sleeper must awaken"

Post Reply
12 posts • Page 1 of 1