Itoo Software Forum

Author Topic: Cars on parking rotate 180  (Read 748 times)

Crayox

  • Jr. Member
  • **
  • Posts: 68
Cars on parking rotate 180
« on: June 12, 2021, 10:31:48 AM »
Hi guys,
so I created lines for my parking spaces, and now I'm using it to put cars in. I'm using vrayproxy car models and will randomize them. It's working ok but now I wanted to have each car also be 180 rotated. I use transform to rotate and then move the car back on the space since it rotates on the street. Why though do my rotated cars overlap the normal ones? Shouldn't randomize pick one and insert one into evenly?
Thanks

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Cars on parking rotate 180
« Reply #1 on: June 12, 2021, 11:54:19 AM »
Hi..
Try this generator.
Just add your cars to the noted Randomize node and of course, check the parameters.  ;)


« Last Edit: June 12, 2021, 11:58:00 AM by Dragan »

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #2 on: June 12, 2021, 02:05:12 PM »
Thanks! Damn that looks complex but works :)
Since I'm a beginner, I would still like to know why mine doesn't work.

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #3 on: June 12, 2021, 02:37:31 PM »
I though maybe I could try rotating them after randomizer. So I used selector with one normal and one transformed input. Exported index to a random number generator with integer 1-2 and now they all face the same way. Haha why is that?

This seems so trivial and yet I'm missing something. Transform should be working since I saw the cares rotated and back to their place when they were overlapping.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Cars on parking rotate 180
« Reply #4 on: June 12, 2021, 03:02:20 PM »
Can you share the scene file so we can take a look?

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #5 on: June 13, 2021, 09:35:28 AM »
Yes of course! Thanks...here it is.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Cars on parking rotate 180
« Reply #6 on: June 13, 2021, 10:20:28 AM »
Well, you probably have some leftovers from the previous testing in the Segment node transform (orange) as well as in the transform node.
Try to `clean` those and set Random node to Generate on Segment.
Also, check this part of the help documentation about transforms:
https://docs.itoosoft.com/railclone/migrating-to-4-x#Migratingto4.x-ChainedTransformOperators

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #7 on: June 14, 2021, 08:03:10 AM »
Oh - changing random generator to segment helped fix that but actually that transform is the one to rotate the cars. I changed the degrees to 90 to see it more clearly.

So now the random selector works but as you see where I have the rotated version it also puts the normal one. I don't understand this. Shouldn't the selector literally select one? Why it inserts the other too?

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Cars on parking rotate 180
« Reply #8 on: June 14, 2021, 08:09:52 AM »
Please can you share Your scene or download and try the Max file (MyParkingCars_B.max) from my previous post.

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #9 on: June 14, 2021, 08:27:25 AM »
Oh sorry, missed your file. Yes, that works, but that's if the generator line goes in the middle of the parking lot. This is less practical if I use snap to generate lines for parking areas. Since my pivots are at the end of cars I have to rotate them and then move them back to parking lot. So would really like to know why this doesn't work. I mean one transform does this and then the car should be inserted. Will check the evenly options some more. I guess the fact that one pivot is at the end and the other at the beginning of the parking space makes evenly think it's empty.

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #10 on: June 14, 2021, 08:38:13 AM »
Found a pattern :))) where it used rotated cars it was followed by that many empty spaces (and I still haven't used empty spaces here) so figured those cars were actually moved to the next space too. So now I used x translation in the rotating transform too and now all cars are where they should be as well as randomly rotated! :)
Thanks for your help!

Crayox

  • Jr. Member
  • **
  • Posts: 68
Re: Cars on parking rotate 180
« Reply #11 on: June 14, 2021, 09:12:52 AM »
Now that I wanted to do this in a clean scene, it was not necesary to move the cars on the x axes for some reason. I guess there was something weird in that original scene...with the generator line or something.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Cars on parking rotate 180
« Reply #12 on: June 14, 2021, 10:02:29 AM »
 ;) Glad to help!  ;)
Keep up the good work!  ;D