PDA

View Full Version : LW 9.6 Q? Z axis Gradient with value controls?



Revanto
09-07-2016, 08:08 PM
Hi, everyone!

In the past, I've always used a black and white gradient image and have it project along the X axis for an object to create my own customised Z depth pass, for which I used to make bump and normal maps. I could easily automatically size the texture to the Z depth of the object if I wanted to, which was a bonus.
The thing is that I want to be able to use gradients within the surface editor to do the shading so that I can try to render out high quality bump/displacement maps with as little stepping as possible. But none of the gradient options allow for fixed linear X,Y,Z axis projection.

Does anyone know how, within LW 9.6, I can use a gradient on a surface/object to give me a fake Zdepth pass but with the option to control the values as well?

I will need to be able to apply this to multiple objects with as little need for adjusting as possible.

Also, extra question, I want to render out the results in the best yet smallest resolution that I can. Can anyone suggest the best format (I'm assuming Targa would possible be it) and whether 16 or 32 bit is necessary?
Sorry if it seems like a dumb question but I've always stuck to things in 8 bit.

Thanks in advance.

Revanto

Revanto
09-09-2016, 08:58 PM
Wow, seriously? Nobody? OK, well I can say that I did manage to do it in an ugly way using the grid procedural node using black and white colours projected on the X axis. It's not the way I wanted to do it and I came across the idea by accident but I did get a result.

Still, if anyone can show me how to do it via the gradient node or just using gradients then please let me know.

Oh, and I still need advice in regards to rendering in a higher quality. I save out as a 32 bit PNG but it loads up as an 8 bit file.

Revanto :p

pinkmouse
09-10-2016, 01:56 AM
Sorry, you have me confused. Are you trying to create a depth mask on multiple objects you can use for DOF/object masking etc. in post, or are you trying to create a bump map you can use in LW on a low poly object to add detail?

bazsa73
09-10-2016, 02:49 AM
Isn't it so that gradients can't be mapped using world coordinates? That's why revanto used image maps as they can be mapped using world coordinates and thus all geometry in the scene
shares the same texture space.

pinkmouse
09-10-2016, 02:54 AM
Isn't it so that gradients can't be mapped using world coordinates? That's why revanto used image maps as they can be mapped using world coordinates and thus all geometry in the scene
shares the same texture space.

No idea about the old layer surfacing, but in nodal it's easy, just use a single null as a reference for everything.

edit:ignore the image posted here, It's the wrong one and I can't delete it!

bazsa73
09-10-2016, 03:12 AM
I did this.
Inside a Color layer I checked World Coordinates and added a Node Editor node which used a gradient. Not very elegant but works
134422

pinkmouse
09-10-2016, 03:47 AM
Right the proper version, rather than one where I went off on a tangent "just to see what it would do!" ;)

134424

You have two constants, (which you could replace with nulls and Item Info + Split Vector if you wanted a more hands on setting technique), one set to start the gradient, and one set as the endpoint, or maximum depth required. The gradient sets the colour based on the rendered spot's distance from the start position, relative to the defined endpoint. Remember to set the gradient to linear!

pinkmouse
09-10-2016, 04:08 AM
And if you wanted a more dynamic solution based on distance from the camera, you could do it like this:

134425

pinkmouse
09-10-2016, 04:17 AM
And finally, the "proper" version, a depth map in full 3d driven by the camera:

134426

Notice how simple this is. :)

Sensei
09-10-2016, 05:49 AM
Plug it to Diffuse Shading instead.
Or Make Material, plug to Diffuse, and material output to Surface final material.
This way the all normal surface settings will be overridden.

pinkmouse
09-10-2016, 05:57 AM
Yup, I would probably use MM in the real world. But I wasn't really demonstrating that aspect, but concentrating on the gradient side of things. Perhaps I should have made that clearer :)

bazsa73
09-10-2016, 06:46 AM
And finally, the "proper" version, a depth map in full 3d driven by the camera:

134426

Notice how simple this is. :)
I love this one. Should be in the documentations.

Revanto
09-12-2016, 03:33 AM
I did this.
Inside a Color layer I checked World Coordinates and added a Node Editor node which used a gradient. Not very elegant but works
134422

I tried importing your nodes file into a test scene but I got an error. I'm using 9.6 but I have a feeling you have a later version. Could you maybe post a screenshot?
Maybe I don't have the nodes that you do, though?

