Point helpers synced to texture tranforms

Forums: Point helpers synced to texture tranforms
3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here viewforum.php?f=18

Point helpers synced to texture tranforms

Postby Jani » Thu Nov 10, 2022 11:31 pm

Jani Thu Nov 10, 2022 11:31 pm
Hi,

I've recently made a video about a method for using point helpers to drive texture transforms in world space which I find very useful:



Could this be implemented as part of the plugin by any chance? So for example, within a 3D texture transform node have a button like 'generate linked point helper'. As seen in the video, it can be very handy for doing quick decals while having a much more utility for animations - as using texture transforms within the material editor are, although intuitive, very time consuming to use.

Best regards,

Jani
i9 9920X, 64GB, RTX 2080Ti
Ryzen 1800x, 64GB, 2x RTX 3090
Jani
Licensed Customer
Licensed Customer
 
Posts: 73
Joined: Tue Nov 20, 2012 12:44 pm

Re: Point helpers synced to texture tranforms

Postby HHbomb » Sat Nov 12, 2022 8:35 am

HHbomb Sat Nov 12, 2022 8:35 am
+1000 ( very clever and useful )
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Re: Point helpers synced to texture tranforms

Postby HHbomb » Mon Nov 14, 2022 8:30 am

HHbomb Mon Nov 14, 2022 8:30 am
Hi, Jani.
Could it be possible for you to share a file ?
Thanks
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Re: Point helpers synced to texture tranforms

Postby neonZorglub » Tue Nov 15, 2022 3:20 am

neonZorglub Tue Nov 15, 2022 3:20 am
Jani wrote:Hi,

I've recently made a video about a method for using point helpers to drive texture transforms in world space which I find very useful:



Could this be implemented as part of the plugin by any chance? So for example, within a 3D texture transform node have a button like 'generate linked point helper'. As seen in the video, it can be very handy for doing quick decals while having a much more utility for animations - as using texture transforms within the material editor are, although intuitive, very time consuming to use.

Best regards,

Jani


Hi Jani,
Thank you for this. That's great !

Did you use the Wire parameter system ?
Could you post a sample ?

As you mentioned, this could probably done with MaxScript, but I could have a look to make it more simply. Maybe an additional custom transform node..

Thanks
neonZorglub
OctaneRender Team
OctaneRender Team
 
Posts: 899
Joined: Sun Jul 31, 2016 10:08 pm

Re: Point helpers synced to texture tranforms

Postby Jani » Tue Nov 15, 2022 1:01 pm

Jani Tue Nov 15, 2022 1:01 pm
Hi guys,

sorry for the late response, I was busy at work.

I've got the file archived, see the zip file attached.

It is indeed a work of wire parameters. I wire a 3D transform node to a helper XYZ position using the following code which I devised after a bit of trial and error: [Position.X,Position.Z,-Position.Y] , where the point's XYZ position controls Transform 3D node's 'translation', bearing in mind that the projection is set to XYZ to UVW in WORLD SPACE. This is for the texture mask. I have to use a couple of mix textures to make sure that all 3 axis are 'masked' out, so I rotate a simple gradient node set to 'polygonal' with 4 sides(a square) by 90 degrees in their texture transform to make sure that happens. This could be mitigated by using a 3D texture that has a pattern of a box or a circle, but I don't think octane has a texture like that. Also the problem is that 3D textures don't seem to have an edge mode(called repetition mode in octane) that you can set to 'clamp value' - which is precisely what I use to make sure the texture is visible only on the one spot linked to the helper and can't be visible anywhere else. Though maybe this is possible via OSL or something(a 3D gradient perhaps?).

The Logo itself is done the same way, except you no longer have to use XYZ to UVW, you can just use a box or a sphere or cylindrical mapping - whatever works for you(though still set in world space). All the 3D transforms - the texture AND the mask are linked to the same helper, although the scale parameter is only linked to the mask's 3D Transform node and not to the Otoy texture. There could be another helper or a dummy that is linked to the scale of the texture separately, so you can maintain control of that in the viewport.

