Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - James Vella

Pages: 1 ... 16 17 [18] 19 20 ... 36
256
By user request I am releasing this script for free. Script attached to this post.

Notes:
- You can copy/paste, change, learn from it or do whatever to suit your own workflow if you know maxscript.
- Works on scene materials (any object with a Corona Physical Material applied). Not on selected objects so be aware this will convert everything in that scene.
- Currently works with Standard Bitmap, not CoronaBitmap. For example will keep the bitmap as CoronaBitmap instead of converting it to Standard, will update in next verison.
- Be aware this is version 01 so there is probably issues to iron out, your feedback is required to make this better. FYI I don't plan on developing this long term, maybe or maybe not, no promises but for the time being happy to work on it in my spare time.


Install:
- Drag the script into your 3dsmax viewport.
- Customize > Customize User Interface > Toolbars > Category: Vella > Automate CoronaToPhysical

Version 1.0 Features:
- Base Color
- Roughness or Glossiness
- Anisotropy Amount / Rotation
- IOR
- Metal
- Refraction (could be incorrect, still trying to work out how this works in Autodesk Physical)
- Thin Shell
- Opacity
- Emission / Self-Illumination
- Normal / Bump (numeric values kept default 0.3, let me know if this is an issue)
- Displacement
- Clearcoat Amount / Roughness / Bump
- Numerical values such as Base Color Amount, Roughness Amount, IOR value etc.
- Color swatches such as Base Color, Self-Illumination etc.

Exporting to FBX:
- FYI, export does not support the use of the 'Additional Bump' parameter. I have kept it for now since it will work directly in 3dsmax but could create an issue for exporting to FBX. Your feedback is required as I don't know the real-world implications.
- Currently all nodes are kept during the conversion so this also poses a problem for exporting to FBX. For example if you have your Base Color in a Falloff node then the Falloff is kept on conversion. Again real-world examples can help. I might even put a pop up if you prefer such as "Are you exporting to FBX Yes/No?". This way you can either keep all the nodes or just keep the bitmaps.

Corona Physical Material:
corona" border="0

Autodesk Physical Material:
phys" border="0

257
I would personally love something like this that works the other way too. Corona TO physical for the times where you need to share a model as say an FBX and the other party doesnt have corona.

Sure, I can invert the code so it works the other way around. Give me a week or 2 ill take a look.


258
Updated script attached to this post.

Version 2.0 - new features:
- Re written most code to include all Numeric values for each node such as Base Color or Roughness values regardless of using a bitmap or not. Same applies for color swatches. Exception for Bump this is set to 1.0 keeping the default for Corona, let me know if this is an issue.
- Normal and Additional Bump nodes now work as per the Physical Normal Bump node and can copy both textures.
- If not using a Normal texture then only the Bump will be copied across and does not Require a Corona Normal Bump node.
- Metal now respects numerical values as well as Bitmaps. If using both numerical values with a bitmap, the bitmap will be placed into an Output node and the numerical value will control the 'Output Amount'. If only using numerical values 0-1 then those will be copied into the output amount. If using 1.0 metal (with no bitmap) then Corona material set to just Metal. Also works opposite, if metal set to 0 in Autodesk Physical (with no bitmap) the Corona material will be non-metal.
- Clearcoat Bump and IOR bitmap nodes now supported.
- Anisotropy numerical value/rotation fixed.
- Displacement heights value copied from numerical value in Physical

Autodesk Physical Material
phys" border="0

Corona Physical Material
corona" border="0

Autodesk Physical Material - Metal not set to 0 or 1 and using a bitmap
phys-metal" border="0

Corona Physical Material - Metal not set to 0 or 1 and using a bitmap. When using a bitmap and set to 0 or 1 no output node created and uses just the bitmap.
corona-metal" border="0

Metal - numerical value of 0-1 (no bitmap)
metal-value" border="0

Metal - numerical value of 0 (no bitmap)
metal-0" border="0

Metal - numerical value of 1 (no bitmap)
metal-1" border="0

Autodesk Physical Material - Displacement (works the same for all numerical values)
phys-disp" border="0

Corona Physical Material - Displacement (works the same for all numerical values)
corona-disp" border="0

259
Updated Script attached to this post.

Version 1.3.0 - newly added features
- Displacement
- IOR
- Anisotropy - update on this textures work, but values need to be fixed.
- Emission / Self Illumination
- Replaced Inverted Glossiness with Advanced Options > Roughness mode to Glossiness mode (in the Corona Physical Material).
- Clearcoat - Amount/Glossiness/Roughness/IOR
- Clearcoat Not Supported - Coating Color (Autodesk Physical Material) and Absorption (Corona Physical Material) as this behaves differently (unless I'm misunderstanding something).

Notes:
- Glossiness: Due to the nature of Autodesk Physical Material using both Roughness & Glossiness instead of just Roughness or Glossiness in Corona Physical Material it will switch to either Roughness or Glossiness based on your Reflection selection. Since this has an effect on Sheen and Clearcoat your textures and values will be inverted to suit whichever workflow you have selected in the Autodesk Physical Material - Reflection (Roughness or Glossiness).
- Values & Colors: If no texture used for any of the nodes in the below screenshots then the values will be used instead. For example if not using an IOR texture but set your IOR to 1.35 then it will transfer the value instead, this applies to all nodes. This also applies to colors such as the Diffuse or Emission color. (This can be modified to use both if preferred).
- Maxscript: While the code could also be simplified with 'and or' statements I have kept it longer with 'and' statements for easy readability instead of efficiency. This affects the 'Clearcoat' section.

Autodesk Physical Material:
physical-01" border="0

Corona Physical Material:
corona-01" border="0

When using Reflection Glossiness in Autodesk Physical Material:
phys-gloss" border="0

This is how it converts to Glossiness in Corona Physical Material:
corona-gloss" border="0

As always, test/backup and give me feedback on your findings.

260
@James Vella, maybe it's worth creating new topic in the user contribution board?

Sure if it helps. I didnt want to create a 3rd thread about it and bog down the forum but since you moderate this place I can do that if you think its best.

Especially if you have plans to continue development of the script. Honestly, judging by the amount of users requesting physical to Corona material conversion, i think your effort deserves a lot more attention than it got so far.

Not sure if I plan on developing it further but just wanted to help out for the time being and give myself a little project to work on. All the code is in .ms format so you can copy/paste, change, learn from it, whatever to suit your own workflow.

Also happy to hear some feedback about its real-world use since I'm just doing what I think would be useful but I dont actually ever use Autodesk Physical materials so I'm just pushing buttons =D

261
+1000 for max physical > corona physical. Anyone who imports revit/skp/anything needs this to work in corona converter as a one-stop-shop :) Please! :D

In the mean time you can use the script I made that converts Autodesk Physical to Corona Physical in this post here:
https://forum.corona-renderer.com/index.php?topic=31214.msg214027#msg214027

Its fairly basic but covers Diffuse, Glossiness, Roughness, Normal, Metal, Non-Metal, Opacity at the moment.

Also I have a version I'm tinkering I can release this week that now changes the Advanced option to use Glossiness if using Glossiness workflow (instead of inverting the Roughness with a color correction node, I wasnt aware of this while making it). It also will support Displacement, IOR, Anistrophy, Emission/Self Illumination.

I just made it since I already have a few scripts I made that do similar things so figured it might help you out until the official release by the Corona team. 

262
What if you just remove the wall behind the camera? Alternatively where the door would be just leave it open?
I didn't try that. It would probably make the render faster indeed, but it would also make the image look more flat because of light coming from behind the camera.

I do this for rooms like this, doesn't look flat at all. If the direct light is coming from the side then you only get more bounced light. I mean try it and see for yourself maybe in this case you could be right.

263
What if you just remove the wall behind the camera? Alternatively where the door would be just leave it open?


264
[C4D] I need help! / Re: Same colors in Photoshop as in VFB
« on: 2023-06-27, 19:01:57 »
What I have suggested preserves the color from the file, as the name suggests.

You can then do what you like with the screen profile.

265
[C4D] I need help! / Re: Same colors in Photoshop as in VFB
« on: 2023-06-27, 18:30:39 »
do you have preserve color enabled in photoshop?

Edit > Color Settings

color" border="0

266
I seen one recently on FB from an artist named Matt Hallett. Apparently using the technique 'in-painting'. Think you can find his page under: Matt Hallett Visual

This was his before Image
before" border="0

This was his AI replacement
after" border="0

267
Small update, attached to this post:

Supports both Roughness and Glossiness from Physical Mtl.
rough-phys" border="0

rough-mtl" border="0

Example Glossiness (inverts the texture using a Color Correction node for the Corona Physical Mtl):
gloss-phys" border="0

gloss-mtl" border="0

If no texture then the Roughness value will be used (or inverted for Glossiness):
value" border="0

Converted from Roughness:
rough-value" border="0

Converted from Glossiness:
gloss-value" border="0

268
Hi, tnx for script, but can You make it for legacy corona mtl?

Are you using glossiness or roughness workflow?

For example we have 2 situations:
1. Roughness texture can be put into a Color Correction node (inverted) to appear as glossiness
2. If the Autodesk Physical Material is using glossiness then we just copy that bitmap into the glossiness slot.


Dont worry ill just have it do both depending on which one is being used.

Edit:
Just be aware the reason I went with the Corona Physical is because both are Physical workflows. The Corona Legacy Mtl doesnt have Metal so if your material uses metal then that texture will be removed and the fresnel set to 999. Is this what you expect?

Alternatively you will need a fairly complex setup that does the metal as a mask, a bit of math to transfer the IOR to the Specular which is then used as a Reflection texture, which will mess up any workflow that already uses a Reflection texture. Also the Diffuse controls the color of Metal in Physical instead of Reflection for Legacy. For example if you download a model that is unwrapped with some areas with metal and dielectrics masked in this will not work. Not sure if thats a standard situation for your workflow but again if other people use the script and it gives them strange outputs they will be disappointed. Again examples are a must here, I need to know what users actually need on a daily basis. I dont know how the sketchup files appear on import and how the material setups look so without examples I'm just giving a blanket solution which may not be useful to what people in this thread actually need.

You are best sending me an example scene with 2 boxes, 1 with a metal workflow and 1 with a dielectric workflow.

I have written about the differences between the new Physical and Legacy workflows in the past you can see what I mean - Check the section on "Down the Rabbit Hole".

https://jamesvella.wordpress.com/2020/04/20/2019-9-2-substance-designer-to-vraycorona/

269
Ok update on this. Script attached to this post v01.1.0.

Install:
- Delete the old toolbar button (if you used previous versions)
- Drag the .ms file into 3dsmax
- Customize > Customize User Interface > Toolbars > Category: Vella > Automate PhysicalToCorona > Drag this to your toolbar.
- Click the button

Notes:
- Now works with multiple input nodes (such as color correction, falloff, etc)
- Skips any crashes now using try/catches (for those reading my code, yeah its a bit overkill but better safe than sorry lol)
- Supports the same textures as previously
- Using standard Bitmaps in this version (you can convert using Corona Converter to CoronaBitmap if you wish)
- Gamma 2.2 for Diffuse, Gamma 1.0 for all other textures (as previously)
- Still no nesting Multi-subs in Multi-subs (probably could add this if its a common request, recursive loops still do my head in)
- Undo (ctrl-z)

Autodesk Physical Material
Phys-01" border="0

Corona Physical Material - Converted with script
Corona-01" border="0

Autodesk Physical Material with additional nodes
Phys-02" border="0

Corona Physical Material with additional nodes - Converted with script
Corona-02" border="0

Autodesk Physical Material (Multi-Sub)
Phys-Multi" border="0

Corona Physical Material (Multi-Sub) - Converted with script
Corona-Multi" border="0

270
Ok well I cracked something together, again without some real-world examples it may be missing some features or break (see the screenshot at the bottom). Feel free to give me feedback and send me some material cases. Warning: Still in test phase, save your files and don't send me death threats... pretty please. Script attached to this post.

This is what it converts:
- Diffuse (if it cant find Diffuse texture it will use the Swatch Color)
- Roughness
- Opacity
- Metal
- Normal
- Multi-Sub materials supported

Other notes:
- Autodesk Physical Material to Corona Physical Material
- Using CoronaBitmap nodes instead of standard Bitmap nodes
- Keeps naming convention from Physical Material map nodes instead of 'CoronaBitmap' naming
- Gamma 2.2 for Diffuse, Gamma 1.0 for all other textures
- Normal texture goes into the 'Corona Normal > Input Image' node. If you use standard Bump I can put a clause in there to swap it over if it doesn't find your naming convention. For example if "_Normal.png" not found in texture name then place in "Additional Bump Mapping" slot instead.
- If Metal texture used then Corona Physical Material switches Metalness to 'Metal'. Again can be scripted to find a value instead and switch it on if < 0 or whatever.
- Careful regarding Metal Materials, follow the PBR guide, for Diffuse textures lowest black value 40, highest white value 240 otherwise your Metals will blank out at lower values. Metal textures still can use the 0-255 range. We could use the standard workflow Corona introduced when converting from Vray materials with Metal but I have my doubts about this 'Mix' value (for those who have done their own comparisons).
- Do not stack Multi-Sub materials within Multi-Subs.
- The script works scene wide, not on selected objects. Only converts Autodesk Physical Materials so wont affect Corona or Vray materials etc.
- Currently only working with bitmap nodes plugged in as per the screenshots below, I need real-world material cases to test all situations. Default material import settings from sketchup or whatever is best for fastest workflow. For example if by default a material imports with multiple nodes between the bitmap and material then this script will not work.

Install:
- Drag the .ms file into 3dsmax
- Customize > Customize User Interface > Toolbars > Category: Vella > Automate PhysicalToCorona > Drag this to your toolbar.
- Click the button

Autodesk Physical Material
Material-01-Phys" border="0

Corona Physical Material - Converted with script
Material-01-Corona" border="0

Autodesk Physical Material (Multi-Sub)
Multi-Sub-02-Phys" border="0

Corona Physical Material (Multi-Sub) - Converted with script
Multi-Sub-02-Corona" border="0

Example of how the script will break (currently) if there are extra nodes between the bitmaps and the material (In the Autodesk Physical Material). This is why I need real-world examples of imported materials. Once I have a few examples I will put some try/catches in so it skips over anything it cant find so the script will be more stable (Reminder I'm not a pro scripter, there is some recursive things going on I need to get my head around, enough for today).
Broken-Nodes" border="0

However there is a fairly simply workaround for now I could do that wont break, that is just copy the entire tree into the nodes. So that means whatever nodes connect to each material input will be retained. This means that the Bitmaps will be standard Bitmap nodes instead of CoronaBitmaps. But you could just use the Corona Conversion script after to convert those from Standard Bitmap to CoronaBitmap if you want, Let me know your thoughts. Here is an example.

Pages: 1 ... 16 17 [18] 19 20 ... 36