Materials Conversion - Current Issues and Requests

DAZ Studio Integrated Plugin (Integrated Plugin maintained by OTOY)

Moderator: BK

Forum rules
Please keep character renders sensibly modest, please do not post sexually explicit scenes of characters.
User avatar
sikotik13
Licensed Customer
Posts: 270
Joined: Thu Feb 20, 2014 6:21 pm
Location: Iowa, United States

linvanchene wrote:- - -
Very solid points.

I was tempted for a while to maybe just sit back and observe how thing turns out without me inserting my point of view.
But truth is: I am not able to take that risk.

I am under the impression that face_off now has only a very limited time to implement solutions and then we are probably stuck with them for the future.
So I hope you understand that I at least had to try to bring up some ideas.

In the end it is up to Otoy and face_off to decide what and how to implement things.
Then it is up to the rest of the DAZ Studio users to decide if that new version of OcDS is something they want to try out.


- - -
Oh, I wasn't trying to take away from that at all, I apologize if that's how it came across. I was just noting that as a group, we tend to kind of jump to specific answers to specific problems, and that is probably a portion of why the plugin has so many broad issues. Face-off seems far more aware of that issue than the last developer, so I'm all for allowing him to kind of tackle things as he comes across and asks about them, since he can actually see all of the code, and seems to actually look at all of it. I wasn't trying to suggest no one should bring up issues, only that we have a developer that can handle taking a specific problem and working out a means of addressing it without as much corralling.

To wit, this is far from clean or finished, but that wall of I don't know enough about the Iray (or other needlessly complex shaders, for that matter, half of the vendors don't even use most of the crap the shaders are built for *sigh*), but I think it's a step towards what we are all going for. Please, pick it apart and tell me if I'm missing anything, anything needs more clarification, it just looks stupid, whatever.

Code: Select all

#Material Type Check

If Shader = DAZ Studio Default, SimpleSurface:
	If Lighting Model is Glossy (Plastic, Metal):
		Octane material = Glossy(ruleset_3D-*)
	Else:
		Octane material = Diffuse(ruleset_3D-*)
Else:
	If Shader = omUber*, HumanSurface*, AoA_SubSurface, Iray Uber:
		Octane Material = Mix(ruleset_3D-*) 			# This needs changed to (ruleset_Fancy) or something, but more info needed on Iray/others shaders to improve efficiently

		
# This ruleset should work for any character material or props with displacement.

def ruleset_3D-A
	If Displacement map is true:
		Load Displacement
		Ignore Normal, Bump
	Else:
		If Normal map is true:
			Load Normal
			Ignore Bump
			If Normal strength set > 1:
				Set Strength to 1
		Else:
			Load Bump

	If Opacity map is true:
		Load Opacity as Grey Image
	Else:
		Load Opacity as Greyscale Value

	
# An alternate to above ruleset, for those not wanting displacement (background props, low resolution, low station specs, etc.).

def ruleset_3D-B
	If Normal map is true:
			Load Normal
			Ignore Bump
			If Normal strength set > 1:
				Set Strength to 1
		Else:
			Load Bump

	If Opacity map is true:
		Load Opacity as Grey Image
	Else:
		Load Opacity as Greyscale Value


	
For the record, depending on the specific character, there are quite a few that auto-convert relatively nicely already, even from Iray. Sasha HD comes to mind off the top of my head, as I just loaded her up from a saved subset (with all Iray mats), and aside from having to change the opacity to use maps and select the correct ones for the hair and eyelashes, and making the cornea/eye moisture surfaces transparent, it's a reasonably good start to a skin. No SSS or anything fancy, but it's a solid Diffuse material base. I tend to stick with the Direct Lighting kernel, as it's my preference, but it looks almost as good in Path Tracing/PMC. If only every vendor/skin would get it this right.
Sasha Iray basic.PNG
Part of the inherent difficulty in any auto-conversion solution is likely going to be the lack of consistency in input as much as anything else. The vendors are all over the place, regardless of their preferred shader.
| Intel i7-5960x @ 3.8 GHz| ASUS X99-E WS | 64 GB G.Skill DDR4 2400 Ram | 4x EVGA GTX 980 Ti | Win10 Professional x64 | Watercooled
Spectralis
Licensed Customer
Posts: 561
Joined: Thu Jun 06, 2013 10:21 pm

Concerning material conversion - if DAZ have managed to configure IRAY to seamlessly auto convert ALL 3Delight materials then why is this not possible in Octane? I assume that DAZ have somehow found a way to accommodate all the different methods developers use to create skins so why would this not also be possible in Octane? There must be some coherent conversion rules or procedures to follow otherwise IRAY would not be able to consistently convert skins accurately. I'm reading this thread with great trepidation that OcDS auto convert will just be left in this hit and miss state because it's either not a priority for those with advanced material experience or because the consensus is that it's just too much trouble to sort out. Quite honestly I don't want to waste time tweaking eyelashes and eye reflections unless I am doing it to customise a character.

