Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: cc8boy on December 14, 2014, 11:14:02 AM

Title: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: cc8boy on December 14, 2014, 11:14:02 AM
Hi itoosoft,
I was making a long row of street lights.
I know it is impossible to use the vraylight objects as segment object in Railclone pro.
But I have an idea, can you show me how to read the transform matrix data of all the street lights objects in Railclone pro via MAXscript ? I want to write a script in order to place the vraylights quickly. I know I can use the Railclone tools. Furthermore, Is anyway to link the vraylights to railclone objects (The distances of vraylights will automaticlly change when I change the distance of the street lights) ?
Title: Re: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: iToo on December 15, 2014, 09:44:53 AM
Hi, actually there is not a way to read the transform matrix via Maxscript. To difference of Forest, not all elements generated by RailClone are instances, so for such elements their transformation matrix has not utility without the mesh.
There are several threads discussing workarounds for the lights issue. However, we are evaluating what could be done to make that process easier, using RailClone Tools or perhaps other more specific tool.
Title: Re: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: cc8boy on December 15, 2014, 04:35:30 PM
But in many cases, we just want to instance copy some objects. We don't need any bend or vertex welding or UVW mapping in such this case. I think the script can just read the transform matrix of the nodes which are not be bent or welded is enough.
Title: Re: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: iToo on December 15, 2014, 04:49:40 PM
Ok, we'll see what can be done.
Title: Re: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: George on December 16, 2014, 07:44:17 AM
To account for bending, you could also have a function that transforms a point3 into the world space location (in case the segment is bent, etc.). It would return via reference parameters the world space position and world space rotation.
Title: Re: How to read the transform matrix data of all the street lights via MAXscripts?
Post by: iToo on December 16, 2014, 09:11:54 AM
To account for bending, you could also have a function that transforms a point3 into the world space location (in case the segment is bent, etc.). It would return via reference parameters the world space position and world space rotation.

Really RailClone already includes a set of functions to fetch all geometry data, but the interface is designed to be used from C++, not Maxscript.  This interface is used for renderers which don't include a SDK, as Corona.