Arnold for 3ds Max Forum
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Split vector into three floats?

Message 1 of 7
1299 Views, 6 Replies

Split vector into three floats?


Is there a way to separate a vector output into three float values?



Tags (1)
Labels (1)
Message 2 of 7
in reply to: aaronfross

There's no dedicated node for that.

You could use Multiply to zero out two vector components (eg multiply by 1, 0, 0) and plug that into Length or RGBtoFloat

// Stephen Blair
// Arnold Renderer Support
Message 3 of 7
in reply to: aaronfross

Thank you Stephen. The Multiply node itself requires a vector input. How do I provide it with three float values 1,0,0? With Float To RGB?

It sounds like if I want to extract three float values from a vector node, it involves building a complex network of many nodes. Minimum number of nodes appears to be nine.

Please consider this a request for a dedicated "Vector To Float-3" node. It would not take much developer time.

Also, this section of the documentation is not helpful because, for example, it does not explain the options for Vector To RGB > Mode. What is "Normalized"? What is "Canonical"?

And more fundamentally, what is the difference between a Vector and an RGB value in the first place? Is it simply that RGB is constrained from zero to one, and vector has no limits?

Message 4 of 7
in reply to: aaronfross

I could be wrong, but don't you just use RGB to Vector using the "Raw" mode, and then just pipe out the individual elements? That's how it's done with C4DtoA and HtoA. Is Max different?

Normalized mode will map the input 0 to +1. Canonical will map to a range of -1 to +1.

Message 5 of 7
in reply to: aaronfross

The output of RGB to Vector is still a single vector. There are no individual elements. I need three floats.

This is partly an issue with 3ds Max not providing separate ports for XYZ and RGB connections in general, and it's also an issue with Arnold not providing a "Vector to Float-3" node. I guess in other applications, such a node is not needed. But it is definitely needed in 3ds Max.

Message 6 of 7
in reply to: aaronfross

Just for the records, Arnold supports only one output parameter per shader node, that's why there isn't any VectorToFloat3 node.

Message 7 of 7
in reply to: aaronfross

@Max Tarpini

Thanks for that answer Max, it clears things up a lot!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums