Hi everyone:
I would like to try learning how to design an add-on using sprites. FYI, I know absolutely nothing about CMOD's or drawing graphics.
1. Is there a tutorial anywhere for how to use sprites to design an add-on in Celestia?
Thanks in advance for your advice
Frank
Learning to use sprites
Re: Learning to use sprites
Ehi Frank, They have left you alone here? Hope this can contribute a bit more. Sprites modelling is both easy and difficult.fsgregs wrote:Hi everyone:
I would like to try learning how to design an add-on using sprites. FYI, I know absolutely nothing about CMOD's or drawing graphics.
1. Is there a tutorial anywhere for how to use sprites to design an add-on in Celestia?
Thanks in advance for your advice
Frank
Sprites acts on points (vertex) so you need modellers which manages points as primitives. They could be both 3d modelers in
strictly sense or math software with cloud points analysis (and 3d graphics outputs as "save as").
The CMOD structure of a tipical "sprite" prism is below:
material
diffuse 1 1 1
opacity 1
texture0 "your_texture.*" # usual Celestia formats
end_material
mesh
vertexdesc
position f3
pointsize f1 # Note here: standard CMOD doesnt'have
end_vertexdesc
vertices 6
4 0 0 1 # note the "1", specify the pointsizes (standard CMODs doesn't have)
-4 0 0 1
0 4 0 1
0 -4 0 1
0 0 4 1
0 0 -4 1
sprites
0 6 # zero + N(vertex) [uncount zero]
0 1 2 4 5 # N(sprites - 1) = N(vertex) [count zero]
Note:
1) texture format for sprites have the same default attitude: 32bit PNG will hold the transparency parts if any; JPG, which
doesn't allow trasparency needs to be blended as "add": es.
material
diffuse 1 1 1
opacity 1
texture0 "your_texture.*"
blend add
end_material
.
.
.
in order to fade the black background (with the new CMOD blend multiply directive the things will be much better)
Now: how to make this prism whether your modeller doesn't manage points?
1) you write they manually (tedious, just for small number)
2) Automate a spread sheet function (whether you know how to do)
3) Make you prism as polys normally and the remove faces. How to?
3a) Make prism, sphere, cylinder or spacecraft (yes, even spacecrafts)
3b) Save it as .OBJ or 3ds ASCII
3c) Open the file in a editor and remove all entry that isn't vertex relate (to say, just mem vertex numbers and take points)
3d) paste it in a new text file (figure out the CMOD structure as above)
3e) add all that lacking to be similar to the example above (pointsize, the "1" and the n of sprites)
3e1) For lots of vertex you need to paste vertex in a spread sheet column bring to mind that the pointsize will be the second column.
3e2) For having big numbers of point sprites to merge at end of file, either write a routine within the spreadsheet program or "sage" an exant point sprites file (add-on creators). This method for pointsize is more difficult because when you try to take it, you copy also the vertex. A way to avoid all this is to add ";" (without quotes) in place of space with an editor and then save it as .CSV. Some spreadsheets recognize this convenction and put columns where are ";".
This is my contribution. Enjoy, Frank!
Never at rest.
Massimo
Massimo
-
Topic authorfsgregs
- Posts: 1307
- Joined: 07.10.2002
- With us: 22 years 1 month
- Location: Manassas, VA
Re: Learning to use sprites
Fenerit:
Thank you for replying. Sadly, I have to give up my goal of learning sprite modeling. I have absolutely no idea how to create a CMOD, so I am just not able to understand almost all of what you wrote. I realize it may be more than I can grasp ... at least without an extensive course in CMOD modeling.
Hopefully, the points you explained will be of benefit to some other Celestia modelers so I don't think your effort has gone to waste.
Thanks again for trying. I am grateful.
Frank
Thank you for replying. Sadly, I have to give up my goal of learning sprite modeling. I have absolutely no idea how to create a CMOD, so I am just not able to understand almost all of what you wrote. I realize it may be more than I can grasp ... at least without an extensive course in CMOD modeling.
Hopefully, the points you explained will be of benefit to some other Celestia modelers so I don't think your effort has gone to waste.
Thanks again for trying. I am grateful.
Frank
-
- Posts: 1803
- Joined: 12.10.2007
- With us: 17 years 1 month
Re: Learning to use sprites
fsgregs wrote:Fenerit:
Thank you for replying. Sadly, I have to give up my goal of learning sprite modeling. I have absolutely no idea how to create a CMOD, so I am just not able to understand almost all of what you wrote. I realize it may be more than I can grasp ... at least without an extensive course in CMOD modeling.
Hopefully, the points you explained will be of benefit to some other Celestia modelers so I don't think your effort has gone to waste.
Thanks again for trying. I am grateful.
Frank
Frank,
CMOD's are easily created using the utility located HERE.
You can use this utility to create ASCII CMODs so that you can see exactly how they are built.
Hope that helps, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN
-
Topic authorfsgregs
- Posts: 1307
- Joined: 07.10.2002
- With us: 22 years 1 month
- Location: Manassas, VA
Re: Learning to use sprites
Bob:
Thanks for the link. I will explore it.
Frank
Thanks for the link. I will explore it.
Frank
Re: Learning to use sprites
Sorry Frank, I've not caught that you do not know 3d CMOD modeling FROM THE BEGINNING. In this case do not forget also here:
http://en.wikibooks.org/wiki/Celestia/3D_Models/CMOD_File
Anyhow, below there are two files which contains the first 32768 listed "1" and the second 32768 sprites (this latter need to be opened within an advance editor whether you want to see it in a single row, Notebad or Wordbad does trunk it).
http://fenerit.webng.com/files/32k_pointsprites.zip
http://en.wikibooks.org/wiki/Celestia/3D_Models/CMOD_File
Anyhow, below there are two files which contains the first 32768 listed "1" and the second 32768 sprites (this latter need to be opened within an advance editor whether you want to see it in a single row, Notebad or Wordbad does trunk it).
http://fenerit.webng.com/files/32k_pointsprites.zip
Never at rest.
Massimo
Massimo