Fortunately I have the RedSpec skin shaders but the principle of having an accurate auto conversion tool is still very important to me. It existed (more or less) in earlier versions of the plugin so I hope it gets fixed eventually.
ASUS Maximus VI Extreme, i7 3770k, 32GB RAM, 4 x GTX760 4GB, Win 8.1 x64.
User avatar
face_off
Octane Plugin Developer
Posts: 15698
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

I'm reading this thread with great trepidation that OcDS auto convert will just be left in this hit and miss state because it's either not a priority for those with advanced material experience or because the consensus is that it's just too much trouble to sort out.
If you have an issue with the current material conversion, it would be more constructive if you documented the specific issues(s), provided sample scenes demonstrating the problems, and provided the expected behavior of the plugin. Vague terms like "hit and miss" are not constructive.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
Notiusweb
Licensed Customer
Posts: 1285
Joined: Mon Nov 10, 2014 4:51 am

Guys, so we can agree that as a simple start, Iray is 'fixed' by changing Opacity from Greyscale to Grey Image, right?

Now, with regard to SSS mats, which would be the better 'universal' fix-rule for SSS mats - Normals power at 2 causes Toon textures, so we can:
1) Set power from 2 to 0
2) Turn off Normals node
3) Set RGB Image in Normals node to Grey Image, Greyscale, (anything other than RGB Image)

Here is me setting RGB Image to Grey Image (which is what allows us to fix the Iray issue). Maybe the breakdown in conversion across the board (in both Iray and SSS mats) stems from not translating to a Grey Image?
A G3F SSS mat workaround - set Normals Node dropdown from RGB Image to Grey Image, you don't have to delete node or reduce power from 2 to 0
A G3F SSS mat workaround - set Normals Node dropdown from RGB Image to Grey Image, you don't have to delete node or reduce power from 2 to 0
So my layman's logic:

If Iray Opacity = Greyscale, then set Opacity to Grey Image + Load Grey Image

If SSS Normal value >1,
1) Set power from 2 to 0
2) Turn off Normals node
3) Set RGB Image in Normals node to Grey Image


Seems option 3 is most consistent with the Iray choice, whatest thou thinkest...
Win 10 Pro 64, Xeon E5-2687W v2 (8x 3.40GHz), G.Skill 64 GB DDR3-2400, ASRock X79 Extreme 11
Mobo: 1 Titan RTX, 1 Titan Xp
External: 6 Titan X Pascal, 2 GTX Titan X
Plugs: Enterprise
Spectralis
Licensed Customer
Posts: 561
Joined: Thu Jun 06, 2013 10:21 pm

face_off wrote:
I'm reading this thread with great trepidation that OcDS auto convert will just be left in this hit and miss state because it's either not a priority for those with advanced material experience or because the consensus is that it's just too much trouble to sort out.
If you have an issue with the current material conversion, it would be more constructive if you documented the specific issues(s), provided sample scenes demonstrating the problems, and provided the expected behavior of the plugin. Vague terms like "hit and miss" are not constructive.

Paul
The problems with material conversion in v2 of the plugin have already been documented here and in other threads. If you want me to repost that information then I can do so. If the list of bugs that has already been complied is unclear then please let the forum know so that someone can elaborate. When we send bug reports including files how would you like us to send them?

One example, loading a G2 or G3 figure involves editing the skin materials at the moment. This bug is very simple to reproduce by loading a G2/3 figure, has been documented here in the past and a workaround has been suggested but it would be much easier if OcDS automatically converted DAZ skin materials correctly. I do not have the technical expertise to suggest a solution but all the same I would like it to work properly at some point in the future and not in the way it does now where some materials are converted properly and others aren't depending on the figure which is why I used the phrase, "hit and miss". Version 1 of the plugin did not appear to have this problem so v2 is a step backwards in this area. Can this bug be fixed in v2 at some point in the future or is this unlikely?
ASUS Maximus VI Extreme, i7 3770k, 32GB RAM, 4 x GTX760 4GB, Win 8.1 x64.
User avatar
sikotik13
Licensed Customer
Posts: 270
Joined: Thu Feb 20, 2014 6:21 pm
Location: Iowa, United States

Notiusweb wrote:So my layman's logic:

If Iray Opacity = Greyscale, then set Opacity to Grey Image + Load Grey Image


This isn't limited to Iray, and is covered by what I have above. The code box is limited in displayed size, unfortunately, so it extends down a fair bit. I could rewrite it less code-looking if that would make it easier to read, I'm taking a Python class, and it's what popped into my head when 'logical if-then' got mentioned. I wasn't attempting to make it harder for people to read :oops:

Notiusweb wrote: If SSS Normal value >1,
1) Set power from 2 to 0
2) Turn off Normals node
3) Set RGB Image in Normals node to Grey Image


Seems option 3 is most consistent with the Iray choice, whatest thou thinkest...
This seems like three options to do the same thing, which is disable normal map. setting it to zero, turning it off, and disabling the image input itself are all doing the same thing. If there is a displacement map present, it would never be loaded just following what I came up with before as a rough idea, likewise, it specifically dropped the strength of normal maps down to 1 if there was no displacement and a normal map was present and set >1, which should eliminate the toon texture issue regardless. Though normal strength may still be too high, at least it should be visually apparent that it's set too high.
| Intel i7-5960x @ 3.8 GHz| ASUS X99-E WS | 64 GB G.Skill DDR4 2400 Ram | 4x EVGA GTX 980 Ti | Win10 Professional x64 | Watercooled
User avatar
face_off
Octane Plugin Developer
Posts: 15698
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

One example, loading a G2 or G3 figure involves editing the skin materials at the moment. This bug is very simple to reproduce by loading a G2/3 figure, has been documented here in the past and a workaround has been suggested but it would be much easier if OcDS automatically converted DAZ skin materials correctly.
I loaded G2, converted all the materials and it rendered fine. What specific issue are you having? What specific workaround are you needing to use?

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
Notiusweb
Licensed Customer
Posts: 1285
Joined: Mon Nov 10, 2014 4:51 am

Re: Materials Conversion - Current Issues and Requests
Postby sikotik13 » Thu Nov 26, 2015 8:48 am


I could rewrite it less code-looking if that would make it easier to read, I'm taking a Python class, and it's what popped into my head when 'logical if-then' got mentioned. I wasn't attempting to make it harder for people to read
I understand and am with you 100%, just was trying to confirm with anyone else that the Iray thing made sense :)
This seems like three options to do the same thing, which is disable normal map. setting it to zero, turning it off, and disabling the image input itself are all doing the same thing. If there is a displacement map present, it would never be loaded just following what I came up with before as a rough idea, likewise, it specifically dropped the strength of normal maps down to 1 if there was no displacement and a normal map was present and set >1, which should eliminate the toon texture issue regardless. Though normal strength may still be too high, at least it should be visually apparent that it's set too high.
Would we code it to drop power to '0', it looks like you would be saying if > 1, set power to 1....but at 1 it still has the toon textures, like, we have to bring it all the way down to 0, so wouldn't we want to say if >1 drop to '0'....just checking. If what you have already eliminated any need to drop to '0', then of course that is good.

Since we may already have the coding with you supplying it, I'd say lets move this forward for Paul's review!
Lets get these new Iray and SSS mats rendering automatically!!!

@Paul - I think Spectralis is referring to the Iray and new SSS textures, which are being released for both G3 and G2. So, some newer G2 mats convert incorrectly too. It's not the G2 base, it's these newer Iray and SSS mats for G2. It's all the same issues as with the G3...it's the mats.
Win 10 Pro 64, Xeon E5-2687W v2 (8x 3.40GHz), G.Skill 64 GB DDR3-2400, ASRock X79 Extreme 11
Mobo: 1 Titan RTX, 1 Titan Xp
External: 6 Titan X Pascal, 2 GTX Titan X
Plugs: Enterprise
Spectralis
Licensed Customer
Posts: 561
Joined: Thu Jun 06, 2013 10:21 pm

Notiusweb wrote:@Paul - I think Spectralis is referring to the Iray and new SSS textures, which are being released for both G3 and G2. So, some newer G2 mats convert incorrectly too. It's not the G2 base, it's these newer Iray and SSS mats for G2. It's all the same issues as with the G3...it's the mats.
Thanks for clarifying that. I'll find some specific examples and post them so that the problem can be reproduced once I've finished testing the new build to see if it's solved the animation rendering problem I've been experiencing.
ASUS Maximus VI Extreme, i7 3770k, 32GB RAM, 4 x GTX760 4GB, Win 8.1 x64.
User avatar
DrHemulen
Licensed Customer
Posts: 317
Joined: Thu Dec 26, 2013 7:09 pm

linvanchene wrote:-
Templating is NOT a substitution for a complex material auto conversion because templating only adds different maps but reuses the same values
DrHemulen wrote:Again, you can also just use your own, custom templated materials to do the conversion. It works really well, usually also on multiple materials in one go (you can apply a "hair" material to all the hair sub-mats for a figure for instance).
Nevertheless when your goal is to create huge scenes like environments with 100+ objects and 250+ materials on 500+ surface zones the last thing you may want to do is to use a small selection of templates to make them look like the are all the same type of stone, plastic or metal.
Eep, good point. Templates are great, but I agree we need at least a basic and robust autoconversion. Just using templates in a scenario like that would be crazy. I just feel it's important not to use all focus on this, as this ruleset can quickly grow exponentially to cover all the different ways Iray lets you acheive the same basic effects, as Sikotik pointed out :-/

Combining the parsing of the Iray materials with some kind of material detection might be possible (so skin zones with known names will always be assigned a preferred, known SSS material for instance)?
GTX 780, 6 gigs of VRAM - Win 7 Home Premium 64 bits
Post Reply

Return to “DAZ Studio”