|
Register or have you forgotten your password?
|
|
|
| Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||
|
Premium Member
Join Date: Jan 2003
Posts: 461
|
Hello, I am trying to use Warp3D to enable a flat texture-mapped square/rectangle to be viewed at different angles.
How can I create non-triangular objects? I want to create a square/rectangle. This can be done by creating two triangles adjacent to each other, but Warp3D seems to be designed to wrap rectangular textures onto triangles for some reason, which isn't very useful. How do I tell the system to wrap the texture around both triangles (ie. to treat them as a single object)? How do I move the camera/viewpoint (as can be done in eg. AMOS 3D), there doesn't seem to be any way of doing this? Must I instead move the triangles? Is there any example code or tutorials available? I had a look on Aminet, there is almost nothing. |
||||||||
|
|
|
|
|
#2 | |||||||||||
|
Sockologist
![]()
|
Quote:
Quote:
Code:
V[0]--V[1] | /| | / | | / | | / | | / | V[2]--V[3] Quote:
You need to calculate your vertices in screen space directly or write your own transformation pipeline.
__________________
OCA This isn't SCSI... This is SATA!!! I have CDO. It's like OCD except all the letters are in ascending order. The way they should be. Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64 A1XE 800MHz / 512MB / Radeon 9200 / OS4.1 A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4 A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9 A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB Last edited by Karlos; 04-12-2012 at 12:07 PM.. |
|||||||||||
|
|
|
|
|
#3 | ||||||||
|
Hobbyist
![]()
Join Date: Feb 2003
Posts: 51
|
Hello
have a look to http://aminet.net/dev/src/StarshipW3D.lha replace StarShipW3D.h with a simple textured square object like that /* This file contain all the datas for the 3D-object */ /* All points : a point is defined as 5 coordinates U V X Y Z */ /* All triangles : a triangle is defined as 3 indices to the points */ #define TEXNAME "StarShip_256X256X24.RAW" #define TEXSIZE 256 #define pointsCount 4 #define trianglesCount 2 float points[pointsCount*5] = { 0.00 0.00 0.0 1.0 0.0 0.99 0.00 1.0 0.0 0.0 0.99 0.99 1.0 1.0 0.0 0.00 0.99 0.0 1.0 0.0 }; ULONG indices[trianglesCount*3] = { 0,1,2, 0,2,3 }; Alain |
||||||||
|
|
|
|
|
#4 | ||||||||
|
Cult Member
![]()
Join Date: Jul 2006
Location: Nottingham, UK
Posts: 816
|
It sounds like you could do with a source of some basic information about Perspective, Model and World transformations. Or the OpenGL transformation pipeline. (try Google)
Some of the NeHe tutorials come in for a lot of flack for being out of date and a lot of them definitely NOT the best way of doing things. However, as a resource to learn from a lot of people find them very useful. The link to the lessons is on the right of the page. http://nehe.gamedev.net/ They're aimed at Windows originally, and texture mapping starts around lesson 6. I recommend just going through them one lesson at a time, implementing/porting them in Warp3D and asking on here for the equivalent Warp3D functions. It's a little more involved but everything, certainly at this stage, is really simple and shouldn't require more than a few nudges and hints from people ![]() Good luck.
__________________
Be Positive towards the Amiga community! |
||||||||
|
|
|
|
|
#5 | ||||||||
|
Premium Member
Join Date: Jan 2003
Posts: 461
|
Yes, I'm nearly finished implementing the feature using Direct3D for the Windows version and then might try implementing that functionality via Warp3D for the Amiga version. I will rotate the object which will obviate the need to move the camera.
|
||||||||
|
|
|
|
|
#6 | ||||||||
|
Defender of the Faith
![]()
|
Hi,
@all, You know why Karlos knows som much about Warp 3D, probably because he is warped. After all it takes one to know one smerf
__________________
I have no idea what your talking about, so here is a doggy with a small pancake on his head. MorphOS is a MAC done a little better |
||||||||
|
|
|
![]() |
| Bookmarks |
| Tags |
| tutorials , warp3d |
| Thread Tools | |
| Display Modes | |
|
|