I recently knew that GLTF format uses PBR workthrough so if I want to use toon shading, I just can’t directly use it cause PBRLighting doesn’t have ColorRamp property
so the only solution I have now is converting PBRLighting to phong Lighting
so I want to ask is there any other solution?
I mean, if you aren’t going to use any of the PBR features then converting to standard lighting (if that’s what’s been working for you) seems like the best choice.
Should be only a few lines of code in a scene graph visitor to convert your model from one material to another and transfer the right textures, etc…
Edit: or if you used JMEC or the SDK to convert your model, you could output the j3m files and just edit them.
Hi
Nothing to add to the topic.
I’m interested to know more about this property in Phong lighting. Can someone please explain what is this for?
Thanks
From the code:
It uses the amount of direct lighting (based on normal, lighting vector, etc.) to lookup a color multiplier.
To me this indicates that you could provide harsh shadows or harsh highlights, etc… depending on how your ramp is setup. Maybe others have more practical examples.
thank you
then I’ll stick with materials converting process
It’s a property to simulate Cel shading, cell shading or toon shading
Thanks
@carpenter I would be interested to see a screenshot of your scene using this effect if you do not mind
This is just a simple scene to experiment on gltf model
Nice!
Are you using a grayscale ramp texture for this?
yes …
the default one in the sdk
Will appreciate if you can upload it here or give me a link to it, please. Unfortunately, I do not have the SDK installed.
Thanks
here it is
the image
https://hub.jmonkeyengine.org/uploads/default/original/4X/1/0/f/10f4a4b8f7a1aa43609e5cae0002aa66021a379e.png
Thanks!
you’re welcome
thank you for your great works