The rotation I found difficult to link up. I'm terrible at scripting, and the use of radiants in Max completely confuses me, so the best approximation to linking a rotation of the helper to the 3D translation node's rotation is this: [(RadToDeg Rotation.X),-(RadToDeg Rotation.Z),(RadToDeg Rotation.Y)], but bare in mind it doesn't actually work as expected, only in some cases.

You might also have spotted that we're linking 3DS Max's Position X,Y,Z to Octane's X,Z,-Y. I understand octane has a Y as the 'up' axis, but why is it inverted is beyond me.

Also, if you could make this addition to the plugin(which I would very much welcome!), can you make it so that the effect in the octane viewport is visible even when material editor is closed? Currently, you don't open the material editor AND click on one of the texture transforms that are being affected by the point helper, it won't update in the viewport unless you select any materials or node within the material editor(otherwise you have to click the 'update' button inside octane viewport, which is annoying.

I'm really looking forward to some elegant solution for this! I think it's really close to being as useful as RVT's in Unreal, which you can see below:

Attachments
Texture linking.zip
(118.67 KiB) Downloaded 55 times
i9 9920X, 64GB, RTX 2080Ti
Ryzen 1800x, 64GB, 2x RTX 3090
Jani
Licensed Customer
Licensed Customer
 
Posts: 73
Joined: Tue Nov 20, 2012 12:44 pm

Re: Point helpers synced to texture tranforms

Postby neonZorglub » Wed Nov 16, 2022 9:22 pm

neonZorglub Wed Nov 16, 2022 9:22 pm
Hi Jani,
Thanks a lot for the sample and detailed description !
I'll see how to simplify those steps and fix issues with material editor.
Thanks
neonZorglub
OctaneRender Team
OctaneRender Team
 
Posts: 899
Joined: Sun Jul 31, 2016 10:08 pm

Re: Point helpers synced to texture tranforms

Postby Jani » Thu Nov 17, 2022 12:22 am

Jani Thu Nov 17, 2022 12:22 am
Hi neonZorglub,

massive thanks for doing this. I really think this is a massive addition, as I've used this in probably the last 6 out of 10 projects.. Very easy to mask out walls, create holes in terrain and other cool stuff with just a point helper which drives a texture.

Looking forward to seeing this in the plugin!

Kind regards,

Jani
i9 9920X, 64GB, RTX 2080Ti
Ryzen 1800x, 64GB, 2x RTX 3090
Jani
Licensed Customer
Licensed Customer
 
Posts: 73
Joined: Tue Nov 20, 2012 12:44 pm

Re: Point helpers synced to texture tranforms

Postby HHbomb » Thu Nov 17, 2022 12:19 pm

HHbomb Thu Nov 17, 2022 12:19 pm
Hi, Jani. Thanks for your efforts and your file.
Could you make a 2022 version ? Thanks
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Re: Point helpers synced to texture tranforms

Postby Jani » Tue Nov 22, 2022 4:27 pm

Jani Tue Nov 22, 2022 4:27 pm
HHbomb wrote:Hi, Jani. Thanks for your efforts and your file.
Could you make a 2022 version ? Thanks


Hi HHbomb, apologies on the delay.

Please see attached.

Best regards,

Jani
Attachments
OctaneTexTransformLink.zip
(546.68 KiB) Downloaded 67 times
i9 9920X, 64GB, RTX 2080Ti
Ryzen 1800x, 64GB, 2x RTX 3090
Jani
Licensed Customer
Licensed Customer
 
Posts: 73
Joined: Tue Nov 20, 2012 12:44 pm

Re: Point helpers synced to texture tranforms

Postby HHbomb » Thu Nov 24, 2022 10:47 am

HHbomb Thu Nov 24, 2022 10:47 am
Thanks Jani ! :mrgreen:

Now I know that I know nothing !
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Return to Autodesk 3Ds Max


Who is online

Users browsing this forum: No registered users and 18 guests

Sat Apr 27, 2024 3:43 am [ UTC ]