Jump to content

Marmoset Toolbag Shaders?


SlipperyBrick
 Share

Recommended Posts

Hi Guys,

 

Just posting here cos I am gonna be getting Marmoset Toolbag 2 for some personal portfolio work. I have a question about the shaders.

 

Bring the power and fidelity of Marmoset Toolbag’s shaders into your own project. Configurable, user-editable ShaderLab source-code is included for:

 

Does this mean that I can get the source code for the shaders and use them in my Leadwerks projects? Or am I not understanding this properly lol?

 

Here is a list of the shaders

  • Blinn-Phong & Lambertian shading
  • Gloss maps (per-pixel specular sharpness)
  • Normal, diffuse, and color specular maps
  • Specular fresnel
  • Emmisive/Glow
  • Shadows
  • Light Gels/Cookies
  • Light maps
  • Light probes
  • Transparency & simple glass
  • sRGB color correction & linear color rendering

 

If this is possible how would I use them as well. I have no shader knowledge at all sad.png

Link to comment
Share on other sites

It will need to be adapted i think to LE3 rendering/shadows system ?

I don't know finally, like NEoSys GUI System, better as Marmoset guys if they would like to port shader and system to LE3 ?

Im' not guru shader, i don't know what is involved behind the scene.

 

Why not , LE3 advanced image based shaders doing almost as great as UE laugh.png physically based shaders, any real improvment extension is welcome to LE3.

 

It would be a new rendering engine almost ,specially on characters

08-Final.png

 

11-aniso-closeup.png

 

 

But be aware that this is image based lightening, this means the lightening and reflections will come from image background, not from lights. Or am i wrong ?

 

Anyway even image based , seeing the quality it's amazing and ok for in game.

Stop toying and make games

Link to comment
Share on other sites

You have the source code for the shaders when you buy Toolbag 2. Only problem is LE3 uses OpenGL which I think uses the 'OpenGL Shading Language'.

 

Toolbag 2 shaders are made with ShaderLab. I think this is for Unity only. So I don't think it will work, may be the shader god's can answer our questions?

 

*Shout of the Shader God's, Klepto, Shadmar*

Link to comment
Share on other sites

ahhaahh, yes shader Gurus biggrin.png

 

Can it be mixed with dynamic lights system shaders ?

 

I found these infos also :

Performance -

All shaders are highly optimized, and all features easily configurable. The overhead for our precomputed IBL consists of just two cubemap lookups, and RGBM-decoding of HDR textures is similarly lightning-fast.

 

HDR(!) -

High dynamic range skies are handled with .hdr & .pbm importers, and turned into RGBM textures during import. All the shaders handle RGBM cubemaps as well, allowing for super light-weight HDR without floating-point textures or any hardware restrictions; HDR that'll run on a phone!

 

Gamma Correct -

Much care is taken to do all the fancy maths and light convolution in linear color-space. All output textures will work in both Linear and Gamma color-space so both Pro and Free versions of Unity are supported.

 

Mipmapped Gloss -

The specular cube-map also stores varying gloss levels in the different mip-map levels, allowing for blurry specular reflections that gloss-maps can blend between. A custom cube-map importer saves and manages these mip levels behind the scenes.

 

Sky Objects -

The IBL cube-maps can be stored and managed by a custom Sky object in your scene. Sky objects are treated as ambient light-sources and work along-side Unity's direct lights. They also take care of binding all cube-maps, skyboxes, and exposure settings to our IBL shaders globally, making swapping out skies and messing with exposure through scripting very easy.

 

Lightmaps & Probes -

Skyshop's shaders work in tandem with Unity's lightmaps and light-probe illumination. Compliment bounced lighting from near-by surfaces with distant ambience and lighting from the entire sky, all while preserving specular and normal-map detail.

Stop toying and make games

Link to comment
Share on other sites

We should ask Marmoset if they could port shaders ? Would be another LE3 quality extension bringing loud and strong stuff biggrin.png

Personnaly i would see no problem to make some game using image based lightening, specially when that allows really advanced shaders.

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

I'll defo ask about using the source code for the shaders in another application. I don't know the implications of this though. You need a licence for Toolbag 2 and its per seat. If I was to use the shaders in another program I don't know if that is breach some terms in my licence.

 

I'll ask Marmoset and let Josh know about it and see what can be done. I know that Quixel uses Marmosets rendering engine for their nDo and dDo suite so why not Leadwerks! :D

Link to comment
Share on other sites

I'll defo ask about using the source code for the shaders in another application. I don't know the implications of this though.

 

You buy and use on your projects, indeed it needs you to buy and use Marmoset Skyshop tool.

 

If I was to use the shaders in another program I don't know if that is breach some terms in my licence.

 

 

You are allowed to use it for the engine you baught it, if you baught one license for LE3 you can only use it and sell games with LE3 engine.

 

 

I'll ask Marmoset and let Josh know about it and see what can be done

 

How many LE3 users would be interested ? It should be enought to make Marmoset worth it to integrate in LE3.

From what i read Substance and Skyshop Marmoset can do good combination also.

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

I know that the shaders can be used in UE4 because they are physically based. I don't know if Leadwerks could handle this at the moment though, Josh explained some stuff to me last night as I asked him if I could use a gloss material in an alpha channel. He explained about buffering issues though which wouldn't allow it.

 

So I'm not to sure if this could be integrated in, if it does then it would defo require ALOT of work :P

Link to comment
Share on other sites

Ok, more important is Neosis as LE3 didn't had nothing.

 

For metal, there is a tricky way using environment map on surface , more or less reflective depending on your alpha map, i posted the shader on downloads (it will need normal map)

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

Ok, more important is Neosis as LE3 didn't had nothing.

 

For metal, there is a tricky way using environment map on surface , more or less reflective depending on your alpha map, i posted the shader on downloads (it will need normal map)

 

How would this work? I tried using the environment shader and I put a gloss effect in my alpha channel and that didn't work :(

Link to comment
Share on other sites

I meaned a base to work on can be this one :

http://www.leadwerks.com/werkspace/files/file/531-environment-alpha/

Adding normal map and specular, this could be great, as you would put environement reflection on the metal parts not rusted for example.

 

I fixed alpha values and have already a good range of reflectivity in LE3 :

enrange.jpg

 

The problem is that we loose the base color of diffuse.

We would need to have some diffuse color conservation and blend over the sky texture to some percentage or based on alpha map.

 

This is what is missing in LE3 shader, as you can see on Skyshop examples , the base color diffuse is keeped, not overwrited by environment map.

ss_materials.png

Stop toying and make games

Link to comment
Share on other sites

Ahh cool. I'm at work at the mo but I will defo check this out when I am home. I have bought the Quixel Suite as well for dDo2, nDo2, MegaSCANS and the new PBR viewer 3DO.

 

I am hoping to put this to use as the textures you can get and the detail from your textures are amazing. I hope Leadwerks will get PBR support :D

Link to comment
Share on other sites

I just got confirmation from Mark at Marmoset Co. The shaders won't work with any software. They have only been designed to work with Toolbag 2 and Skyshop has been designed to work for Unity only sad.png

 

You can edit the source code but the language it has been written in is only supported by a custom shader language for Unity.

 

There is no way to port the code over as all code is exclusive to ShaderLab only. Marmoset only advertise the fact that you can have the full source code for the shaders to edit in ShaderLab to make your own custom shaders.

Link to comment
Share on other sites

Ok.

 

I think using smart tricks on shaders we could achieve same aspect shaders perhaps not as good , but good enought

- Roughness : can be achieved by blurring less or more the environment map

- Metal : the environment map less or more reflective and color based

 

There is LUT open source shader framwork, seems it's Unity, but shader remain shader, the maths and way of doing these shaders remains the same even if the language have some differences.

Could be also something to look at and pick up the good algorithms perhaps.

It is even some clear code on their site like :

