how to bake ray lenght

Discussions about rendering in SOFTIMAGE©
Post Reply
starcow
Posts: 27
Joined: 16 Nov 2012, 12:28

how to bake ray lenght

Post by starcow » 24 Apr 2022, 19:02

Hi everyone
I'm looking for a way to bake the ray lenght from the scalarstate node into a texture.
I would prefer if I could determine where the reference point is from which the rays are measured, e.g. from 0, 0, 0.
It does not necessarily have to be the scalarstate node. I simply need to bake the distance information into a texture.
I can render it, but I don't know how to bake it.
Is that somehow possible?

Many thanks, starcow

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: how to bake ray lenght

Post by SPJ » 28 Apr 2022, 00:17

This sounds like an advanced problem and I won't pretend to fully understand it. I'm not sure what the scalarstate node is. If I was wanting to store distance data to a single point (per point) as a texture, I'd probably convert the distance information to vertex color, and then try and bake that out using Rendermap. Does this sound anything like a solution?

starcow
Posts: 27
Joined: 16 Nov 2012, 12:28

Re: how to bake ray lenght

Post by starcow » 02 May 2022, 13:25

Thanks SPJ for the answer!
Yes, the scalar state node has a ray length setting!
Which node do you mean exactly? I couldn't find such a node that stores the distance for each pixel in a vector.

Cheers, starcow

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: how to bake ray lenght

Post by SPJ » 02 May 2022, 17:34

Ah OK. Initially I thought this was a node you were working with in ICE, rather than the render tree. I thought you were trying to push scalar data from an ICE tree and bake it into a texture on an object.

So I know how I would approach this in ICE. The process would be converting scalar information (distance from a custom position) to colour information and storing it as vertex colour data per vertex. Then rendering out a texture of the polymesh with those colours applied using Rendermap.

You'd need to be able to access and translate the colour information wherever the texture will be used afterwards. Where is the baked information going next?

You could write out custom data from ICE like scalar values (per point) using Mootz Topolizer cache format too, so long as the data could then be read in the destination, such as Maya. Not sure how you then apply the pointcloud information to the corresponding vertexes afterwards though!

I guess I need more info!

starcow
Posts: 27
Joined: 16 Nov 2012, 12:28

Re: how to bake ray lenght

Post by starcow » 05 May 2022, 17:50

Thanks SPJ!
I only own the 2010 version. So I don't have ICE at all.
In the meantime I found a workaround using a gradient.
The distance values need a reference point, i.e. a camera. However, this can neither be defined in the render node (scalar state) nor in the render map - and this would be necessary to be able to bake a map.
If anyone still has an idea how it could work, I would of course still be interested!

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: how to bake ray lenght

Post by SPJ » 06 May 2022, 13:06

I thought ICE was introduced in XSi 7? You should have it in 2010. What happens when you press Alt-9 in SI?

I'm not sure all the ICE nodes available in 2010, but as I described above ICE can calculate the distance from each vertex in a mesh to a specified point. ICE can also convert that data into colour values and apply it to each vertex. I'm pretty sure you could then access that colour data in the Render Tree attribute node and plug that into a Constant shader to render a texture map using Rendermap.

Happy to assist further if you can try this method / if it would be useful to your end goal.

Surface_VR
Posts: 39
Joined: 11 May 2020, 14:22

Re: how to bake ray lenght

Post by Surface_VR » 06 May 2022, 15:10

If it can render, then the scalarstate can output colors, right?

If you want to record the position, does that mean you want to burn the video into the texture?
To burn a video into a texture, there is a "RenderMap Sequence Script".

Can you make a simple sample that shows that you want to burn this color?

starcow
Posts: 27
Joined: 16 Nov 2012, 12:28

Re: how to bake ray lenght

Post by starcow » 13 May 2022, 21:55

Right, my mistake! ICE is of course onboard! The 2010 simply lacks the ability to create geometry with ICE. I'll try it that way, thanks SPJ!

@Surface_VR
No, I don't want an animated texture. The depth information should simply be stored (statically) from a certain point and baked into the texture.

Cheers, starcow

Post Reply

Who is online

Users browsing this forum: AppleBot [Bot] and 48 guests