PDA

View Full Version : Anyone interested in a glossy reflection shader for 3Delight?


ShaderOp
03-01-2011, 11:19 PM
Hi Everyone.

I have been playing around with the latest release of 3Delight for Softimage, and I was able to hack together a shader that uses the point cloud feature to generate glossy reflection. The results look something like this:

http://dl.dropbox.com/u/7186736/forums/PTC-Glossy-Reflections.jpg

And here's how it looks in the material manager:
http://dl.dropbox.com/u/7186736/forums/PTC-Glossy-Reflections-setup.jpg
It's nothing fancy, but the results look decent enough to me, and it took one minute and seven seconds (1:07) to render on my machine at 720p. Unfortunately, since I don't know how to work with SPDL files, it only works with SI 2011.5 at this stage. If anyone is interested in this I could probably clean it a little, package it up, and upload it somewhere.

And if there's something like this already bundled with 3Delight, then I'm sorry for wasting your time and for not R-ing The FM hard enough.

CiaranM
03-02-2011, 01:20 AM
Hi,
sure I'd love to give it a try! Looks great.
What issues are you having with spdls? I've put together a couple simple 3Delight shaders using spdls - it was daunting at first, but pretty straightforward once you get over the hump.

ShaderOp
03-02-2011, 07:10 AM
sure I'd love to give it a try! Looks great.
There you go then:

SO_3DelightShaders_v0.2.xsiaddon.zip (http://shaderop.com/wp-content/uploads/2011/03/SO_3DelightShaders_v0.2.xsiaddon.zip)

Please do tell me how it goes. I know just enough about RenderMan to be more dangerous than useful, so caveat emptor :)

Just make sure that a point cloud is being generated in your scene, else the shader will default to outputting COLOR(0,0,0).

What issues are you having with spdls? I've put together a couple simple 3Delight shaders using spdls - it was daunting at first, but pretty straightforward once you get over the hump.
It's just that I never worked with SPDLs before, and I noticed that they were deprecated as of SI 2011.5 when I went to look at the documentation. So I didn't bother and used the new Shader Definition feature instead.

And speaking of 3Delight: I'm curious as to why it doesn't seem to be generating much interest in the community, especially considering the rising level of dissatisfaction with with Mental Ray recently. Is it too complicated? Not fast enough? Not documented well enough? Is it lacking any features?

Would love to hear some opinions on that.

Hirazi
03-02-2011, 08:41 AM
Thanks for the shader... :buttrock:

As to the interest for 3Delight: I think everyone assumes Arnold will come with a free license too... :D ;)

CiaranM
03-02-2011, 09:41 AM
Very nice! Although I am getting some artefacts - I'll post a screenshot when I can.

I actually like how you've used the shader definition feature, I think I might go for that in the future. It feels much more modern than spdls, I just wasn't sure 3Delight would support them, so I never ventured into shader defs.
It's a shame you have to go through such silly steps to distribute the .sl file into the 3Delight plugin. I wish they would support more dynamic ways of getting include locations for the compiler. Perhaps the new co-shader command would be a solution for that?

ShaderOp
03-02-2011, 11:55 AM
Thanks for the shader... :buttrock:

Thanks Hirazi. I'll work on a better version based on some info I found in this thread (http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=2387) on 3Delight's Maya forum. I think I should be able to do a better job of exposing some more advanced controls.

I've also just noticed the 3Delight thread of jaw-dropping awesomeness (http://www.si-community.com/community/viewtopic.php?f=24&t=1275) on si-community.com (http://www.si-community.com/). That's one great showcase you have there, especially Piotrek's bison (http://www.si-community.com/community/viewtopic.php?p=8863&sid=86f0e75bc564b482eec49e5e8a73408d#p8863). I definitely need to stop by that forum more often.

Very nice! Although I am getting some artefacts - I'll post a screenshot when I can.
I would appreciate that. Although it seems you know way more on this topic that I do :)

I actually like how you've used the shader definition feature, I think I might go for that in the future. It feels much more modern than spdls, I just wasn't sure 3Delight would support them, so I never ventured into shader defs.
It's a shame you have to go through such silly steps to distribute the .sl file into the 3Delight plugin. I wish they would support more dynamic ways of getting include locations for the compiler. Perhaps the new co-shader command would be a solution for that?
Yeah, I'm not at all happy with the ugly hack I have so far as I'm sure it will fail to copy the RSL file on some setups. I don't know if co-shaders will solve that (and I'm not entirely sure what co-shader are to be honest :) ). But the Shader Defs have this "CodePath" property that can be set to the path of the DLL or SO file that contains the shader's binary file. If 3Delight would read the path to the RSL file from that property, then I think that would solve the problem and make the shaders far more portable.

Perhaps you can pull a few strings with the kind people at DNA Research? I only have a single-seat license with them, so the strings between me and them are rather thin and fragile :)

CiaranM
03-03-2011, 01:12 PM
I would appreciate that. Although it seems you know way more on this topic that I do :)


Sorry, I haven't had a chance to look at this further. To be honest, I'm also just exploring the world of rsl. Really loving it so far. I've mostly been working on particle and volumetric shaders (stuff I'd use for my own work), so haven't spent too much on surface shaders.



Perhaps you can pull a few strings with the kind people at DNA Research? I only have a single-seat license with them, so the strings between me and them are rather thin and fragile :)

I don't think I carry any more weight than other users, but it's nice of you to think so! ;)

Thanks for pointing out the CodePath stuff. The devs are pretty cool guys and have implemented a few features I've asked for in the past, so consider this one requested!
But, the more requests they get, the more likely they'll do something with it. It might also be very cool if they could support a shader language parser definition, so theoretically, we could just source a .sl file and it gets parsed into a render tree node. But, I'll wait to see what all this co-shader stuff is about.