I appreciate your help. You seem to understand what I am looking for.

Revanto :p

Sensei
09-12-2016, 03:36 AM
bazsa73, you could try Export Nodes, so Revanto will import them.
It's text format, so anyone can open it in text editor and see/change content.

daforum
09-12-2016, 03:46 AM
Its the Input Node. It isnt in 9.6
What's the alternative?

Sensei
09-12-2016, 04:03 AM
World Spot used to be in Spot Info IIRC..

pinkmouse
09-12-2016, 07:40 AM
Can't you download the Info node from LW3DG?

daforum
09-12-2016, 09:00 AM
From here: https://www.lightwave3d.com/assets/plugins/entry/input-node/

Can anyone say where to install it ( ie: folder )?

pinkmouse
09-12-2016, 10:38 AM
Probably just the same as any other plugin.

daforum
09-12-2016, 11:26 AM
What i mean is, should it be in ".../Plugins/modeler" or ".../Plugins/utilities" or ".../Plugins/textures"?
Just wondering where a Node plugin that is a key ingredient to all Node windows ( Surface or Displacement etc ) goes.

Sensei
09-12-2016, 11:28 AM
Make new folder "3rd party plugins",
and put there.
It really does not matter.

bazsa73
09-13-2016, 03:16 AM
I tried importing your nodes file into a test scene but I got an error. I'm using 9.6 but I have a feeling you have a later version. Could you maybe post a screenshot?
Maybe I don't have the nodes that you do, though?

I appreciate your help. You seem to understand what I am looking for.

Revanto :p

Sorry Dude, I was elsewhere. Yes, it is ridiculosly simple.
In the node editor you make a Color layer. Check World Coordinates! That's very important. Select Procedural as Layer type and Procedural Type: Node Editor
Click Edit nodes inside this Color Layer node and there you create your Gradient. Since WORLD COORDINATES has been set to ON the gradient will receive
World Coordinates not Local. But maybe in 9.6 there is no Node editor Procedural type, that can be an issue.
134462

daforum
09-13-2016, 06:35 AM
And finally, the "proper" version, a depth map in full 3d driven by the camera:

134426

Notice how simple this is. :)

Love this version. It works brilliantly :thumbsup:
Thanks pinkmouse!

pinkmouse
09-13-2016, 07:32 AM
You're welcome! :)

daforum
09-13-2016, 12:07 PM
Pinkmouse. I was wondering, the setup is good to apply to 1 surface ( i set it up by cloning the same box object so only 1 surface was used on 4 objects )
What if there are many different objects in the scene?
( i know i can copy/ paste the node setup ) but would it be able to be applied to a Master Channel so it affects all the ( hyperthetical ) different objects in the ( hyperthetical ) scene?

pinkmouse
09-13-2016, 04:18 PM
You'd need something like Sensei's Global Materials, ( I think that's what it's called!) plugin, otherwise it is just cut and paste I'm afraid. Hopefully something that might improve with LW2017

Sensei
09-14-2016, 03:57 AM
TrueArt's Global Materials
http://globalmaterials.trueart.eu
*requires* LW v11.0+, recommended LW 2015.x.
LWSDK in v9.x...v10.x has not enough information exposed to make such plugin working with them.

Revanto
09-20-2016, 11:23 PM
I finally thought I should finish this thread or something. OK, so there was no viable solution for getting gradients on a fixed axis except by using the dirty but effective 2d grid node to get the results that I wanted. Sorry about getting the node wrong as it was actually the '2d grid' and not the 'grid' node that I used. I'm pretty sure anyone else can replicate what I did from common sense. Sure you can't get total control with the 2d grid node but it is possible to edit in Photoshop or a more elaborate node set up.

Thanks to everyone who contributed and helped with this. Sometimes it's tough to get the most basic help when it comes to Lightwave.... sigh....

Cheers,
Revanto :p

pinkmouse
09-21-2016, 06:19 AM
...Sometimes it's tough to get the most basic help when it comes to Lightwave....

Did none of my solutions help you?

Revanto
10-07-2016, 04:29 AM
Did none of my solutions help you?

Sorry, no. But I do appreciate the effort, though. I think it was because either I didn't have the nodes or that none of the node plugins worked for me. Hopefully when the next version comes out I will finally take the plunge and upgrade so I won't be held back because I use an older version.

Cheers,
Revanto :p