Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperCube > Announcements and Showcase
Copperghinator : an open CopperCube project
Author Text

marcw
Registered User
Quote
2021-04-07 12:41:39

Hello everybody,

"Copperghinator" ... I imagined that name for an open CopperCube project.

I think that it is feasable within a few months.

The model "Copperghini" that I shared freely with this community would be cornerstone in that project.

A few weeks ago, I watched this on a tv channel : http://www.kinematicevents.com/r....

It relates to battles or real robots inside an arena. With the spectacular sound and light show accompanying those battles, the excitement of the audience is guaranteed.

Here is the link to a short downloadable video showing my first step with the animation and texturing of the "Copperghini" : http://cloud.movavi.com/show/NCn...
(44 MBytes - 1 minute).

(Please note that the correct rotation of the front wheels is still in development.)

I promised a special version to Sam (Smn Mhmdy Studios) to thank him for his remarkable contribution in this forum.

I'll soon upload the completely revised version (new pivot points for the car body and for the new low poly wheels).

If some other members are interested to also receive their customized model, then they could provide some decent logo (preferably with a transparent back texture).

Smn Mhmdy Studios (Sam), Just_in_Case (Vazahat) and some other members of this community are truly experts in programming behaviors and actions for CopperCube.

Personnaly I am taking an new approach to write in JavaScript for CopperCube.

Here is the script (wip) controlling the movement of the car :


ccbRegisterKeyDownEvent("keyPressedDown");
function keyPressedDown(key_code)
{

copperghini_position = ccbGetSceneNodeProperty(copperghini,"Position");
copperghini_rotation = ccbGetSceneNodeProperty(copperghini,"Rotation");
wheel_BL_rotation = ccbGetSceneNodeProperty(wheel_BL,"Rotation");
wheel_BR_rotation = ccbGetSceneNodeProperty(wheel_BR,"Rotation");
wheel_FL_rotation = ccbGetSceneNodeProperty(wheel_FL,"Rotation");
wheel_FR_rotation = ccbGetSceneNodeProperty(wheel_FR,"Rotation");
copperghini_direction =1;

if (key_code == 38 ) // UP key
{
copperghini_direction =1;
}
else if (key_code == 90) // Z key
{
copperghini_direction =1;
}

else if (key_code == 40 ) // DOWN key
{
copperghini_direction =-1;
}
else if (key_code == 83) // S key
{
copperghini_direction =-1;
}

else if (key_code == 37 ) // LEFT key
{
wheels_rotation_direction =-1;
copperghini_rotation.y +=-2;
}
else if (key_code == 81) // Q key
{
wheels_rotation_direction =-1;
copperghini_rotation.y +=-2;
}

else if (key_code == 39 ) // RIGHT key
{
wheels_rotation_direction =1;
copperghini_rotation.y +=2;
}
else if (key_code == 68) // D key
{
wheels_rotation_direction =1;
copperghini_rotation.y +=2;
}

else
{
}

if (key_code == 38 || key_code == 90 || key_code == 40 || key_code == 83 || key_code == 37 || key_code == 81 || key_code == 39 || key_code == 68)
{
copperghini_rotation.y = (copperghini_rotation.y)%360;
if (copperghini_rotation.y <0) { copperghini_rotation.y+=360; }

copperghini_position.x += sinus[copperghini_rotation.y]*copperghini_direction;
copperghini_position.z += cosinus[copperghini_rotation.y]*copperghini_direction;

wheel_BL_rotation.x +=30*copperghini_direction;
wheel_BR_rotation.x +=30*copperghini_direction;
wheel_FL_rotation.x +=30*copperghini_direction;
wheel_FR_rotation.x +=30*copperghini_direction;

ccbSetSceneNodeProperty(copperghini,"Position",copperghini_position);
ccbSetSceneNodeProperty(copperghini,"Rotation",copperghini_rotation);
ccbSetSceneNodeProperty(wheel_BL,"Rotation",wheel_BL_rotation);
ccbSetSceneNodeProperty(wheel_BR,"Rotation",wheel_BR_rotation);
ccbSetSceneNodeProperty(wheel_FL,"Rotation",wheel_FL_rotation);
ccbSetSceneNodeProperty(wheel_FR,"Rotation",wheel_FR_rotation);
}


Thanks for watching.




smnmhmdy
Registered User
Quote
2021-04-07 13:03:20

This is an awesome project and I'm glad you're still working on it :)
Writing a car controller can be quite an enormous task and I'm glad and happy that you've decided to do it.
Make sure to let us know if you encounter any problems, I'm sure many people on this forum would be happy to help you, including me :)

PS: The logo looks sick on the car, Thank you :D


marcw
Registered User
Quote
2021-04-07 13:56:03

Sam, thank you for your positive comment and for proposing your assistance in this open project.

Of course, by definition, an open project is a special one where the contributors are sharing their skills and some part of their free time.

In the spirit of that project, I want to throw some ideas :

- Behind each customized "Copperghini" (you could name yours : "SamanCar"), there would be truly an "Artificial Intelligence Programming Competition".
Explanations :
- Each contributor receives the same base model : the car and its wheels.
- New accessories may be attached to that base model (contribution of members having some skills in modelling could be helpful).
- Then the contributor writes a script to control that car and thanks to that script the engine could have its full autonomy and freedom of action. It is the goal when creating robots.
- accessories could be the following : weapons, shields, ...
- special features : turbo speed, smoke, ...
- forbidden tricks : invisibilty, abnormal movements, ...

Artworks required : the arena, sound, lighting, audience animations, ...

Difficulty to overcome : Coordination of the scripts provided by all contributors to create the final game to be played on a local computer.

