Jump to content

  • Log In with Google      Sign In   
  • Create Account


t4s0thcmdr

Member Since 21 Jul 2005
Offline Last Active Jul 29 2012 05:02 PM

Topics I've Started

Adding pause between .bip clips

12 July 2012 - 10:50 AM

Hi everyone,

I have been trying to use both motion mixer and motion flow in 3dsmax2012 to create an animation consisting of some .bip clips with pauses between them but have not been able to add the pauses thus far.

More specifically, consider three clips X, Y and Z. I would like to create the following animation with transitions (numbers are frames):

X plays from 0 to 25
Y plays from 26 to 100
pause between 101 to 299 (no transition between Y and Z, character should remain static)
Z plays from 300 to 325


I just can't add that pause with motion flow and when using motion mixer if I try to start clip Z at 300 and set the transition length between Y and Z to be 0 or 1, the program just crashes.

I would really appreciate any ideas and suggestions on where to look to find out how to add this pause (wait time) between clips.

Also, I'm not sure if it helps, I will be creating these animation sequences automatically with MAXScript later on.


Thanks in advance,
Victor Freire

Android 3d engines

10 August 2011 - 06:36 PM

Hello everyone,

What free Android 3d game engines do you recommend? I would be grateful if you could point me toward a site reviewing some of them as I could only find really simple lists with short descriptions and no pros&cons.

In case it helps your recommendations, I plan on using it for a 3-month university project and never used such an engine before. But I have a reasonably good knowledge of Linear Algebra and am currently studying 3d math. =)

Any help appreciated.


Thanks in advance,
Victor Freire

Stack/Heap allocation for class fields

26 June 2011 - 09:10 PM

Hello all,

I'm having some difficult with C++ when it comes to decide whether or not to use heap or stack allocation. So far, I believe I have understood the basics, please correct me if I'm wrong.

- Stack allocation: faster, automatically freed and should be used for 'small types' since it's usually a lot smaller than heap (though, the size is definable on the compiler)
- Heap allocation: slower and you have to manage it (manual release)

Therefore, from I what understand, inside a function, if the object to be created is 'small' then it should be put on the stack, otherwise one should put it in the heap.


My main doubt right now is what happens when they're fields (attributes) of a class. For example, please consider the following simplified class hierarchy:

class Timer {
	std::string name;
	int duration;
	int elapsedTime;
public:
	// ( . . . )
};



class Frame {
	std::string sourceImageId;
	int sourceX,
		sourceY,
		sourceW,
		sourceH;
	int duration;
public:
	// ( . . . )
};



class Animation {
	Timer timer;
	std::vector<Frame> frames;
	int currentFrame;
public:
	// ( . . . )
};


class CharacterStackAnim {
	Animation animation;
public:
	// ( . . . )
};



// Same class as above except that it allocates Animation dynamically
class CharacterHeapAnim {
	Animation* animation;
public:
	CharacterHeapAnim() { animation = new Animation(); }
	~CharacterHeapAnim() { delete animation; }
   // ( . . . )
};

1. If I allocate a CharacterStackAnim in the heap (using operator new), does the 'animation' field also get stored in the heap? Is there any difference from allocating CharacterHeapAnim on the heap?

2. How does one decide whether to make a field (like animation) a pointer or not (whether or not to dynamically allocate it)? Consider that the animation won't be shared with other characters.

3. In Animation, what would be better std::vector<Frame> or std::vector<Frame*>? What do you need to consider in order to answer such a question?


I would be very grateful if you could answer these questions or point me to a good source for further studies.


Thanks in advance,
Victor Freire

Merging similar functions

04 June 2009 - 05:59 PM

Hi everyone, I've just wrote these two functions but they look terrible, it seems obvious to me that C++ must provide some way of having only one function with the same functionality. Any ideas on how I could transform them into a single function? Thanks in advance, Victor Freire
1. 
2.// How to merge these functions?
3. 
4. 
5.bool TextManagerClass::DrawText(const std::string &text, const int size, const int X, const int Y,
6.                              const int fR, const int fG, const int fB,
7.                             const int bR, const int bG, const int bB, const int alpha, 
8.                             const bool fit_on_screen, const bool line_break, const string &font_name,
9.                             SDL_Surface *screen)
10.{
11.        std::vector<std::string> newvec;
12.        newvec.push_back(text);
13.        return DrawLines(newvec, size, X, Y, fR, fG, fB, bR, bG, bB, alpha, fit_on_screen, line_break, font_name, screen);
14. 
15.}
16. 
17. 
18.bool TextManagerClass::DrawLines(const std::vector<std::string> &text, const int size, const int X, const int Y,
19.                              const int fR, const int fG, const int fB,
20.                              const int bR, const int bG, const int bB, const int alpha, 
21.                              const bool fit_on_screen, const bool line_break, const string &font_name,
22.                              SDL_Surface *screen)
23.{
24. 
25.( . . . )


Java books

18 February 2009 - 02:08 PM

Hello, I´m going to start learning Java at university and would like to know what are the best books available. Is there a book similar to 'The C++ Programming Language' covering all the language from Sun? Thanks for the help, Victor Freire

PARTNERS