Results 1 to 12 of 12

Thread: Is it possible for an item to have multiple datasources

  1. #1
    Potential Tuner
    Join Date
    Mar 2021
    Posts
    7

    Is it possible for an item to have multiple datasources

    For example, in this video: https://vimeo.com/manage/videos/530449773

    I'd like the tires icons to have multiple inputs with different outputs based on the input.
    - One input for brake pressure (how it's currently set) that turns more red the higher the pressure
    - Another input for speed that turns the tires more green the faster the speed
    - Another input for steering wheel rotation that rotates the tires based on the rotation degree, kinda like how the steering wheel currently does.

    The car bits are currently 7 different elements, Image (car), Image (steering wheel) 2x vertical bars (front wheels), 2x vertical bars (rear wheels) and a vertical bar for engine temp


    Bonus if I can get the whole car to rotate, keeping all the other elements in the same relative position, based on the steering wheel input

    Thanks!

  2. #2
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Quote Originally Posted by davidpinaz View Post
    For example, in this video: https://vimeo.com/manage/videos/530449773

    I'd like the tires icons to have multiple inputs with different outputs based on the input.
    - One input for brake pressure (how it's currently set) that turns more red the higher the pressure
    - Another input for speed that turns the tires more green the faster the speed
    - Another input for steering wheel rotation that rotates the tires based on the rotation degree, kinda like how the steering wheel currently does.

    The car bits are currently 7 different elements, Image (car), Image (steering wheel) 2x vertical bars (front wheels), 2x vertical bars (rear wheels) and a vertical bar for engine temp


    Bonus if I can get the whole car to rotate, keeping all the other elements in the same relative position, based on the steering wheel input

    Thanks!
    You can definitely do all of that provided you have the data to back it up! As long as you have an input file that has a column for that data, RaceRender has almost unlimited ways of displaying it.

    The video link is broken for me, but I think I have an idea of what you're looking for.

    Out of the box, there are already several types of bar graphs for engine temp/throttle/brake, a steering wheel image that can rotate, and several options for speed (e.g. map with speed zones in the top video below, speedometers, 2d graph, etc).

    RaceRender allows for a lot of customization if you're skilled enough with the Enhanced Object Script Editor (or can put in a simple/complete enough request for one of us on the forum to look into). I put together the air temp/distance/engine temp gauge in the middle of the top video to mimic the gauges on my dashboard with some custom gauges.




  3. #3
    Potential Tuner
    Join Date
    Mar 2021
    Posts
    7
    Yeah, sorry about the first link. Vimeo changed a few things around and I hadn't noticed when I posted it. Here's the correct link:

    https://vimeo.com/530449773


    Anyway, as you can see, I have the avatar of my car on the bottom right, with wheels, steering wheel and and engine icon (for HP). Unfortunately, they are all separate items in the "Display Objects" panel (see attached pic). The tires even have Multiple icons for each "tire", offset every so slightly and with varying transparency.

    What I'd like is for the the entire car avatar (tires, car, steering wheel, engine) to be seen as one object. The whole car object, steering wheel and tires rotate according to the steering angle. So you'd see the car rotate and the tires and steering wheel also rotate within the car, but also staying in their respective relative location. The tires turn red under braking, and green under acceleration. And the engine icon stay in it's relative position during the car rotation.

    There are separate columns in the imported CSV file (all from an AiM Solo2 DL) for each of these data points. Hopefully this all makes sense, lol!

    Screen Shot 2021-04-06 at 8.29.17 AM.jpg

  4. #4
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Currently, images are the only things that can be easily rotated by specifying a data field as the rotation. If you could rotate groups, then this would be very easy, but that's not currently possible.

    I suppose you could do the complex math to draw the appropriate polygons using the proper rotation transform on the coordinates. I think that would be a lot of work for something that would probably make it more difficult to see what's exactly going on with the data (since your bars would be moving while also displaying data). You would also need quite a bit more real estate dedicated to moving the car than you currently have. Maybe something where just the front "tires" rotate could fit that train of thought? I think that would be a bit easier to code up while still making it easy to see what's happening with the data and still give the illusion of moving with the wheel. When you turn your steering wheel, the car doesn't rotate relative to your camera: your camera is going to move wherever the hood of your car moves.

    If I were you, I'd look more at making the speedometer and tachometer more closely match my actual gauges (as described here).

    I'd also edit the G-Force gauge to flip the Left/Right fields (checkbox next to Range under the Left/Right Field dropdown) unless you prefer the gauge moving to the right when you turn right.

    I think the data that you do have is very well setup. I get a ton of information in a compact and efficient setup. If you're still interested in the rotating car + gauges, I can try to put something together in a few weeks (but I'm pretty busy with a few other projects at the moment).

    Maybe @Weston@HPTuners will add a feature where Display Object Groups can rotate? That could be used for either scenario mentioned above (whole car vs individual tires).

  5. #5
    Potential Tuner
    Join Date
    Mar 2021
    Posts
    7
    Thanks for all that insight! I would absolutely love to have objects be able to do a $thing together. If there's anything I can do to help, please let me know.

  6. #6
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Quote Originally Posted by davidpinaz View Post
    Thanks for all that insight! I would absolutely love to have objects be able to do a $thing together. If there's anything I can do to help, please let me know.
    Looking into this again. Do you have a sample CSV that I can code to?

  7. #7
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    I've got some initial mockups for you:

    Tire - FrontLeft.rro
    Tire - FrontRight.rro

    I'm not sure what your Acceleration/Braking/ABS columns are called; so you'll need to open the Background Script and change "Acceleration Data", "Braking Data", and "ABS Data" to your column names. These use the same code, but have a "IsLeft" variable in the Background Script which changes the side that the ABS appears on depending if it's true or false.

    You'll need to set the Data Field in Object Parameters to be your Steering Angle.

    It should look something like this:
    TirePreview.jpg

  8. #8
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Quote Originally Posted by davidpinaz View Post
    Thanks for all that insight! I would absolutely love to have objects be able to do a $thing together. If there's anything I can do to help, please let me know.
    Realized that it's probably not realistic to have the tire exactly at a 1:1 ratio with the steering; so I added a SteeringRatio variable to make it a bit more realistic but also still providing enough feedback that you can tell that it's turning. I also fixed the color of the ABS.

    Tire - FrontLeft.rro
    Tire - FrontRight.rro

    You could make these work for the rear tires as well by simply not setting the Data Field (thus always being 0).

  9. #9
    Potential Tuner
    Join Date
    Mar 2021
    Posts
    7
    Here's a zip file of a session. It's 9Mb, so I couldn't attach it and I don't use any of the other file share services, so hopefully this works:

    5-20-21-apex.zip

    I'll see if I can figure out the examples you posted, too. Thank you!

  10. #10
    Potential Tuner
    Join Date
    Mar 2021
    Posts
    7
    After adjusting some of the parameters, this is what I have now, thank you! Honestly, the only thing I'd like change now is to have the "tires" have rounded corners, rather than perfectly squared. Still, this is awesome, thank you!

    New layout

  11. #11
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Glad it's working for you!

    The Enhanced Script Editor has a "DrawPoly4" function which lets you draw a 4-sided polygon, but there isn't a function which can draw a rounded-rectangle which is also rotated...

    You could probably mess around with drawing two circles and another rectangle on each edge, but I don't think you can partially fill a circle to mimic the bar filling to the top. It would be much easier if you could just rotate existing objects based on a second field.

  12. #12
    Potential Tuner
    Join Date
    May 2021
    Posts
    6
    Came here to say I watched the New layout video, and that is really cool visualization with the tires. Nice work!