These are just some ideas for now.





smnmhmdy
Registered User
Quote
2021-04-07 20:41:57

Looks like you have a planned out goal for your project which is aspiring, Congrats!
Your ideas are great, The AI Programming competition sounds like a fun challenge to part take in, Sign me up!


hadoken
Guest
Quote
2021-04-07 21:51:03

@marcw & @smnmhmdy

Hey guys, sounds like an interesting endeavor of yours I will make sure to follow!!!

@smnmhmdy - Could you still imagine having a little bit of time left over to maybe find some working solution for rotating platforms inside or outside your third person controller?

Wish you both luck!


marcw
Registered User
Quote
2021-04-07 22:07:13

Sam, thank you for spontaneously applying to that "competition".

"To think is to create".

When I saw "your wolf put in a cage", I thought "Sam is not just a skilled programmer, he is also an effective problem-solver".

As I already wrote it, CopperCube is for me a hobby.
It means that this nice software is an opportunity to stay mentally healthy.

No deadline, no outsized ambition, simply enjoying.
Simply having the pleasure to watch virtual things moving thanks to a few lines of codes.

On the Internet, our "big village" - and in the forums, you have the opportunity to meet people having the same affinities as yours.

My motto : "I am trying my best while knowing that I am not the best".

About the "competition", I am adding the finishing touch to your car.

I am convinced that with your capacity of games developer, you surely have many ideas and proposals to put on the table.

Hadoken's comment just appearing while I am posting this comment -> thank you Hadoken and I wish you good luck with your CopperCube's projects.




smnmhmdy
Registered User
Quote
Yesterday

You have a great mindset marc, Looking forward to it


marcw
Registered User
Quote
Today

Hello,

Sam, thank you for your kind words and also for your patience.

I finally completed the texturing of the "CopperGhini".
It is a fair quality for CopperCube.

For all members : Here is the link for a direct access to the zipped folder :
https://1drv.ms/u/s!AjokN1FU3jK1...

And for you Sam, here is the link for your special version :
https://1drv.ms/u/s!AjokN1FU3jK1....

A "Read_Me" file in .txt format is included in each zipped folder.

Thank you for your interest.




smnmhmdy
Registered User
Quote
Today

@marcw Well done marc! My version's textures looks really good specially the glowing logo, Thanks!
Do you have any plans to add interiors to the model?


marcw
Registered User
Quote
Today

Sam, you're welcome.
The effect obtained for your logo is perhaps the best thing I could create among all those textures.
For the other ones, perhaps that I'll find a better process one of these days.
The art of painting is a gift that I don't have.
Having good softwares for that purpose is not enough.

About modelling, let us admit that my patience and my taste for accuracy are somewhat compensating a lack of virtuosity.

And indeed I would like to model the car's interior.
I collected many references pictures for that purpose.

Yesterday while I was searching for some good pictures of the real car, I found this website : https://www.gta5-mods.com/vehicl...

If you click on the large picture (a grey Lamborghini) and watch the next ones, then you'll find this link to a YouTube's video : https://www.youtube.com/watch?v=...

The last minute of that movie is completely crazy, but it demonstrates the high degree of realism that the professional artists can create.

After having watched that movie, I was somewhat disenchanted.

In the Year 2019 when I started the modelling of that virtual car, I also found an interesting local video showing the workflow of a designer in Lamborghini's studios.

https://www.lamborghini.com/fr-e...




smnmhmdy
Registered User
Quote
Today

These resources are really fascinating, and given what a great job you were able to do with the exterior of your model, I'm sure you'll be able to easily work on the interior as well :)


floydness
Registered User
Quote
Today

Way cool. Good work marcw.


marcw
Registered User
Quote
Today

Hello,

Floydness, thank you for your kind comment.

Sam (Smn Mhmdy), Indeed I am able to build a digital version of the interior of that car.
The critical factor is time.
The second one is motivation.

Easy work ? To produce poor quality, then I think you're right.

I guess that you'll smile during your visit on these web pages :

https://www.motor1.com/news/2717...

https://www.autoweek.com/car-lif...




marcw
Registered User
Quote
Today

Calculating the steering angle of the "Copperghini" :

Documentation found on this web page :
https://gamedev.stackexchange.co...

Formula : atan(wheelbase / (turning circle - car width)) = R (a value in radians).
radians to degrees conversion : D (a value in degrees).
D degrees is the steering angle.

Excerpt from this web page :
https://en.wikipedia.org/wiki/Tu...

The Oxford English Dictionary describes turning circle as "the smallest circle within which a ship, motor vehicle, etc., can be turned round completely"

Please note that the terms "turning circle", "turning diameter" and "turning radius" often create confusion.

Turning circle of the "Copperghini" = Turning diameter/2 Kerb-to-kerb = 12.55 meters / 2 = 6.275 meters.

Its Wheelbase = 2.66 meters.
its Width = 2.04 meters.

Atan(2.66 m / (6.275 m - 2.04 m) = 0.56 Radians = 32 Degrees.

Image found on this website :
https://physics.stackexchange.com/questions/144183/how-do-i-compute-the-angle-needed-to-have-a-turning-radius-of-8m-and-its-whee



Therefore when the car turns left or right, the maximum rotation.Y angle of the front wheels may not exceed 32 degrees.

===========================================

By the way, the wheels of the "Copperghini" are child nodes of the car body.
And the CopperCube's newbie that I am discovered that their positions (x,y,z) values are relative to their mother node.

In the script included in my first comment, the sinus and cosinus variables refer to predefined arrays containing the sinus and cosinus calculated for angles in degrees.
It is a personal choice for a better data visualisation.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Forum Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons