Java 3D: How to Detect Collision between an .obj Car Model and Tree Objects (with Source Code)
#Java3D #3Dmodel #collisiondetection
This video explains how to replace a .wrl car model with an .obj car model downloaded from Google Poly. The video also talks a little bit about a collision detection using a group.
0:00 Java 3D: How to Detect Collision between an .obj Car Model and Tree Objects
3:18 Downloading a Car Model from Google Poly
4:41 Importing model.obj into Blender 2.77, Positioning It, then Exporting It as model_Camaro.obj
6:29 Modifying model_Camaro.obj
7:12 Source Code Explanation
7:33 Replacing the .wrl Car Model with the .obj Car Model
7:55 Creating the createObjLoad Method
9:17 Changing the Background Color
9:29 Changing the Directional Light Color
9:50 Changing a Java 3D Program Extending the Applet Class to That Extending the Frame Class
11:26 Run
Source code described in this video:
https://sites.google.com/view/flying-java-3d/videos/java-3d-how-to-detect-collision-between-an-obj-car-model-and-tree-objects (new Google Site)
Source code described in the video,
"How to Detect Collision between a Car Model and Tree Objects in Java 3D."
https://sites.google.com/view/flying-java-3d/videos_earlier_3/how-to-detect-collision-between-a-car-model-and-tree-objects-in-java-3d (new Google Site)
Code I referred to for collision detection:
The CollisionDetectorGroup class posted to java3d-interest
http://www.mail-archive.com/java3d-interest@java.sun.com/msg29339.html
The SimpleCollision class posted on the Java Tips
https://www.java-tips.org/other-api-tips-100035/119-java3d/2242-collision-detection-with-java3d.html
Poly was shut down on June 30, 2021. If you need the Poly model I used in this video, you can download it from the link under "3D model file I used".
I don't own any of the Poly models, so credits go to their respective and rightful owners. Please follow the CC-BY 3.0 license when you use them.
CC-BY 3.0:
https://creativecommons.org/licenses/by/3.0/
https://creativecommons.org/licenses/by/3.0/legalcode
3D model file I used:
1) 3D model (A red camaro ZL1 2017) Public / Remixable (CC-BY) (C) by Kris Tong
https://drive.google.com/file/d/1vJnE-YClO_v11UKTQBF-Cff8GhWH7jSY/view?usp=sharing
Free tree generator I used:
1) tree[d]
Tree[d] can be downloaded now from Web Archive at:
https://web.archive.org/web/20130915030534/https://www.frecle.net/index.php?show=treed.about
Free automatic composition software I used;
1) "れっつ、めろめろ!"
(http://www.vector.co.jp/soft/win95/art/se132039.html)
Free 3D modelers I used to create a Sk8 boy model;
1) "MetasequoiaLE R2.4a"
2) "Blender 249.b"
3) "Blender 2.58a"
About the key movements in the KeyNavigatorBehavior class
Table 4-3 (P.4-28)
https://web.cs.ucla.edu/classes/cs269/Java3DTutorial/j3d_tutorial_ch4.pdf#
Types of licenses
https://en.wikipedia.org/wiki/Creative_Commons_license#Types_of_licenses
obj file format
https://en.wikipedia.org/wiki/Wavefront_.obj_file
To learn more:
About Java 3D:
Free online books:
Dr. Andrew Davison's "Killer Game Programming in Java":
https://fivedots.coe.psu.ac.th/~ad/jg
Dr. Andrew Davison's "Pro Java 6 3D Game Development":
https://fivedots.coe.psu.ac.th/~ad/jg2
Beginners guide:
http://www.java3d.org/tutorial.html
About Java:
https://www.youtube.com/watch?v=5u8rFbpdvds&index=2&list=PLFE2CE09D83EE3E28
https://www3.ntu.edu.sg/home/ehchua/programming/index.html
Java Language Specification:
http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.3.1
To use the KeyNavigatorBehavior class in my Java 3D program (Mykeynavbeh.java), I used the following code;
1) Part of code from BackgroundApp.java included in the source bundle
that accompanies Sun Microsystems' Java 3D API Tutorial
(http://java.sun.com/developer/onlineTraining/java3d/)
Copyright (c) 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
Copy of the above tutorial:
https://web.cs.ucla.edu/classes/cs269/Java3DTutorial/j3d_tutorial_ch0.pdf#
Change ch0.pdf to ch1.pdf-ch7.pdf in the address bar to display other chapters.
Example source code:
http://www.interactivemesh.org/off/download/java3d_tutorial_examples_src.zip
Thank you for watching my video, and I appreciate the people who have posted wonderful free software, images, models, and Java 3D tutorials that allowed me to make this video.
Видео Java 3D: How to Detect Collision between an .obj Car Model and Tree Objects (with Source Code) автора Учимся джаве вместе: основы и практика
Видео Java 3D: How to Detect Collision between an .obj Car Model and Tree Objects (with Source Code) автора Учимся джаве вместе: основы и практика
Информация
5 декабря 2023 г. 2:35:45
00:12:25
Похожие видео