Hi,
I’m wondering if it’s possible to load a vray scene file (coming from 3dsMax) and only updating the textures in Nuke, without changing the shader setup.
Is there some clever code snippet I could use in the VRayVRScene node’s “override snippet” field?
Cheers,
frank
Hey,
Sure it should work. In the VRscene file find the textures that you would like to change. The part that you need should look like this:
BitmapBuffer bitmapBuffer_0_gsRGB {
filter_type=1;
filter_blur=1;
color_space=1;
gamma=0.4545454;
maya_compatible=0;
interpolation=3;
file=“C:\Users\Georgi Zhekov\Documents\3dsMax\sceneassets\images\BARK5.j pg”;
load_file=1;
ifl_start_frame=0;
ifl_playback_rate=1;
ifl_end_condition=0;
}
So in the override snippet you can type
BitmapBuffer bitmapBuffer_0_gsRGB {
file=“NewTexturePath”;
}
You might need to add double slashes for your path to work so if your path is C:\Test\Tex.jpg you will have to change it to C:\\Test\\Tex.jpg
brilliant, thanks, will try that today
Is it possible to apply a search and replace via the overrides? All my textures just need the file root swapped and then they would be workable.
Cheers,
frank
and one more issue. I just plugged in a production scene file and got this:
[2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Found file for frame 1: “/ohufx/shows/_SYCLONE/MyFoodBag/Russell/3D/RnD/setups/MyFoodBag_Russell_RnD_Russell_Shader_Build_v006.vrscene”
[2018/May/21|15:09:10] VRayRenderer2 | Reading scene file “/ohufx/shows/_SYCLONE/MyFoodBag/Russell/3D/RnD/setups/MyFoodBag_Russell_RnD_Russell_Shader_Build_v006.vrscene”
[2018/May/21|15:09:10] VRayRenderer2 | Scene file parsed successfully in 0.0 s.
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “dome_adaptive” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.VRayLight001@light_42”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “compensate_camera_exposure” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.a9___Default@mtl_brdf_0”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Failed to create object of type “BRDFAlSurface”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “loop_textures” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__7@tex_1”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “seed” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__7@tex_1”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “loop_textures” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__30@tex_10”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “seed” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__30@tex_10”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “loop_textures” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__37@tex_mono_0”
[2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property “seed” in object “78dc7213359415e09cf8204cacfdbc9374b663d9.Map__37@tex_mono_0”
[2018/May/21|15:09:10] VRayRenderer2 | Scene created successfully.
[2018/May/21|15:09:10] VRayRenderer2 | Objects in scene: 140
[2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Scene node sets: 2
[2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Instancer items: 18
[2018/May/21|15:09:10] VRayRenderer2 | Mtls 6.78MB, Geo 158.58MB, Lights 0.00MB, LightCache 0.23MB, Other 129.95MB (data index 108)
[2018/May/21|15:09:11] VRayRenderer2 | Noise threshold lowered to 0.142857 with 10.9 percent active pixels.
[2018/May/21|15:09:11] VRayRenderer2 | GPU adaptive lights v1 built successfully
[2018/May/21|15:09:12] VRayRenderer2 | Noise threshold lowered to 0.090909 with 5.1 percent active pixels.
[2018/May/21|15:09:12] VRayRenderer2 | Noise threshold lowered to 0.052632 with 5.8 percent active pixels.
[2018/May/21|15:09:13] VRayRenderer2 | Noise threshold lowered to 0.028571 with 7.9 percent active pixels.
[2018/May/21|15:09:13] VRayRenderer2 | Noise threshold lowered to 0.014925 with 9.7 percent active pixels.
[2018/May/21|15:09:14] VRayRenderer2 | Noise threshold lowered to 0.007634 with 11.1 percent active pixels.
[2018/May/21|15:09:15] VRayRenderer2 | Noise threshold lowered to 0.003861 with 11.9 percent active pixels.
[2018/May/21|15:09:16] VRayRenderer2 | Noise threshold lowered to 0.001942 with 12.4 percent active pixels.
[2018/May/21|15:09:16] VRayRenderer2 | Final noise threshold set: 0.001000
Hey,
Unfortunately for now we can’t do search and replace right inside of Nuke. You will have to copy your vrscene file and replace the paths in a text editor I’m afraid.
As for the log messages - seems like you are using a vrscene from a newer V-Ray compared to the one in Nuke and the warnings are about nodes that are missing from V-Ray 3 in Nuke.
Although it may work you should have in mind that there may be some issues.
Thanks Georgi. As for the search&replace, maybe there is a chance to integrate with Nuke’s path swapping facilities both in the preferences as well as via nuke.filenameFilters()?
The vray scene file came from 3dsMax, so I guess they are on a version that doesn’t exits yet for Nuke?
The biggest issue is that the model does not pick up any of the textures, but I guess that’s no big surprise if it can’t create the shader.
Cheers,
frank
If the shader doesn’t exist the textures will render black as you have noted.
As for the path remapping we already have an idea how to do it we just have to implement it.
Cheers,
Cool, sounds good. Though I hope it will integrate with Nuke’s default facilities for that sort of thing?!
We’ll try and I hope we can use them 
Hi,
I just wanted to follow up on this as I just tried loading a vrscene file and Nuke’s path swapping is still ignored, so I had to manually search/replace in the file, even though the required swapping is set up in Nuke’s preferences.
Is this still in the cards as a feature?
Also, I think it would be good to have the Nuke node indicate that there are missing textures (and which ones), so that it’s easier to QC technically.
Cheers,
frank
Hey,
Still in the to do list I’m afraid. I bumped it up and logged the missing textures as a feature request.
Cheers,
Hello Frank,
Flagging the missing textures or filepath asset in general is in progress. That should enter in the nightlies next week.
I have also looked at the path substitution request, that also seems quickly achievable.
Just to be sure, we are only talking about supporting what’s can be setup via the Nuke preferences to setup path substitution globally (which affects the persistent Nuke config file), correct ?
Coming back to your initial post :
I’m wondering if it’s possible to load a vray scene file (coming from 3dsMax) and only updating the textures in Nuke, without changing the shader setup.
How many texture do you want to change in this case ?
A much nicer solution exists and is available in Nuke but is not yet documented - I can check with you if it makes sense to go that way
Thanks Georgie. I am afraid I accidentally mixed two requests in this ticket:
The initial one was for manual swapping of textures, e.g. to update textures in Nuke as thy become available (e.g. diffuse_v01.tif to diffuse_v02.tif). I know you can do this via the override snippet but that is not very user friendly.
The other request was for general path swapping to occur according to the preferences, so that I can grab a vray scene file that was exported on windows and use it on linux without any manual re-pathing. E.g. If the vrscene file contains a path like X:\lib\textures\my_texture.tif and Nuke’s preferences are set to swap X:\lib for /mnt/lib, Vray would try to open the file /mnt/lib/textures/my_texture.tif under linux**.**
All of Nuke’s paths are parsed according to the preferences (and any file name filters installed via the Python API) before they are used, and it would be great if Vray could do the same.
Does that make sense?
Cheers,
frank
1) Swapping textures : like I said there is a much more user friendly way of doing it using a dedicated plugin (which I happen to also be the author). In the latest release, you should see nodes like VRaySceneGeometry, VRaySceneMaterial and VRaySceneTexture node.
Either email me (christophe.cot@chaosgroup.com) an example of what you want to do with a vrscene or I can send you a super basic example so that you can see what can be achieved.
2) For path remapping, ok clear. This is already available as a command line option for the VRayStandalone so I will look at how to port in into Nuke and plug to the preferences options.
Here is a quick example related to point 1 on a new workflow to parametrized VRayScene elements :
In this example :
- the red car on the right side is directly a vrscene file exported from another host (Max or Maya). You can see the VRayVRScene node on the DAG graph connected on input 3 of the Scene/Merge node.
- the car of the left side is basically the same vrscene file loaded via a VRaySceneGeometry node. The “magic” is in one additional plugin definition - VRaySceneAsset plugin - which allows to parametrize various elements in this case of the various shader setup.
For instance, I parametrized the car body diffuse and reflection color texture, the seat and the rims material.
All this is controlled via the VRaySceneGeometry node - It parse the VRaySceneAsset plugin and translate it into a Nuke user interface generated dynamically. From there parameters can be easily controlled via Nuke property panel or via dedicated input depending on the type of parameter.
No need for override snippet, no need to go into language syntax and property, it’s all about being done in a familiar Nuke environment. You have knobs and inputs.
Here is how look the property panel in this case :
The real aim of the VRaySceneAsset is to create and reuse customizable asset from a vrscene file. So especially if you want to reuse existing asset but slightly modify some aspect of their shader setup, or if you want to extract a given geometry from a vrscene for reuse, or even if you want to reuse an existing material or texture from a vrscene and apply it to a different object, you will see a clear benefit of using this solution.
For more details, you can contact me directly.
again, sorry for the tardy reply. This is perfect Christophe, and it was right in front of my eyes too. In my current scenario I just need the material pipe in the actual VrayVRScene node, but I just had a nosy around the VraySceneGeometry node - it’s fantastic to be able to be able to filter out assets with this. I have a vray scene file with a bunch of birds that I want to reuse in other shots, so with these nodes it will be super simple to only grab the ones I want out of the flock and re-texture them a little bit as needed without bothering the 3D guys again - perfect.
As I said, I can send you an example of how to use it or if you can it might be better to send me an email with your concrete vrscene and what you want to customize inside and I will compose what you need to test that directly in Nuke.
Just let me know what you prefer.
thanks Christophe, it’s all working at the moment, cool!