ShaderOp
03-03-2011, 08:29 PM
After some more fiddling around I think I have something better for now. Here's an example:
http://dl.dropbox.com/u/7186736/forums/PTC-glossy-reflections-and-refractions.jpg

That's glossy reflections and refractions generated from 3Delight's point clouds. Both shaders are included in a new download. You can grab it and watch the the how-to video here:

http://shaderop.com/2011/03/glossy-reflection-and-refraction-shaders-for-3delight-for-softimage/

I also added one more utility node called "Bake_Pass_Switch," the purpose of which is to allow an object to use one shader for the point cloud baking pass and the another for the normal rendering pass. It allows for some interesting effects.

Hope someone will find those useful., and feedback is always appreciated.

Now excuse me while I go cross post :)

Hirazi
03-03-2011, 09:16 PM
Great work... (..."and keep 'em coming!") :buttrock:

Hirazi
03-04-2011, 07:23 AM
Sorry for the NOOB question, but what (kind of) documentation did you use to delve deep into Renderman shaders to create this? Does "The RenderMan Interface Specification" suffice or is there more to it ("documentation-wise")?
:blush:

ShaderOp
03-04-2011, 11:33 AM
Sorry for the NOOB question, but what (kind of) documentation did you use to delve deep into Renderman shaders to create this? Does "The RenderMan Interface Specification" suffice or is there more to it ("documentation-wise")?
:blush:
I went through a RenderMan phase a couple of years back where I tried to learn all I can about the subject. The official docs weren't very useful, and most of the books on RenderMan are a little outdated now. But at least I learned enough to know a bit about RSL before coming into this.

What really helped is this paper on point clouds from Pixar (http://graphics.pixar.com/library/PointBasedColorBleeding/paper.pdf), which just gives a general overview of the subject without going into any details, followed by a little googling which led to this uber point cloud shader (http://blog.cameronleger.com/2010/10/05/point-cloud-uber-shader/), and finally some digging around in the RSL shaders that 3Delight compiles and places in the "rsl" folder under an SI project before rendering a scene. Combining all of these together wasn't that hard. In fact, I'm sure that any rendering TD reading this thread will find it hilariously n00bish :)

Hirazi
03-05-2011, 08:39 AM
Thanks for the info. Did you maybe also "dabble" in shader writing in Mental Ray by any chance? And if so, how would you say they compare as far as the inevitable learning curve is concerned?
;)

ShaderOp
03-05-2011, 11:21 AM
Thanks for the info. Did you maybe also "dabble" in shader writing in Mental Ray by any chance? And if so, how would you say they compare as far as the inevitable learning curve is concerned?
;)
I haven't tried, but I did take a look at what was available in terms of books and learning material a while back. From what I have gathered, writing shaders for Mental Ray doesn't compare well to RenderMan, and that's putting it mildly. I think there's only one book that touches on this subject, and it doesn't delve deep into the details. But the real issue is that Mental Ray doesn't have a shading language like RenderMan, so shaders have to be written and compiled in C (or possibly C++, but I'm pretty sure it's just C).

So instead of typing some code in a text editor and hitting "render" to test the results, you would have to edit the code, compile the binaries, reload the plugin, render, crash the whole program if you f-ed up, cuss, rinse, repeat a few times, check Solid Angel's website, and repeat a few times more until you get it right.

Though I doubt I would dislike Mental Ray any less if writing shaders for it was easier. But let's not get into that here. Mental Ray is already getting less love these days than a middle-eastern dictator :)

Hirazi
03-05-2011, 04:12 PM
Thanks again. The necessity to compile shaders in C++ has always been the greatest obstacle so far to attempt writing MR shaders of my own. C++ and I go way back, but we somehow never became friends. (But then again, the new SDK features in SI2012 seem to be a good reason to call C++ once more and ask him, how he's doing...)
:D

ShaderOp
03-05-2011, 05:29 PM
Thanks again. The necessity to compile shaders in C++ has always been the greatest obstacle so far to attempt writing MR shaders of my own. C++ and I go way back, but we somehow never became friends. (But then again, the new SDK features in SI2012 seem to be a good reason to call C++ once more and ask him, how he's doing...)
:D
I used to earn my living coding with C++. Thanks goodness I don't anymore :)

But I wrote some C++ code in one of my extended fiddling-abouts with the SDK, and I've found the C++ API to pleasure to work with. It's very well designed, and very consistent throughout. I think you'll be pleasantly surprised.

Archer1972
07-02-2011, 11:53 PM
This shader doesn't work with the new 3delight (3.0.9)
any updates ?

ShaderOp
07-03-2011, 08:53 AM
This shader doesn't work with the new 3delight (3.0.9)
any updates ?
Hi there,

I would really love to take a look at this issue and get the shaders updated to work with the latest version, but that's not going to happen until after at least a couple of weeks. Reason being that I need to undergo a medical procedure and do a bit of recovery after that. But I promise I'll work on it once I'm up and about.

Really sorry about that.

ShaderOp
07-04-2011, 07:37 PM
Actually scrap all that. I've taken a look at it and the fix turned out to be very simple. Here's the updated, 3Delight 3.09+ compatible, more portable, less hackish version of the shaders:

SO_3DelightShaders_v0.3.xsiaddon.zip (http://shaderop.com/wp-content/uploads/2011/07/SO_3DelightShaders_v0.3.xsiaddon.zip)

Please give it a test and tell me how it goes.

CGTalk Moderation
07-04-2011, 07:37 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.