float3 FresnelSchlick(float3 SpecularColor,float3 E,float3 H)
{
   return SpecularColor + (1.0f - SpecularColor) * pow(1.0f - saturate(dot(E, H)), 5);
}
FresnelSchlick(SpecularColor, L, H) * ((SpecularPower + 2) / 8 ) * pow(saturate(dot(N, H)), SpecularPower) * dotNL;


float3 FresnelSchlickWithRoughness(float3 SpecularColor,float3 E,float3 N,float Gloss)
{
   return SpecularColor + (max(Gloss, SpecularColor) - SpecularColor) * pow(1 - saturate(dot(E, N)), 5);
}
float3 SpecularEnvmap(float3 E,float3 N,float3 R,float3 SpecularColor, float Gloss)
{
   float3 Envcolor = texCUBElod(EnvironmentTexture, float4(R, EnvMapMipmapScaleBias.x * Gloss + EnvMapMipmapScaleBias.y)).rgb;
   return FresnelSchlickWithRoughness(SpecularColor, N, E, Gloss) * Envcolor.rgb * EnvMapScaleAndModulate; // EnvMapScaleAndModulate is used to decompress range
}

 

 

http://seblagarde.wordpress.com/2011/08/17/hello-world/

Stop toying and make games

Link to comment
Share on other sites

@shadmar :

When you have time could you translate the first to test in in LE3 ? I total newb in shader code almost.

I'm curious to see if that could work ?

float3 FresnelSchlick(float3 SpecularColor,float3 E,float3 H)
{
return SpecularColor + (1.0f - SpecularColor) * pow(1.0f - saturate(dot(E, H)), 5);
}
FresnelSchlick(SpecularColor, L, H) * ((SpecularPower + 2) / 8 ) * pow(saturate(dot(N, H)), SpecularPower) * dotNL;

 

 

The Goal is to colorise for example the shader to some Silver color :

roughnesschart.png

 

To make it rought, we just have to use actual working previous code (alpha + environment) :

More alpha transparent = less roughness

Less alpha transparent = more roughness

So we can make rought variation on a same object using alpha.

 

We just need how to colorize environement map with a color or with Diffuse texture.

Stop toying and make games

Link to comment
Share on other sites

This is HLSL, so for float3/4 you want to use vec3/4, and saturate is same as clamp in GLSL.

The math is basicly the same, but you have to translate the uniforms and attributes to match Leadwerks ones.

 

Shadmar went all crazy on us YouGroove lol. All I know is writing shader code requires you to work with number matrices and I don't like them. They look scary and from what I can gather that's the simple part of writing the code lol.

 

I would like to get into how it all works and I've been reading shader code for OpenGL for 20 mins a day trying to learn it on the side (just to keep the synapses going tongue.png) but I still can't make sense of it fully sad.png

 

Oh just to add. Here is Mark's reply when I spoke with Marmoset about using the shader code.

 

Hey David,

Thanks for contacting us and thanks for the support of Toolbag. We should clarify that Toolbag 2 does not ship with the full source code. The shader code is readable and editable, but you essentially can only edit what shader features are already provided; you won't be able to add parameters or custom features to the shaders.

Our second product, Marmoset Skyshop: image-based lighting tools and shaders for Unity, does ship will complete shader source. Any projects/games developed in Unity using Skyshop can certainly edit the Skyshop shaders as needed and ship with those customized shaders.

Hope this clears things up for you. If you should have any further questions, please don't hesitate to ask!

Link to comment
Share on other sites

Yes, must not be easy to integrate shaders.

I also don't want to put all my time on shaders, i prefer 3D art making and gameplay coding.

 

Anyway, the day someone is interested in doing some specific shaders there is Lux open shader framework to dig and study for any maths or how do do specific formulas smile.png

Stop toying and make games

Link to comment
Share on other sites

Why displacement ? Because above shaders just use diffuse , normal and environment maps.

Some from Marmoset picture on the right don't have diffuse , but only a color + environment + roughness factor.

 

 

Here is two interesting textures from CGTextures, i can't give you generated normal map or .tex files as this is too much volume file sizes. Just generate normal map from LE3 pushing bumpiness factor to the max (0.8 ).

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...